Class astutedds::rtps::ParameterListBuilder

ClassList > astutedds > rtps > ParameterListBuilder

Helper class for building parameter lists in little-endian CDR.

  • #include <endpoint_proxy.hpp>

Public Functions

Type Name
ParameterListBuilder ()
void add_content_filter_property (const std::vector< uint8_t > & payload)
Add PID_CONTENT_FILTER_PROPERTY (0x0035) parameter.
void add_data_representation (const std::vector< int16_t > & representations)
Add data representation QoS (variable length: 4 + 2*count)
void add_deadline (const Duration_t & period)
Add deadline QoS parameter (8 bytes: Duration)
void add_destination_order (dcps::DestinationOrderQosPolicyKind kind)
Add destination order QoS parameter (4 bytes)
void add_durability (dcps::DurabilityQosPolicyKind kind)
Add durability QoS parameter (4 bytes)
void add_expects_inline_qos (bool expects)
Add expects_inline_qos flag (4 bytes, boolean as uint32)
void add_guid (uint16_t pid, const GUID_t & guid)
Add a 16-byte GUID parameter.
void add_history (dcps::HistoryQosPolicyKind kind, int32_t depth)
Add history QoS parameter (8 bytes)
void add_liveliness (dcps::LivelinessQosPolicyKind kind, const Duration_t & lease_duration)
Add liveliness QoS parameter (12 bytes: kind + lease_duration)
void add_locator (uint16_t pid, const Locator_t & loc)
Add a locator parameter (24 bytes: kind + port + address)
void add_octet_sequence (uint16_t pid, const std::vector< uint8_t > & bytes)
Phase 2.11.f — Add a CDR sequence<octet> parameter.
void add_ownership (dcps::OwnershipQosPolicyKind kind)
Add ownership QoS parameter (4 bytes)
void add_ownership_strength (int32_t value)
Add ownership strength QoS parameter (4 bytes)
void add_partition (const std::vector< std::string > & partitions)
Add partition QoS parameter (CDR sequence of strings)
void add_presentation (dcps::PresentationQosPolicyAccessScopeKind scope, bool coherent, bool ordered)
Add presentation QoS parameter (8 bytes: scope + coherent + ordered + padding)
void add_protocol_version (uint8_t major, uint8_t minor)
Add protocol version parameter (4 bytes, padded)
void add_reliability (dcps::ReliabilityQosPolicyKind kind, const Duration_t & max_blocking_time=Duration_t)
Add reliability QoS parameter (12 bytes)
void add_resource_limits (int32_t max_samples, int32_t max_instances, int32_t max_samples_per_instance)
Add resource limits QoS (12 bytes)
void add_string (uint16_t pid, const std::string & str)
Add a string parameter (CDR format: length + data + null + padding)
void add_type_consistency (uint16_t kind, bool ignore_sequence_bounds, bool ignore_string_bounds, bool ignore_member_names, bool prevent_type_widening, bool force_type_validation)
Emit PID_TYPE_CONSISTENCY_ENFORCEMENT (0x0074).
void add_type_information_from_type_name (const std::string & typeName)
Add PID_TYPE_INFORMATION (0x0075) with minimal+complete TypeIdentifierWithSize.
void add_unicast_locator_ipv4 (uint16_t pid, const std::array< uint8_t, 4 > & ip, uint32_t port)
Add a locator from IP address and port.
void add_vendor_id (uint8_t v0, uint8_t v1)
Add vendor ID parameter (4 bytes, padded)
const std::vector< uint8_t > & buffer () const
Get the built parameter list buffer.
void finalize ()
Finalize the parameter list with PID_SENTINEL.
std::vector< uint8_t > take_buffer ()
Move the built buffer out.

Public Functions Documentation

function ParameterListBuilder

inline astutedds::rtps::ParameterListBuilder::ParameterListBuilder () 

function add_content_filter_property

Add PID_CONTENT_FILTER_PROPERTY (0x0035) parameter.

inline void astutedds::rtps::ParameterListBuilder::add_content_filter_property (
    const std::vector< uint8_t > & payload
) 

The payload is a pre-serialised ContentFilterProperty_t CDR-LE blob produced by dcps::ContentFilterProperty::serialize(). RTPS 2.5 §9.6.4.1 requires the parameter body to be 4-byte aligned; the codec already pads to that boundary, so we simply copy it in with the correct PID/len header.

Passing an empty payload is a no-op — SEDP announcements should omit PID_CONTENT_FILTER_PROPERTY entirely when the reader has no associated ContentFilteredTopic.


function add_data_representation

Add data representation QoS (variable length: 4 + 2*count)

inline void astutedds::rtps::ParameterListBuilder::add_data_representation (
    const std::vector< int16_t > & representations
) 


function add_deadline

Add deadline QoS parameter (8 bytes: Duration)

inline void astutedds::rtps::ParameterListBuilder::add_deadline (
    const Duration_t & period
) 


function add_destination_order

Add destination order QoS parameter (4 bytes)

inline void astutedds::rtps::ParameterListBuilder::add_destination_order (
    dcps::DestinationOrderQosPolicyKind kind
) 


function add_durability

Add durability QoS parameter (4 bytes)

inline void astutedds::rtps::ParameterListBuilder::add_durability (
    dcps::DurabilityQosPolicyKind kind
) 


function add_expects_inline_qos

Add expects_inline_qos flag (4 bytes, boolean as uint32)

inline void astutedds::rtps::ParameterListBuilder::add_expects_inline_qos (
    bool expects
) 


function add_guid

Add a 16-byte GUID parameter.

inline void astutedds::rtps::ParameterListBuilder::add_guid (
    uint16_t pid,
    const GUID_t & guid
) 


