Class GenericDataQosPolicy

Inheritance Relationships

Base Types

Class Documentation

class GenericDataQosPolicy : public eprosima::fastdds::dds::Parameter_t, public eprosima::fastdds::dds::QosPolicy, public eprosima::fastrtps::ResourceLimitedVector<fastrtps::rtps::octet>

Class GenericDataQosPolicy, base class to transmit user data during the discovery phase.

Public Functions

inline RTPS_DllAPI GenericDataQosPolicy(ParameterId_t pid)
inline RTPS_DllAPI GenericDataQosPolicy(ParameterId_t pid, uint16_t in_length)
inline RTPS_DllAPI GenericDataQosPolicy(const GenericDataQosPolicy &data)

Construct from another GenericDataQosPolicy.

The resulting GenericDataQosPolicy will have the same size limits as the input attribute

Parameters:

data – data to copy in the newly created object

inline RTPS_DllAPI GenericDataQosPolicy(ParameterId_t pid, const collection_type &data)

Construct from underlying collection type.

Useful to easy integration on old APIs where a traditional container was used. The resulting GenericDataQosPolicy will always be unlimited in size

Parameters:
  • pid – Id of the parameter

  • data – data to copy in the newly created object

virtual RTPS_DllAPI ~GenericDataQosPolicy() = default
inline GenericDataQosPolicy &operator=(const collection_type &b)

Copies data from underlying collection type.

Useful to easy integration on old APIs where a traditional container was used. The resulting GenericDataQosPolicy will keep the current size limit. If the input data is larger than the current limit size, the elements exceeding that maximum will be silently discarded.

Parameters:

b – object to be copied

Returns:

reference to the current object.

inline GenericDataQosPolicy &operator=(const GenericDataQosPolicy &b)

Copies another GenericDataQosPolicy.

The resulting GenericDataQosPolicy will have the same size limit as the input parameter, so all data in the input will be copied.

Parameters:

b – object to be copied

Returns:

reference to the current object.

inline bool operator==(const GenericDataQosPolicy &b) const
inline bool operator==(const collection_type &b) const
inline void set_max_size(size_t size)

Set the maximum size of the user data and reserves memory for that much.

Parameters:

size – new maximum size of the user data. Zero for unlimited size

inline void resize(size_t new_size)
inline const collection_type &dataVec() const
Returns:

const reference to the internal raw data.

inline virtual void clear() override

Clears the QosPolicy object.

inline RTPS_DllAPI const collection_type & data_vec () const

Returns raw data vector.

Returns:

raw data as vector of octets.

inline RTPS_DllAPI collection_type & data_vec ()

Returns raw data vector.

Returns:

raw data as vector of octets.

inline RTPS_DllAPI void data_vec (const collection_type &vec)

Sets raw data vector.

Parameters:

vec – raw data to set.

inline RTPS_DllAPI const collection_type & getValue () const

Returns raw data vector.

Returns:

raw data as vector of octets.

inline RTPS_DllAPI void setValue (const collection_type &vec)

Sets raw data vector.

Parameters:

vec – raw data to set.