Class RTPSWriter

Inheritance Relationships

Base Type

Class Documentation

class RTPSWriter : public eprosima::fastdds::rtps::Endpoint

Class RTPSWriter, manages the sending of data to the readers. Is always associated with a HistoryCache.

Public Functions

virtual FASTDDS_EXPORTED_API bool matched_reader_add (const SubscriptionBuiltinTopicData &info)=0

Add a matched reader represented by its attributes.

Parameters:

info – Subscription info of the reader being matched.

Returns:

True if added.

virtual FASTDDS_EXPORTED_API bool matched_reader_remove (const GUID_t &reader_guid)=0

Remove a matched reader.

Parameters:

reader_guid – GUID of the reader to remove.

Returns:

True if removed.

virtual FASTDDS_EXPORTED_API bool matched_reader_is_matched (const GUID_t &reader_guid)=0

Tells us if a specific Reader is matched against this writer.

Parameters:

reader_guid – GUID of the reader to check.

Returns:

True if it was matched.

virtual FASTDDS_EXPORTED_API void reader_data_filter (IReaderDataFilter *filter)=0

Set a content filter to perform content filtering on this writer.

This method sets a content filter that will be used to check whether a cache change is relevant for a reader or not.

Parameters:

filter – The content filter to use on this writer. May be nullptr to remove the content filter (i.e. treat all samples as relevant).

virtual FASTDDS_EXPORTED_API const IReaderDataFilter * reader_data_filter () const =0

Get the content filter used to perform content filtering on this writer.

Returns:

The content filter used on this writer.

virtual FASTDDS_EXPORTED_API bool has_been_fully_delivered (const SequenceNumber_t &seq_num) const =0

Check if a specific change has been delivered to the transport layer of every matched remote RTPSReader at least once.

Parameters:

seq_num – Sequence number of the change to check.

Returns:

true if delivered. False otherwise.

virtual FASTDDS_EXPORTED_API bool is_acked_by_all (const SequenceNumber_t &seq_num) const =0

Check if a specific change has been acknowledged by all Readers. Is only useful in reliable Writer. In BE Writers returns false when pending to be sent.

Parameters:

seq_num – Sequence number to check.

Returns:

True if acknowledged by all.

virtual FASTDDS_EXPORTED_API bool wait_for_all_acked (const dds::Duration_t &max_wait)=0

Waits until all changes were acknowledged or max_wait.

Parameters:

max_wait – Maximum time to wait.

Returns:

True if all were acknowledged.

virtual FASTDDS_EXPORTED_API void update_attributes (const WriterAttributes &att)=0

Update the Attributes of the Writer.

Parameters:

att – New attributes

virtual FASTDDS_EXPORTED_API WriterListener * get_listener () const =0

Get listener

Returns:

Listener

virtual FASTDDS_EXPORTED_API bool set_listener (WriterListener *listener)=0

Set the listener.

Parameters:

listener – Pointer to the listener.

Returns:

True if correctly set.

virtual FASTDDS_EXPORTED_API bool is_async () const =0

Get the publication mode

Returns:

publication mode

virtual FASTDDS_EXPORTED_API bool get_disable_positive_acks () const =0

Returns if disable positive ACKs QoS is enabled.

Returns:

Best effort writers always return false. Reliable writers override this method.

virtual FASTDDS_EXPORTED_API bool matched_readers_guids (std::vector< GUID_t > &guids) const =0

Fills the provided vector with the GUIDs of the matched readers.

Parameters:

guids[out] Vector to be filled with the GUIDs of the matched readers.

Returns:

True if the operation was successful.

Protected Functions

RTPSWriter(RTPSParticipantImpl *impl, const GUID_t &guid, const WriterAttributes &att)
virtual ~RTPSWriter()