@@ -231,6 +231,9 @@ class RTDEClient
231231 comm::INotifier notifier_;
232232 std::unique_ptr<comm::Pipeline<RTDEPackage>> pipeline_;
233233 RTDEWriter writer_;
234+ bool reconnecting_;
235+ std::mutex reconnect_mutex_;
236+ std::thread reconnecting_thread_;
234237
235238 VersionInformation urcontrol_version_;
236239
@@ -249,12 +252,13 @@ class RTDEClient
249252 // the robot is booted.
250253 std::vector<std::string> ensureTimestampIsPresent (const std::vector<std::string>& output_recipe) const ;
251254
252- void setupCommunication (const size_t max_num_tries = 0 ,
253- const std::chrono::milliseconds reconnection_time = std::chrono::seconds( 10 ) );
255+ bool setupCommunication ();
256+ uint16_t setProtocolVersion ( );
254257 bool negotiateProtocolVersion (const uint16_t protocol_version);
255- void queryURControlVersion ();
256- void setupOutputs (const uint16_t protocol_version);
257- void setupInputs ();
258+ bool queryURControlVersion ();
259+ bool setTargetFrequency ();
260+ bool setupOutputs (const uint16_t protocol_version);
261+ bool setupInputs ();
258262 void disconnect ();
259263
260264 /* !
@@ -288,6 +292,12 @@ class RTDEClient
288292 * \returns A vector of variable variable_names
289293 */
290294 std::vector<std::string> splitVariableTypes (const std::string& variable_types) const ;
295+
296+ /* !
297+ * \brief Reconnects to the RTDE interface and set the input and output recipes again.
298+ */
299+ void reconnect ();
300+ void reconnectCallback ();
291301};
292302
293303} // namespace rtde_interface
0 commit comments