Breadcrumbs

CDRFLEx.set_on_monitoring_data

Features

This is a function for registering the callback function that automatically checks information on operation data of the robot such as the current location in 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

TOnMonitoringDataCB

-

Refer to definition of callback function

Return

None

Example

C++
void OnMonitoringDataCB(const LPMONITORING_DATA pData)
{
// Displays the joint space robot location 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);
}