| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
DataSharingQosPolicy Class Reference

Qos Policy to configure the data sharing. More...

`#include <QosPolicies.hpp>`

Inheritance diagram for DataSharingQosPolicy:
[legend]

## Public Member Functions

FASTDDS_EXPORTED_API | DataSharingQosPolicy ()
| Constructor.
virtual FASTDDS_EXPORTED_API | ~DataSharingQosPolicy ()=default
| Destructor.
FASTDDS_EXPORTED_API | DataSharingQosPolicy (const DataSharingQosPolicy &b)
| Copy constructor.
FASTDDS_EXPORTED_API DataSharingQosPolicy & | operator= (const DataSharingQosPolicy &b)
bool | operator== (const DataSharingQosPolicy &b) const
void | clear () override
| Clears the QosPolicy object.
FASTDDS_EXPORTED_API const DataSharingKind & | kind () const
FASTDDS_EXPORTED_API const std::string & | shm_directory () const
FASTDDS_EXPORTED_API const std::vector< uint64_t > & | domain_ids () const
| Gets the set of DataSharing domain IDs.
FASTDDS_EXPORTED_API void | set_max_domains (uint32_t size)
FASTDDS_EXPORTED_API const uint32_t & | max_domains () const
FASTDDS_EXPORTED_API void | automatic ()
| Configures the DataSharing in automatic mode.
FASTDDS_EXPORTED_API void | automatic (const std::vector< uint16_t > &domain_ids)
| Configures the DataSharing in automatic mode.
FASTDDS_EXPORTED_API void | automatic (const std::string &directory)
| Configures the DataSharing in automatic mode.
FASTDDS_EXPORTED_API void | automatic (const std::string &directory, const std::vector< uint16_t > &domain_ids)
| Configures the DataSharing in automatic mode.
FASTDDS_EXPORTED_API void | on (const std::string &directory)
| Configures the DataSharing in active mode.
FASTDDS_EXPORTED_API void | on (const std::string &directory, const std::vector< uint16_t > &domain_ids)
| Configures the DataSharing in active mode.
FASTDDS_EXPORTED_API void | off ()
| Configures the DataSharing in disabled mode.
FASTDDS_EXPORTED_API void | add_domain_id (uint16_t id)
| Adds a user-specific DataSharing domain ID.
void | add_domain_id (uint64_t id)
rtps::ThreadSettings & | data_sharing_listener_thread ()
| Getter for DataSharing listener thread ThreadSettings.
const rtps::ThreadSettings & | data_sharing_listener_thread () const
| Getter for DataSharing listener thread ThreadSettings.
void | data_sharing_listener_thread (const rtps::ThreadSettings &value)
| Setter for the DataSharing listener thread ThreadSettings.
Public Member Functions inherited from Parameter_t
FASTDDS_EXPORTED_API | Parameter_t ()
| Constructor without parameters.
FASTDDS_EXPORTED_API | Parameter_t (ParameterId_t pid, uint16_t length)
| Constructor using a parameter PID and the parameter length.
virtual FASTDDS_EXPORTED_API | ~Parameter_t ()
| Destructor.
bool | operator== (const Parameter_t &b) const
Public Member Functions inherited from QosPolicy
| QosPolicy ()
| Constructor without parameters.
| QosPolicy (bool send_always)
| Constructor.
| QosPolicy (const QosPolicy &b)=default
| Copy Constructor.
virtual | ~QosPolicy ()=default
| Destructor.
bool | operator== (const QosPolicy &b) const
QosPolicy & | operator= (const QosPolicy &b)=default
virtual bool | send_always () const
| Whether it should always be sent.

## Additional Inherited Members

Public Attributes inherited from Parameter_t
ParameterId_t | Pid
| Parameter ID. By default, PID_PAD.
uint16_t | length
| Parameter length. By default, 0.
Public Attributes inherited from QosPolicy
bool | hasChanged
| Boolean that indicates if the Qos has been changed with respect to the default Qos.
Protected Attributes inherited from QosPolicy
bool | send_always_
| Boolean that indicates if the Qos has to be sent even if it is not changed.

## Detailed Description

Qos Policy to configure the data sharing.

Note
  Immutable Qos Policy

## Constructor & Destructor Documentation

