Skip to main content

Module value

Module value 

Source
Expand description

Values of ROS 2 messages as a tree of named fields, to and from DynamicData.

Value is what a program that does not know the types at build time (a bridge to another middleware, a tool) works with: a struct is its fields by name, in order. MessageType::to_data makes the DynamicData of a value and checks it against the type: an integer out of the range of its field, a string longer than its bound, an array of another length or a sequence longer than its bound, a field the message does not have, are errors. Fields the value leaves out take their default (from the .msg file, else zero, empty). MessageType::from_data reads one back.

Enumsยง

Value
A value of a field of a ROS 2 message.