staubli_driver_ros2 main
ROS2 control driver for Staubli robots
Loading...
Searching...
No Matches
Public Member Functions | List of all members
staubli_robot_driver::RealTimeSocketInterface< MessageSub, MessagePub > Class Template Reference

Bilateral real-time socket interface for pub/sub communication. More...

#include <real_time_socket_interface.hpp>

Inheritance diagram for staubli_robot_driver::RealTimeSocketInterface< MessageSub, MessagePub >:
[legend]
Collaboration diagram for staubli_robot_driver::RealTimeSocketInterface< MessageSub, MessagePub >:
[legend]

Public Member Functions

 RealTimeSocketInterface (std::shared_ptr< Socket > socket)
 
 ~RealTimeSocketInterface ()
 
bool send_message (const MessagePub &msg)
 Serialize and send a message over the socket.
 
bool is_ready () const override
 Check if the interface is ready (socket connected and receiving)
 
- Public Member Functions inherited from staubli_robot_driver::RealTimeSocketSubscriber< MessageSub >
 RealTimeSocketSubscriber (std::shared_ptr< Socket > socket)
 
virtual ~RealTimeSocketSubscriber ()
 
bool read_message (MessageSub &msg, MessageStatus &status)
 Read the latest message and check for lost packages and staleness.
 

Additional Inherited Members

- Protected Member Functions inherited from staubli_robot_driver::RealTimeSocketSubscriber< MessageSub >
bool init_communication ()
 
void update_message (std::vector< uint8_t > &data, size_t bytes_transferred)
 
void handle_error (const std::string &error_msg)
 
- Protected Attributes inherited from staubli_robot_driver::RealTimeSocketSubscriber< MessageSub >
std::shared_ptr< Socketsocket_
 
size_t last_read_sequence_number_
 Sequence number of the last read RobotStateMessage.
 
rclcpp::Logger logger_
 

Detailed Description

template<typename MessageSub, typename MessagePub>
class staubli_robot_driver::RealTimeSocketInterface< MessageSub, MessagePub >

Bilateral real-time socket interface for pub/sub communication.

Template Parameters
MessageSubType of message to subscribe to
MessagePubType of message to publish

Constructor & Destructor Documentation

◆ RealTimeSocketInterface()

staubli_robot_driver::RealTimeSocketInterface< MessageSub, MessagePub >::RealTimeSocketInterface ( std::shared_ptr< Socket socket)
explicit

◆ ~RealTimeSocketInterface()

Member Function Documentation

◆ send_message()

Serialize and send a message over the socket.

Warning
This is a blocking call.
Parameters
msgMessage to send
Returns
true if the message was sent successfully, false otherwise

◆ is_ready()

Check if the interface is ready (socket connected and receiving)

Returns
true if the interface is ready, false otherwise

Reimplemented from staubli_robot_driver::RealTimeSocketSubscriber< MessageSub >.


The documentation for this class was generated from the following file: