17.1.1.3.3. DataSharingQosPolicy

class eprosima::fastdds::dds::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

DataSharingQosPolicy()

Constructor.

~DataSharingQosPolicy() = default

Destructor.

DataSharingQosPolicy(const DataSharingQosPolicy &b)

Copy constructor.

Parameters

void clear() override

Clears the QosPolicy object.

const DataSharingKind &kind() const

Return

the current DataSharing configuration mode

const std::string &shm_directory() const

Return

the current DataSharing shared memory directory

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.

Return

the current DataSharing domain IDs

void set_max_domains(uint32_t size)

Parameters
  • size: the new maximum number of domain IDs

const uint32_t &max_domains() const

Return

the current configured maximum number of domain IDs

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.

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

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.

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

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.

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

void off()

Configures the DataSharing in disabled mode.

void add_domain_id(uint16_t id)

Adds a user-specific DataSharing domain ID.

Parameters
  • id: 16 bit identifier