Skip to main content

Module dds_type

Module dds_type 

Source
Expand description

DdsType — the trait that user types must implement to be sent over DDS.

§Usage

User types implement the trait either by hand or via the codegen pipeline zerodds-idl-rust (IDL → Rust with a derived DdsType impl). The encoder/decoder pairs follow the XCDR2 convention (see zerodds-cdr); the trait stays transport- and QoS-agnostic.

§Interop note

For interop with Cyclone/Fast-DDS, the TYPE_NAME MUST match the remote topic type name exactly (strict equality). IDL type namespacing (e.g. std_msgs::msg::String) must be taken into account.

Structs§

DdsAny
IDL any as a type-erasure wrapper. Carries a type-identifier string (e.g. "std_msgs::Header") plus the payload bytes.
DdsTypeRow
RowAccess adapter for a DdsType sample value. Used by the DataReader in read_w_condition/take_w_condition and by the ContentFilteredTopic filter.
PlainCdr2BeKeyHolder
Convenience builder for a PLAIN_CDR2-BE KeyHolder stream.
RawBytes
An opaque raw byte payload with a configurable type name (via an impl of BytesPayload<T> or a newtype).

Enums§

DecodeError
Placeholder error for DdsType::decode.
EncodeError
Placeholder error for DdsType::encode. In v1.3 this will be re-exported as zerodds_cdr::EncodeError once the CDR layer is stabilized from the DCPS perspective.
Extensibility
XTypes 1.3 §7.4.5 struct extensibility kind. Wire-relevant information for the sample encoder; mirrors the IDL annotations @final / @appendable / @mutable.

Constants§

KEY_HASH_LEN
Wire length of a KeyHash (spec: 16 bytes).

Traits§

DdsType
A type that can be published/subscribed via DDS.

Functions§

compute_key_hash
Computes the 16-byte KeyHash of an instance from the PLAIN_CDR2-BE serialized KeyHolder byte stream.

Type Aliases§

ExtensibilityKind
Spec-aligned alias: zerodds-xcdr2-rust §2 references the Extensibility enum under the name ExtensibilityKind. We keep Extensibility as the implementation name; both are identical via the alias.