Data Types and Variables#

Enumeration variable meaning:

// Robot status information

enum StateRobot {

SR_Start = 0, // The robot starts

SR_Initialize = 1, // The robot is initialized

SR_Logout = 2, // The robot logs out and is not used

SR_Login = 3, // Robot login, not used

SR_PowerOff = 4, // The robot is powered off

SR_Disable = 5, // Enable the function on the robot

SR_Enable = 6. // The function is enabled on the robot

SR_Update=7 // Robot update

};

// Program status information

enum StateProgram {

SP_Stopped = 0, // The program is stopped

SP_Stopping = 1, // The program is being stopped

SP_Running = 2, // The program is running

SP_Paused = 3, // The program is paused

SP_Pausing = 4, // The program is paused

SP_TaskRuning = 5 // The manual teaching task is being executed

};

// Robot operation mode information

enum OperationMode {

kManual = 0, // Manual mode

kAuto = 1, // Automatic mode

kRemote = 2 // Remote mode

};

// Task status information

enum TaskState {

ST_Idle = 0, // The task is not executed

ST_Running = 1, // The task is being executed

ST_Paused = 2, // Paused task is paused

ST_Stopped = 3, // The task has been stopped

ST_Finished = 4, // Finished tasks are successfully executed, which only indicates that a task is successfully completed.

ST_Interrupt = 5, // The task is interrupted (the task has ended)

ST_Error = 6, // Task error (task has ended)

ST_Illegal = 7, // The task is illegal and cannot be executed in the current state (the task has ended)

ST_ParameterMismatch = 8 // The task parameter is incorrect (the task has ended).

};

// Security controller status information

enum SafetyState {

SS_INIT = 0, // initialize

SS_WAIT = 2, // Wait

SS_CONFIG = 3, // Configuration mode

SS_POWER_OFF = 4, // Power-off status

SS_RUN = 5, // The running status is normal

SS_RECOVERY = 6, // Recovery mode

SS_STOP2 = 7, //Stop2

SS_STOP1 = 8, //Stop1

SS_STOP0 = 9, //Stop0

SS_MODEL = 10, // Model configuration status

SS_REDUCE = 12, // Reduce mode status

SS_BOOT = 13, // Boot

SS_FAIL = 14, // Fatal error status

SS_UPDATE = 99 // Update the status

};

For ease of use, the enumerated type is int in actual use, and the enumerated type only provides the status information corresponding to the int value when used.

The vector<double> type in c++ functions corresponds to the python type list.