Expand description
The C ABI for the ROS 2 naming and encoding rules.
These wrap [pamoja_ros2] for callers that reach the SDK through the flat C
boundary: what makes a topic name legal, what it becomes on the DDS wire, the
RIHS type hash that identifies a message definition, and the CDR encoding the
payload itself is written in.
None of it needs a ROS 2 installation, which is the point. A gateway can
validate a name, derive the DDS topic and the Zenoh key an rmw_zenoh peer
subscribes on, and encode a geometry_msgs/msg/Twist without linking against
anything from a ROS distribution. Driving a live graph does need one, so the
bridge feature stays Rust-only.
Structs§
- Pamoja
CdrReader - An opaque handle to a CDR decoder.
- Pamoja
CdrWriter - An opaque handle to a CDR encoder.
- Pamoja
Ros2 Twist - A body velocity command, matching
geometry_msgs/msg/Twist. - Pamoja
Type Hash - A RIHS01 type hash: the 32-byte digest that identifies a message definition.
- Pamoja
Vector3 - A three-dimensional vector, matching
geometry_msgs/msg/Vector3.
Enums§
- Pamoja
Entity Kind - The ROS 2 subsystem a name belongs to, which fixes its DDS prefix.
Constants§
- PAMOJA_
TYPE_ HASH_ LEN - The number of bytes in a RIHS01 type hash digest.
Functions§
- pamoja_
cdr_ ⚠reader_ free - Releases a CDR decoder handle.
- pamoja_
cdr_ ⚠reader_ new - Creates a CDR decoder over encoded bytes.
- pamoja_
cdr_ ⚠reader_ read_ f32 - Reads the next 32-bit float.
- pamoja_
cdr_ ⚠reader_ read_ f64 - Reads the next 64-bit float.
- pamoja_
cdr_ ⚠reader_ read_ i32 - Reads the next 32-bit signed integer.
- pamoja_
cdr_ ⚠reader_ read_ u32 - Reads the next 32-bit unsigned integer.
- pamoja_
cdr_ ⚠writer_ free - Releases a CDR encoder handle.
- pamoja_
cdr_ ⚠writer_ into_ bytes - Takes the encoded bytes, consuming the encoder.
- pamoja_
cdr_ writer_ new - Creates a CDR encoder with the encapsulation header already written.
- pamoja_
cdr_ ⚠writer_ write_ f32 - Appends a 32-bit float.
- pamoja_
cdr_ ⚠writer_ write_ f64 - Appends a 64-bit float.
- pamoja_
cdr_ ⚠writer_ write_ i32 - Appends a 32-bit signed integer.
- pamoja_
cdr_ ⚠writer_ write_ u32 - Appends a 32-bit unsigned integer.
- pamoja_
ros2_ ⚠dds_ topic - Returns the DDS topic a fully qualified ROS 2 name maps onto.
- pamoja_
ros2_ ⚠dds_ type_ name - Returns the DDS type name a ROS 2 interface type maps onto.
- pamoja_
ros2_ ⚠entity_ key - Builds the Zenoh key an
rmw_zenohpeer publishes an entity on. - pamoja_
ros2_ entity_ kind_ prefix - Returns the DDS topic prefix a subsystem uses.
- pamoja_
ros2_ ⚠name_ is_ fully_ qualified - Reports whether a name is fully qualified, so it resolves with no namespace.
- pamoja_
ros2_ ⚠name_ is_ valid - Reports whether a string is a valid ROS 2 topic or service name.
- pamoja_
ros2_ ⚠percent_ mangle - Percent-mangles a name the way a DDS partition requires.
- pamoja_
ros2_ ⚠twist_ from_ cdr - Decodes a twist from its CDR representation.
- pamoja_
ros2_ twist_ to_ cdr - Encodes a twist into its CDR representation.
- pamoja_
ros2_ ⚠type_ hash_ parse - Parses a RIHS01 type hash string.
- pamoja_
ros2_ type_ hash_ to_ string - Renders a type hash back to its RIHS01 string.