For information on the latest version, please have a look at 1.33.5.
set_on_tp_initializing_completed
This function registers a callback function that automatically checks whether initialization has been completed when the robot controller is initialized by the T/P application after booting. Use it to run your own code automatically when this event occurs.
Definition
DRFLEx.h within class CDRFLEx, public section
void set_on_tp_initializing_completed(TOnTpInitializingCompletedCB pCallbackFunc) {
_set_on_tp_initializing_completed(_rbtCtrl, pCallbackFunc);
};
Parameter
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
pCallbackFunc |
Refer to definition of callback function |
Return
None
Note
The callback is called once, the first time a robot state other than STATE_NOT_READY or STATE_INITIALIZING is received after registration, and is then unregistered. The controller reports the robot state when the connection is opened and whenever it changes. Register this callback before open_connection: if the controller is already initialised it is then called during connection. A callback registered after connecting to an idle controller is called at the next state change. Register it again after every open_connection.
Example
void OnTpInitializingCompletedCB()
{
// Requests control right after checking Tp initialization
printf("tp initializing completed\n");
drfl.manage_access_control(MANAGE_ACCESS_CONTROL_REQUEST);
}
drfl.set_on_tp_initializing_completed(OnTpInitializingCompletedCB);
Once registered, this callback executes automatically after the T/P (Teach Pendant) initialization process completes. It prints a message and requests control authority using manage_access_control(), allowing the external application to take control immediately after system boot.