CARLA
Loading...
Searching...
No Matches
carla::ros2::CdrTopicInfo< T > Struct Template Reference

Per-type metadata needed by the middleware layer. More...

Detailed Description

template<typename T>
struct carla::ros2::CdrTopicInfo< T >

Per-type metadata needed by the middleware layer.

type_name() — ROS2-compatible type name string used when registering the type with a DomainParticipant. Follows the "pkg::msg::dds_::TypeName_" pattern.

type_hash() — REP-2011 RIHS01 type hash string, placed in the DDS endpoint USER_DATA QoS policy (PID_USER_DATA, 0x002c per OMG DDSI-RTPS v2.5 §9.6.2.2.2). Format: "RIHS01_<64 lowercase hex>" (71 chars). Consumed by UserDataFormat.h to build the REP-2016 KV payload "typehash=RIHS01_<hex>;". The hash is pinned per message definition and is stable across ROS 2 distributions. A specialization may return nullptr when no hash is available for the type; UserDataFormat.h then emits an empty user_data payload and callers skip setting the QoS field. To compute the hash for a new type, use Util/ros2/compute_type_hash.sh (Docker required). Full workflow: Docs/ros2/adding_message_types.md.

max_serialized_size() — Initial preallocation hint for the CDR payload size in bytes, excluding the 4-byte DDS encapsulation header. Used by FastDDS to pre-allocate payload buffers. For types with variable-length fields (strings, vectors) this is a minimum hint, not a hard limit. The actual size per message instance is computed dynamically by cdr_serialized_size().

Primary template is intentionally undefined — only specializations are valid.

Definition at line 91 of file CdrTopicInfo.h.


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