Skip to main content

Module types

Module types 

Source
Expand description

Parameter types for ROS 2 compatible parameter handling

This module provides types for representing ROS 2 parameters including scalar values, arrays, and parameter descriptors.

Structs§

CapacityExceeded
A value does not fit the compile-time parameter capacity.
FloatingPointRange
Floating point range constraints for parameters
IntegerRange
Integer range constraints for parameters
NodeFlags
A per-node bool, bounded by the key’s own range.
NodeKey
Which node a parameter belongs to.
Parameter
A named parameter with value and optional descriptor
ParameterDescriptor
Parameter descriptor containing metadata

Enums§

DescriptorText
One of a descriptor’s two prose fields. Each has its own capacity and its own knob, and a truncation report names both.
ParameterRange
Range constraints for a parameter
ParameterType
ROS 2 parameter types
ParameterValue
Parameter value container
SetParameterResultDeprecated
Result of setting a parameter

Constants§

IMPLIED_STORE_SLOTS
Slots of the parameter store this build KNOWS the image builds (the contract declares a parameter, the bringup declares param_services, or the launch seeds a <param>): the stated or declared MAX_PARAMETERS, else a small stock carve of 8; 0 when no store is implied.
MAX_ARRAY_LEN
Maximum length for array parameters (set via NROS_PARAMS_MAX_ARRAY_LEN, default 32).
MAX_BYTE_ARRAY_LEN
Maximum length for byte array parameters (set via NROS_PARAMS_MAX_BYTE_ARRAY_BYTES, default 256).
MAX_PARAMETERS
Maximum number of parameters the server can store (set via NROS_PARAMS_MAX_PARAMETERS, default 32).
MAX_PARAM_CONSTRAINTS_LEN
Maximum length for a parameter’s additional_constraints, in bytes (set via NROS_PARAMS_MAX_CONSTRAINTS_BYTES, default 0 = no constraint text).
MAX_PARAM_DESCRIPTION_LEN
Maximum length for a parameter description, in bytes (set via NROS_PARAMS_MAX_DESCRIPTION_BYTES, default 256; 0 = no descriptions).
MAX_PARAM_NAME_LEN
Maximum length for parameter names (set via NROS_PARAMS_MAX_NAME_BYTES, default 64).
MAX_STRING_ARRAY_LEN
Maximum elements in a string-array parameter (set via NROS_PARAMS_MAX_STRING_ARRAY_LEN, default 32); each element is bounded by MAX_STRING_VALUE_LEN.
MAX_STRING_VALUE_LEN
Maximum length for parameter string values (set via NROS_PARAMS_MAX_STRING_VALUE_BYTES, default 256).
PARAM_EVENTS_DEPTH
History depth of each node’s /parameter_events publisher (set via NROS_PARAMS_EVENTS_DEPTH; default 1000 on a hosted target, 1 otherwise).
STOCK_STORE_SLOTS
The carve for an image that builds a store but whose parameter count nobody stated or declared.

Traits§

ParameterVariant
Trait for types that can be used as typed parameters

Functions§

fit_description
Store as much of text as dst holds, cut at a UTF-8 character boundary. Returns whether anything was cut.