function add_history

Add history QoS parameter (8 bytes)

inline void astutedds::rtps::ParameterListBuilder::add_history (
    dcps::HistoryQosPolicyKind kind,
    int32_t depth
) 


function add_liveliness

Add liveliness QoS parameter (12 bytes: kind + lease_duration)

inline void astutedds::rtps::ParameterListBuilder::add_liveliness (
    dcps::LivelinessQosPolicyKind kind,
    const Duration_t & lease_duration
) 


function add_locator

Add a locator parameter (24 bytes: kind + port + address)

inline void astutedds::rtps::ParameterListBuilder::add_locator (
    uint16_t pid,
    const Locator_t & loc
) 


function add_octet_sequence

Phase 2.11.f — Add a CDR sequence<octet> parameter.

inline void astutedds::rtps::ParameterListBuilder::add_octet_sequence (
    uint16_t pid,
    const std::vector< uint8_t > & bytes
) 

Used for PID_USER_DATA (0x002c), PID_TOPIC_DATA (0x002e), and PID_GROUP_DATA (0x002d) as defined in DDS 1.4 §2.2.3.1/2/3 and RTPS 2.5 §9.6.4. Wire layout: uint32 length (LE) followed by bytes, padded to a 4-byte boundary. Empty payloads are a no-op — the SEDP announcement should omit the PID when the corresponding QoS was left default.


function add_ownership

Add ownership QoS parameter (4 bytes)

inline void astutedds::rtps::ParameterListBuilder::add_ownership (
    dcps::OwnershipQosPolicyKind kind
) 


function add_ownership_strength

Add ownership strength QoS parameter (4 bytes)

inline void astutedds::rtps::ParameterListBuilder::add_ownership_strength (
    int32_t value
) 


function add_partition

Add partition QoS parameter (CDR sequence of strings)

inline void astutedds::rtps::ParameterListBuilder::add_partition (
    const std::vector< std::string > & partitions
) 

Wire format: sequence length (uint32) followed by each string as CDR string (uint32 length including null + chars + null + padding).


function add_presentation

Add presentation QoS parameter (8 bytes: scope + coherent + ordered + padding)

inline void astutedds::rtps::ParameterListBuilder::add_presentation (
    dcps::PresentationQosPolicyAccessScopeKind scope,
    bool coherent,
    bool ordered
) 


function add_protocol_version

Add protocol version parameter (4 bytes, padded)

inline void astutedds::rtps::ParameterListBuilder::add_protocol_version (
    uint8_t major,
    uint8_t minor
) 


function add_reliability

Add reliability QoS parameter (12 bytes)

inline void astutedds::rtps::ParameterListBuilder::add_reliability (
    dcps::ReliabilityQosPolicyKind kind,
    const Duration_t & max_blocking_time=Duration_t {0, 100000000}
) 


function add_resource_limits

Add resource limits QoS (12 bytes)

inline void astutedds::rtps::ParameterListBuilder::add_resource_limits (
    int32_t max_samples,
    int32_t max_instances,
    int32_t max_samples_per_instance
) 


function add_string

Add a string parameter (CDR format: length + data + null + padding)

inline void astutedds::rtps::ParameterListBuilder::add_string (
    uint16_t pid,
    const std::string & str
) 


function add_type_consistency

Emit PID_TYPE_CONSISTENCY_ENFORCEMENT (0x0074).

inline void astutedds::rtps::ParameterListBuilder::add_type_consistency (
    uint16_t kind,
    bool ignore_sequence_bounds,
    bool ignore_string_bounds,
    bool ignore_member_names,
    bool prevent_type_widening,
    bool force_type_validation
) 

DDS-XTypes 1.3 §7.6.3.4 — reader-only policy propagated on SEDP DATA(r). Wire layout (8 bytes, little-endian): uint16 kind — 0 = DISALLOW, 1 = ALLOW uint8 ignore_sequence_bounds uint8 ignore_string_bounds uint8 ignore_member_names uint8 prevent_type_widening uint8 force_type_validation uint8 pad Matches the compact form used by RTI Connext, Fast DDS, and Cyclone.


function add_type_information_from_type_name

Add PID_TYPE_INFORMATION (0x0075) with minimal+complete TypeIdentifierWithSize.

inline void astutedds::rtps::ParameterListBuilder::add_type_information_from_type_name (
    const std::string & typeName
) 

This advertises XTypes TypeInformation (DDS-XTypes 1.3 §7.6.2.1). For now we derive a deterministic 14-byte hash from typeName so peers can detect presence and request TLS; full TypeObject-backed hashes can replace this when integrated with xtypes type registry.


function add_unicast_locator_ipv4

Add a locator from IP address and port.

inline void astutedds::rtps::ParameterListBuilder::add_unicast_locator_ipv4 (
    uint16_t pid,
    const std::array< uint8_t, 4 > & ip,
    uint32_t port
) 


function add_vendor_id

Add vendor ID parameter (4 bytes, padded)

inline void astutedds::rtps::ParameterListBuilder::add_vendor_id (
    uint8_t v0,
    uint8_t v1
) 


function buffer

Get the built parameter list buffer.

inline const std::vector< uint8_t > & astutedds::rtps::ParameterListBuilder::buffer () const


function finalize

Finalize the parameter list with PID_SENTINEL.

inline void astutedds::rtps::ParameterListBuilder::finalize () 


function take_buffer

Move the built buffer out.

inline std::vector< uint8_t > astutedds::rtps::ParameterListBuilder::take_buffer () 



The documentation for this class was generated from the following file include/astutedds/rtps/endpoint_proxy.hpp