Class Topic

Inheritance Relationships

Base Types

Class Documentation

class Topic : public eprosima::fastdds::dds::DomainEntity, public eprosima::fastdds::dds::TopicDescription

Class Topic, represents the fact that both publications and subscriptions are tied to a single data-type

Public Functions

virtual ~Topic()
virtual DomainParticipant *get_participant() const override

Getter for the DomainParticipant.

Returns

DomainParticipant pointer

ReturnCode_t get_inconsistent_topic_status(InconsistentTopicStatus &status)

Allows the application to retrieve the INCONSISTENT_TOPIC_STATUS status of a Topic.

Warning

Not supported yet. Currently returns RETCODE_UNSUPPORTED

Parameters

status – [out] Status to be retrieved.

Returns

RETCODE_OK

RTPS_DllAPI const TopicQos & get_qos () const

Allows accessing the Topic Qos.

Returns

reference to TopicQos

RTPS_DllAPI ReturnCode_t get_qos (TopicQos &qos) const

Retrieves the Topic Qos.

Parameters

qosTopicQos where the qos is returned

Returns

RETCODE_OK

RTPS_DllAPI ReturnCode_t set_qos (const TopicQos &qos)

Allows modifying the Topic Qos. The given Qos must be supported by the Topic.

Parameters

qos – new TopicQos value to set for the Topic.

Return values
  • RETCODE_IMMUTABLE_POLICY – if a change was not allowed.

  • RETCODE_INCONSISTENT_POLICY – if new qos has inconsistent values.

  • RETCODE_OK – if qos was updated.

RTPS_DllAPI const TopicListener * get_listener () const

Retrieves the attached TopicListener.

Returns

pointer to TopicListener

RTPS_DllAPI ReturnCode_t set_listener (TopicListener *listener, const StatusMask &mask=StatusMask::all())

Modifies the TopicListener.

Parameters
  • listener – new value for the TopicListener

  • maskStatusMask that holds statuses the listener responds to (default: all).

Returns

RETCODE_OK

virtual TopicDescriptionImpl *get_impl() const override

Protected Attributes

TopicProxy *impl_

Friends

friend class ::dds::topic::Topic