CDRFLEx.set_on_log_alarm
Features
This is a function for registering the callback function that automatically checks all alarms and log information generated in the robot controller. It is useful when functions that should be executed automatically are made.
Parameter
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
pCallbackFunc | TOnLogAlarmCB | - | Refer to definition of callback function |
Return
None.
Example
void OnLogAlarm(LPLOG_ALARM pLogAlarm)
{
switch(pLogAlarm->_iGroup)
{
case LOG_GROUP_SYSTEMFMK:
switch(pLogAlarm->_iLevel)
{
case LOG_LEVEL_SYSINFO:
cout << "index(" << pLogAlarm->_iIndex << "), ";
cout << "param(" << pLogAlarm->_szParam[0]<< ", ";
cout << "param(" << pLogAlarm->_szParam[1]<< ", ";
cout << "param(" << pLogAlarm->_szParam[2]<< ")" << endl;
break;
default:
break;
}
break;
default:
break;
}
}
int main()
{
drfl.set_on_log_alarm(OnLogAlarmCB)
}