CDRFLEx.set_on_monitoring_state
Features
This is a function for registering the callback function that automatically checks changes in the information on the operation state of the robot controller. It is useful when functions that should be executed automatically are made during the change of data. .
Parameter
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
pCallbackFunc | TOnMonitoringStateCB | - | Refer to definition of callback function |
Return
None
Example
void OnMonitoringStateCB(const ROBOT_STATE eState)
{
switch((unsigned char)eState)
{
case STATE_SAFE_OFF:
// Robot controller servo on
drfl.set_robot_control(CONTROL_RESET_SAFET_OFF);
break;
default:
break;
}
}
int main()
{
drfl.set_on_monitoring_state(OnMonitoringStateCB);
}