Skip to main content

Module request_size

Module request_size 

Source
Expand description

What a parameter-service REQUEST costs on the wire, from a node’s declared parameter shape and the parameter store’s capacities. The ONE formula for the request side. nros-node’s param_sizing::node_bound prices every parameter-service message with it (the inbox slot and the build-time check that a stated slot fits), and nros build prices the same requests from the contract to suggest a slot size before any build script runs. Two readers, one function: a second spelling of this arithmetic is how one formula’s inputs drift apart.

Pure arithmetic over counts. It reads no MAX_* of this crate, so a caller that has not built the store (the CLI) passes the capacities it would build with.

Structs§

ParamRequests
The three parameter-service requests’ worst size, for one node.
RequestCaps
The value capacities a request reaches the wire at: the store’s, clamped to the rcl_interfaces message’s own caps (Self::clamped).

Constants§

CDR_HEADER
The CDR encapsulation header.
CDR_SEQ
A sequence’s length word, worst-case padded.
CDR_STR
A string’s length word and NUL, worst-case padded.
CDR_VALUE_BASE
One ParameterValue with every member empty.
CDR_WORD
An 8-byte word, worst-case padded.
SHAPE_BOOL_ARRAYS
SHAPE_BYTE_ARRAYS
SHAPE_NAME_BYTES
SHAPE_PARAMS
Field indices of one node’s shape: the nine counts nros_cli_core::entity_inventory::ParamServiceShape::token writes, in order.
SHAPE_PREFIXES
SHAPE_PREFIX_BYTES
SHAPE_STRINGS
SHAPE_STRING_ARRAYS
SHAPE_WORD_ARRAYS
WIRE_SEQ_CAP
Capacity of every sequence member in the generated rcl_interfaces types (heapless::Vec<_, 64>). nros-node holds the drift guard against the generated messages (wire_capacities_match_the_generated_messages).
WIRE_STRING_CAP
Capacity of every string member in the generated rcl_interfaces types (heapless::String<256>). Same drift guard.

Functions§

names_bytes
The bytes a node’s names occupy in a request.
param_requests
One node’s three requests, at capacities c.
prefixes_bytes
The bytes a node’s prefixes occupy in a list_parameters request.
values_bytes
The bytes a node’s values occupy in a set_parameters request (and a get_parameters reply), at capacities c.
worst_request_slot
The largest request any of shapes’ nodes can produce at capacities c, rounded up to the 4-byte slot alignment the inbox uses.