Class DataSharingQosPolicy

Inheritance Relationships

Base Types

Class Documentation

class DataSharingQosPolicy : public eprosima::fastdds::dds::Parameter_t, public eprosima::fastdds::dds::QosPolicy

Qos Policy to configure the data sharing

Note

Immutable Qos Policy

Public Functions

inline RTPS_DllAPI DataSharingQosPolicy()

Constructor.

virtual RTPS_DllAPI ~DataSharingQosPolicy() = default

Destructor.

inline RTPS_DllAPI DataSharingQosPolicy(const DataSharingQosPolicy &b)

Copy constructor.

Parameters

b – Another DataSharingQosPolicy instance

inline RTPS_DllAPI DataSharingQosPolicy & operator= (const DataSharingQosPolicy &b)
inline bool operator==(const DataSharingQosPolicy &b) const
inline virtual void clear() override

Clears the QosPolicy object.

inline RTPS_DllAPI const DataSharingKind & kind () const
Returns

the current DataSharing configuration mode

inline RTPS_DllAPI const std::string & shm_directory () const
Returns

the current DataSharing shared memory directory

inline RTPS_DllAPI const std::vector< uint64_t > & domain_ids () const

Gets the set of DataSharing domain IDs.

Each domain ID is 64 bit long. However, user-defined domain IDs are only 16 bit long, while the rest of the 48 bits are used for the automatically generated domain ID (if any).

  • Automatic domain IDs use the 48 MSB and leave the 16 LSB as zero.

  • User defined domain IDs use the 16 LSB and leave the 48 MSB as zero.

Returns

the current DataSharing domain IDs

inline RTPS_DllAPI void set_max_domains (uint32_t size)
Parameters

size – the new maximum number of domain IDs

inline RTPS_DllAPI const uint32_t & max_domains () const
Returns

the current configured maximum number of domain IDs

inline RTPS_DllAPI void automatic ()

Configures the DataSharing in automatic mode.

The default shared memory directory of the OS is used. A default domain ID is automatically computed.

inline RTPS_DllAPI void automatic (const std::vector< uint16_t > &domain_ids)

Configures the DataSharing in automatic mode.

The default shared memory directory of the OS is used.

Parameters

domain_ids – the user configured DataSharing domain IDs (16 bits).

inline RTPS_DllAPI void automatic (const std::string &directory)

Configures the DataSharing in automatic mode.

A default domain ID is automatically computed.

Parameters

directory – The shared memory directory to use.

inline RTPS_DllAPI void automatic (const std::string &directory, const std::vector< uint16_t > &domain_ids)

Configures the DataSharing in automatic mode.

Parameters
  • directory – The shared memory directory to use.

  • domain_ids – the user configured DataSharing domain IDs (16 bits).

inline RTPS_DllAPI void on (const std::string &directory)

Configures the DataSharing in active mode.

A default domain ID is automatically computed.

Parameters

directory – The shared memory directory to use. It is mandatory to provide a non-empty name or the creation of endpoints will fail.

inline RTPS_DllAPI void on (const std::string &directory, const std::vector< uint16_t > &domain_ids)

Configures the DataSharing in active mode.

Parameters
  • directory – The shared memory directory to use. It is mandatory to provide a non-empty name or the creation of endpoints will fail.

  • domain_ids – the user configured DataSharing domain IDs (16 bits).

inline RTPS_DllAPI void off ()

Configures the DataSharing in disabled mode.

inline RTPS_DllAPI void add_domain_id (uint16_t id)

Adds a user-specific DataSharing domain ID.

Parameters

id – 16 bit identifier

inline void add_domain_id(uint64_t id)