pub struct GoalId {
pub uuid: [u8; 16],
}Expand description
Unique identifier for a goal
This is a 128-bit UUID matching unique_identifier_msgs/msg/UUID.
Fields§
§uuid: [u8; 16]UUID bytes in standard format
Implementations§
Source§impl GoalId
impl GoalId
Sourcepub const UUID_LEN: usize = 16
pub const UUID_LEN: usize = 16
Length of the goal UUID in bytes (ROS 2 unique_identifier_msgs/UUID).
Sourcepub const SEQ_PREFIX_LEN: usize = 0
pub const SEQ_PREFIX_LEN: usize = 0
Length of any CDR length-prefix preceding the goal UUID bytes — zero.
ROS 2 carries the goal id as unique_identifier_msgs/UUID, a fixed
uint8[16] array; CDR fixed arrays have no length prefix, so the goal
UUID sits directly after the CDR header. Pre-233.6 the action framing
wrote a u32(16) sequence prefix here (this const was 4), which
self-matched nano-ros peers but added 4 bytes a real rcl_action peer
rejects. Kept as a named 0 (rather than deleted) so the C/C++/Cyclone
framing calcs that read CDR_HEADER_LEN + SEQ_PREFIX_LEN + UUID_LEN stay
correct after the migration.
Sourcepub fn from_counter(counter: u64) -> GoalId
pub fn from_counter(counter: u64) -> GoalId
Create a GoalId from a simple counter (for testing/embedded use)
This creates a deterministic UUID-like identifier from a counter value. Not a true UUID, but useful for embedded systems without random number generators.