Class RTPSMessageSenderInterface
Defined in File RTPSMessageSenderInterface.hpp
Class Documentation
-
class RTPSMessageSenderInterface
Interface to handle destinations management and message sending.
Public Functions
-
virtual ~RTPSMessageSenderInterface() = default
-
virtual bool destinations_have_changed() const = 0
Check if the destinations managed by this sender interface have changed.
- Returns:
true if destinations have changed, false otherwise.
-
virtual GuidPrefix_t destination_guid_prefix() const = 0
Get a GUID prefix representing all destinations.
- Returns:
When all the destinations share the same prefix (i.e. belong to the same participant) that prefix is returned. When there are no destinations, or they belong to different participants, c_GuidPrefix_Unknown is returned.
-
virtual const std::vector<GuidPrefix_t> &remote_participants() const = 0
Get the GUID prefix of all the destination participants.
- Returns:
a const reference to a vector with the GUID prefix of all destination participants.
-
virtual const std::vector<GUID_t> &remote_guids() const = 0
Get the GUID of all destinations.
- Returns:
a const reference to a vector with the GUID of all destinations.
-
virtual bool send(const std::vector<eprosima::fastdds::rtps::NetworkBuffer> &buffers, const uint32_t &total_bytes, std::chrono::steady_clock::time_point max_blocking_time_point) const = 0
Send a message through this interface.
- Parameters:
buffers – Vector of NetworkBuffers to send with data already serialized.
total_bytes – Total number of bytes to send. Should be equal to the sum of the
size
field of all buffers.max_blocking_time_point – Future timepoint where blocking send should end.
-
virtual void lock() = 0
Lock the object.
-
virtual void unlock() = 0
Lock the object.
-
virtual ~RTPSMessageSenderInterface() = default