stop_rt_control

This function stops the Real-time (RT) input/output streaming that was previously started by start_rt_control. It safely terminates the real-time data exchange between the PC and the robot controller.

Definition
DRFLEx.h within class CDRFLEx, public section (line 590)

bool stop_rt_control() {
    return _stop_rt_control(_rbtCtrlUDP);
};

Parameter
None

Return

Value

Description

1

Successfully stopped real-time communication.

0

Failed to stop (e.g., stream not active or invalid handle).

Note

Example

// Connect and configure
drfl.connect_rt_control("192.168.137.100", 12347);
std::string version = "v1.0";
float period = 0.001f;  // 1 msec = 1 kHz
int lossCount = 4;

drfl.set_rt_control_output(version, period, lossCount);
drfl.start_rt_control();

// Perform RT operations
// ...

// Stop real-time communication
drfl.stop_rt_control();

// Finally disconnect
drfl.disconnect_rt_control();

In this example, the function stops the ongoing RT data exchange so that resources can be safely released or reconfigured before disconnection.

Tips

  • Always stop RT streaming before disconnecting the UDP channel.

  • Recommended when changing RT version, period, or communication direction.

  • Prevents residual data packets and ensures clean session closure.