## ◆ DataSharingQosPolicy() [1/2]

FASTDDS_EXPORTED_API DataSharingQosPolicy | ( |  | ) |

inline

Constructor.

## ◆ ~DataSharingQosPolicy()

virtual FASTDDS_EXPORTED_API ~DataSharingQosPolicy | ( |  | ) |

virtual default

Destructor.

## ◆ DataSharingQosPolicy() [2/2]

FASTDDS_EXPORTED_API DataSharingQosPolicy | ( | const DataSharingQosPolicy & | b | ) |

inline

Copy constructor.

Parameters

  b | Another DataSharingQosPolicy instance

## Member Function Documentation

## ◆ add_domain_id() [1/2]

FASTDDS_EXPORTED_API void add_domain_id | ( | uint16_t | id | ) |

inline

Adds a user-specific DataSharing domain ID.

Parameters

  id | 16 bit identifier

## ◆ add_domain_id() [2/2]

void add_domain_id | ( | uint64_t | id | ) |

inline

## ◆ automatic() [1/4]

FASTDDS_EXPORTED_API void automatic | ( |  | ) |

inline

Configures the DataSharing in automatic mode.

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

## ◆ automatic() [2/4]

FASTDDS_EXPORTED_API void automatic | ( | const std::string & | directory | ) |

inline

Configures the DataSharing in automatic mode.

A default domain ID is automatically computed.

Parameters

  directory | The shared memory directory to use.

## ◆ automatic() [3/4]

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

inline

Configures the DataSharing in automatic mode.

Parameters

  directory | The shared memory directory to use.
  domain_ids | the user configured DataSharing domain IDs (16 bits).

## ◆ automatic() [4/4]

FASTDDS_EXPORTED_API void automatic | ( | const std::vector< uint16_t > & | domain_ids | ) |

inline

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

## ◆ clear()

void clear | ( |  | ) |

inline override virtual

Clears the QosPolicy object.

Implements QosPolicy.

## ◆ data_sharing_listener_thread() [1/3]

rtps::ThreadSettings & data_sharing_listener_thread | ( |  | ) |

inline

Getter for DataSharing listener thread ThreadSettings.

Returns
  rtps::ThreadSettings reference

## ◆ data_sharing_listener_thread() [2/3]

const rtps::ThreadSettings & data_sharing_listener_thread | ( |  | ) | const

inline

Getter for DataSharing listener thread ThreadSettings.

Returns
  rtps::ThreadSettings reference

## ◆ data_sharing_listener_thread() [3/3]

void data_sharing_listener_thread | ( | const rtps::ThreadSettings & | value | ) |

inline

Setter for the DataSharing listener thread ThreadSettings.

Parameters

  value | New ThreadSettings to be set

## ◆ domain_ids()

FASTDDS_EXPORTED_API const std::vector< uint64_t > & domain_ids | ( |  | ) | const

inline

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

## ◆ kind()

FASTDDS_EXPORTED_API const DataSharingKind & kind | ( |  | ) | const

inline

Returns
  the current DataSharing configuration mode

## ◆ max_domains()

FASTDDS_EXPORTED_API const uint32_t & max_domains | ( |  | ) | const

inline

Returns
  the current configured maximum number of domain IDs

## ◆ off()

FASTDDS_EXPORTED_API void off | ( |  | ) |

inline

Configures the DataSharing in disabled mode.

## ◆ on() [1/2]

FASTDDS_EXPORTED_API void on | ( | const std::string & | directory | ) |

inline

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.

## ◆ on() [2/2]

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

inline

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

## ◆ operator=()

FASTDDS_EXPORTED_API DataSharingQosPolicy & operator= | ( | const DataSharingQosPolicy & | b | ) |

inline

## ◆ operator==()

bool operator== | ( | const DataSharingQosPolicy & | b | ) | const

inline

## ◆ set_max_domains()

FASTDDS_EXPORTED_API void set_max_domains | ( | uint32_t | size | ) |

inline

Parameters

  size | the new maximum number of domain IDs

## ◆ shm_directory()

FASTDDS_EXPORTED_API const std::string & shm_directory | ( |  | ) | const

inline

Returns
  the current DataSharing shared memory directory

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

- include/fastdds/dds/core/policy/QosPolicies.hpp