Class ReaderLocator

Inheritance Relationships

Base Type

Class Documentation

class ReaderLocator : public eprosima::fastrtps::rtps::RTPSMessageSenderInterface

Class ReaderLocator, contains information about a remote reader, without saving its state. It also implements RTPSMessageSenderInterface, so it can be used when separate sending is enabled.

Public Functions

virtual ~ReaderLocator()
ReaderLocator(RTPSWriter *owner, size_t max_unicast_locators, size_t max_multicast_locators)

Construct a ReaderLocator.

Parameters:
  • owner – Pointer to the RTPSWriter creating this object.

  • max_unicast_locators – Maximum number of unicast locators to hold.

  • max_multicast_locators – Maximum number of multicast locators to hold.

inline bool expects_inline_qos() const
inline bool is_local_reader() const
RTPSReader *local_reader()
inline void local_reader(RTPSReader *local_reader)
inline const GUID_t &remote_guid() const
inline LocatorSelectorEntry *general_locator_selector_entry()
inline LocatorSelectorEntry *async_locator_selector_entry()
bool start(const GUID_t &remote_guid, const ResourceLimitedVector<Locator_t> &unicast_locators, const ResourceLimitedVector<Locator_t> &multicast_locators, bool expects_inline_qos, bool is_datasharing = false)

Try to start using this object for a new matched reader.

Parameters:
  • remote_guid – GUID of the remote reader.

  • unicast_locators – Unicast locators of the remote reader.

  • multicast_locators – Multicast locators of the remote reader.

  • expects_inline_qos – Whether remote reader expects to receive inline QoS.

  • is_datasharing – Whether remote reader can be reached through datasharing.

Returns:

false when this object was already started, true otherwise.

bool update(const ResourceLimitedVector<Locator_t> &unicast_locators, const ResourceLimitedVector<Locator_t> &multicast_locators, bool expects_inline_qos)

Try to update information of this object.

Parameters:
  • unicast_locators – Unicast locators of the remote reader.

  • multicast_locators – Multicast locators of the remote reader.

  • expects_inline_qos – Whether remote reader expects to receive inline QoS.

Returns:

true when information has changed, false otherwise.

bool stop(const GUID_t &remote_guid)

Try to stop using this object for an unmatched reader.

Parameters:

remote_guid – GUID of the remote reader.

Returns:

true if this object was started for remote_guid, false otherwise.

void stop()

Try to stop using this object for an unmatched reader.

inline virtual bool destinations_have_changed() const override

Check if the destinations managed by this sender interface have changed.

Returns:

true if destinations have changed, false otherwise.

inline virtual GuidPrefix_t destination_guid_prefix() const override

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.

inline virtual const std::vector<GuidPrefix_t> &remote_participants() const override

Get the GUID prefix of all the destination participants.

Returns:

a const reference to a vector with the GUID prefix of all destination participants.

inline virtual const std::vector<GUID_t> &remote_guids() const override

Get the GUID of all destinations.

Returns:

a const reference to a vector with the GUID of all destinations.

virtual bool send(CDRMessage_t *message, std::chrono::steady_clock::time_point max_blocking_time_point) const override

Send a message through this interface.

Parameters:
  • message – Pointer to the buffer with the message already serialized.

  • max_blocking_time_point – Future timepoint where blocking send should end.

bool is_datasharing_reader() const

Check if the reader is datasharing compatible with this writer

Returns:

true if the reader datasharing compatible with this writer

inline IDataSharingNotifier *datasharing_notifier()
Returns:

The datasharing notifier for this reader or nullptr if the reader is not datasharing.

inline const IDataSharingNotifier *datasharing_notifier() const
Returns:

The datasharing notifier for this reader or nullptr if the reader is not datasharing.

void datasharing_notify()

Performs datasharing notification of changes on the state of a writer to the reader represented by this class.

inline size_t locators_size() const
inline virtual void lock() override

Lock the object.

inline virtual void unlock() override

Lock the object.