For information on the latest version, please have a look at GL013301.
manage_access_control
This is a function for sending the control right request message to the robot controller, or for processing a user response when the control right request message is received.
Definition
DRFLEx.h within class CDRFLEx, public section (line 751)
bool manage_access_control(MANAGE_ACCESS_CONTROL eAccessControl = MANAGE_ACCESS_CONTROL_REQUEST) {
return _manage_access_control(_rbtCtrl, eAccessControl);
};
Parameter
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
eAccessControl |
MANAGE_ACCESS_CONTROL_REQUEST |
Specifies the type of control authority management command. |
Return
Value |
Type |
Description |
|---|---|---|
0 |
int |
Error — failed to send or process the control right message. |
1 |
int |
Success — successfully processed the control right request or response. |
Example
void OnMonitoringAccessControlCB(const MONITORING_ACCESS_CONTROL eAccCtrl)
{
switch(eAccCtrl) {
case MONITORING_ACCESS_CONTROL_DENY:
// Deny the transfer of control right
break;
default:
// Displays no control right message
break;
}
}
int main()
{
drfl.SetOnMonitoringAccessControl(OnMonitoringAccessControlCB);
// Requests transfer of control right
drfl.manage_access_control(MANAGE_ACCESS_CONTROL_REQUEST);
}
This example registers a callback function to monitor control-right events and sends a control right request to the robot controller. When executed, it requests authority to control the robot and handles responses (granted or denied) accordingly.