Key expression format handling for hiroz.
This crate provides key expression generation for mapping ROS 2 entities (nodes, topics, services, actions) to Zenoh key expressions.
Formats
hiroz supports multiple key expression formats:
-
RmwZenoh (default): Compatible with
rmw_zenoh_cpp, the official ROS 2 RMW implementation using Zenoh. Usesstrip_slashes()for topic key expressions and mangling for liveliness tokens. -
Ros2Dds: Compatible with
zenoh-plugin-ros2dds, useful for bridging between Zenoh and DDS networks.
no_std Support
This crate is no_std compatible with alloc:
[]
= { = "0.1", = false }
Example
use ;
let format = default; // RmwZenoh
let zid: ZenohId = "1234567890abcdef1234567890abcdef".parse.unwrap;
let node = new;
let entity = EndpointEntity ;
// Generate topic key expression
let topic_ke = format.topic_key_expr.unwrap;