disconnect_rt_control

This function terminates the active UDP real-time control session established with the robot controller. It safely closes the RT communication channel and resets all internal RT configurations.

Definition
DRFLEx.h within class CDRFLEx, public section

bool disconnect_rt_control() {
    return _disconnect_rt_control(_rbtCtrlUDP);
};

Parameter
None

Return

Value

Description

1

Disconnection successful.

0

Disconnection failed (e.g., already disconnected or invalid handle).

Note

  • Disconnecting automatically resets all RT configurations and internal handles.

  • Recommended after calling stop_rt_control to ensure a clean shutdown.

Example

drfl.connect_rt_control("192.168.137.100", 12347);
drfl.start_rt_control();

// Stop streaming and close the UDP channel
drfl.stop_rt_control();
drfl.disconnect_rt_control();

In this example, the function safely closes the active UDP RT control session and resets internal configurations used for real-time streaming.

Tips

  • Always stop RT streaming before disconnecting.

  • Use only once per session; the destructor will also release the handle if still active.

  • Reconnect via connect_rt_control to start a new RT session.