| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
Topic Class Reference
eProsima Fast DDS API Reference » DDS Public API

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

`#include <Topic.hpp>`

Inheritance diagram for Topic:
[legend]

## Public Member Functions

virtual | ~Topic ()
virtual DomainParticipant * | get_participant () const override
| Getter for the DomainParticipant.
FASTDDS_EXPORTED_API ReturnCode_t | get_inconsistent_topic_status (InconsistentTopicStatus &status)
| Allows the application to retrieve the INCONSISTENT_TOPIC_STATUS status of a Topic.
FASTDDS_EXPORTED_API const TopicQos & | get_qos () const
| Allows accessing the Topic Qos.
FASTDDS_EXPORTED_API ReturnCode_t | get_qos (TopicQos &qos) const
| Retrieves the Topic Qos.
FASTDDS_EXPORTED_API ReturnCode_t | set_qos (const TopicQos &qos)
| Allows modifying the Topic Qos.
FASTDDS_EXPORTED_API const TopicListener * | get_listener () const
| Retrieves the attached TopicListener.
FASTDDS_EXPORTED_API ReturnCode_t | set_listener (TopicListener *listener, const StatusMask &mask=StatusMask::all())
| Modifies the TopicListener.
TopicDescriptionImpl * | get_impl () const override
Public Member Functions inherited from DomainEntity
| DomainEntity (const StatusMask &mask=StatusMask::all())
| Constructor.
Public Member Functions inherited from Entity
FASTDDS_EXPORTED_API | Entity (const StatusMask &mask=StatusMask::all())
| Constructor.
virtual ReturnCode_t | enable ()
| This operation enables the Entity.
void | close ()
| This operation disables the Entity before closing it.
FASTDDS_EXPORTED_API const StatusMask & | get_status_mask () const
| Retrieves the set of relevant statuses for the Entity.
FASTDDS_EXPORTED_API const StatusMask & | get_status_changes () const
| Retrieves the set of triggered statuses in the Entity.
const InstanceHandle_t & | get_instance_handle () const
| Retrieves the instance handler that represents the Entity.
FASTDDS_EXPORTED_API bool | is_enabled () const
| Checks if the Entity is enabled.
FASTDDS_EXPORTED_API bool | operator== (const Entity &other) const
FASTDDS_EXPORTED_API StatusCondition & | get_statuscondition ()
| Allows access to the StatusCondition associated with the Entity.
FASTDDS_EXPORTED_API const StatusCondition & | get_statuscondition () const
| Allows access to the StatusCondition associated with the Entity.
Public Member Functions inherited from TopicDescription
const std::string & | get_name () const
| Get the name used to create this TopicDescription.
const std::string & | get_type_name () const
| Get the associated type name.

## Protected Attributes

TopicProxy * | impl_
Protected Attributes inherited from Entity
StatusMask | status_mask_
| StatusMask with relevant statuses set to 1.
StatusCondition | status_condition_
| Condition associated to the Entity.
InstanceHandle_t | instance_handle_
| InstanceHandle associated to the Entity.
bool | enable_
| Boolean that states if the Entity is enabled or disabled.
Protected Attributes inherited from TopicDescription
std::string | name_
| Name that allows the TopicDescription to be retrieved locally.
std::string | type_name_
| Name that defines a unique resulting type for the publication or the subscription.

## Friends

class | TopicProxy
class | DomainParticipantImpl
class | ::dds::topic::Topic

## Additional Inherited Members

Protected Member Functions inherited from Entity
FASTDDS_EXPORTED_API void | set_instance_handle (const InstanceHandle_t &handle)
| Setter for the Instance Handle.
Protected Member Functions inherited from TopicDescription
| TopicDescription (const std::string &name, const std::string &type_name)
virtual | ~TopicDescription ()

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ ~Topic()

virtual ~Topic | ( |  | ) |

virtual

## Member Function Documentation

## ◆ get_impl()

TopicDescriptionImpl * get_impl | ( |  | ) | const

override virtual

Implements TopicDescription.

## ◆ get_inconsistent_topic_status()

FASTDDS_EXPORTED_API ReturnCode_t get_inconsistent_topic_status | ( | InconsistentTopicStatus & | status | ) |

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

Parameters

  status | [out] Status to be retrieved.

Returns
  RETCODE_OK

Warning
  Not supported yet. Currently returns RETCODE_UNSUPPORTED

## ◆ get_listener()

FASTDDS_EXPORTED_API const TopicListener * get_listener | ( |  | ) | const

Retrieves the attached TopicListener.

Returns
  pointer to TopicListener

## ◆ get_participant()

virtual DomainParticipant * get_participant | ( |  | ) | const

override virtual

Getter for the DomainParticipant.

Returns
  DomainParticipant pointer

Implements TopicDescription.

## ◆ get_qos() [1/2]

FASTDDS_EXPORTED_API const TopicQos & get_qos | ( |  | ) | const

Allows accessing the Topic Qos.

Returns
  reference to TopicQos

## ◆ get_qos() [2/2]

FASTDDS_EXPORTED_API ReturnCode_t get_qos | ( | TopicQos & | qos | ) | const

Retrieves the Topic Qos.

Parameters

  qos | TopicQos where the qos is returned

Returns
  RETCODE_OK

## ◆ set_listener()

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

Modifies the TopicListener.

Parameters

  listener | new value for the TopicListener
  mask | StatusMask that holds statuses the listener responds to (default: all).

Returns
  RETCODE_OK

## ◆ set_qos()

FASTDDS_EXPORTED_API 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.

## Friends And Related Symbol Documentation

## ◆ ::dds::topic::Topic

friend class ::dds::topic::Topic

friend

## ◆ DomainParticipantImpl

friend class DomainParticipantImpl

friend

## ◆ TopicProxy

friend class TopicProxy

friend

## Member Data Documentation

## ◆ impl_

TopicProxy* impl_

protected

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

- include/fastdds/dds/topic/Topic.hpp