You're reading the documentation for an older, but still supported version
(GL013300).
For information on the latest version, please have a look at GL013301.
For information on the latest version, please have a look at GL013301.
set_on_monitoring_data
This is a function for registering a callback that automatically monitors the robot’s operation data such as joint positions, task coordinates, and system status. It is useful when certain tasks must execute automatically upon data updates.
Definition
DRFLEx.h within class CDRFLEx, public section (line 613)
void set_on_monitoring_data(TOnMonitoringDataCB pCallbackFunc) {
_set_on_monitoring_data(_rbtCtrl, pCallbackFunc);
};
Parameter
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
pCallbackFunc |
Callback function pointer to handle real-time monitoring data updates |
Return
None
Example
void OnMonitoringDataCB(const LPMONITORING_DATA pData)
{
// Displays the current joint position data
cout << "joint data "
<< pData->_tCtrl._tJoint._fActualPos[0] << ", "
<< pData->_tCtrl._tJoint._fActualPos[1] << ", "
<< pData->_tCtrl._tJoint._fActualPos[2] << ", "
<< pData->_tCtrl._tJoint._fActualPos[3] << ", "
<< pData->_tCtrl._tJoint._fActualPos[4] << ", "
<< pData->_tCtrl._tJoint._fActualPos[5] << endl;
}
int main()
{
drfl.set_on_monitoring_data(OnMonitoringDataCB);
}
This example registers a data monitoring callback that continuously prints the robot’s joint positions in real time as they are updated by the controller.