Expand description
A-GRA offboard payload envelopes.
External MA interfaces (MA-C2, MA-MA) wrap inner UCI messages as hexBinary
inside MA_RxDataPayload (offboard → MA) or
MA_TxDataPayloadCommand (MA → offboard). Platform
interfaces (MA-VI, MA-MS) use native MTs and do not go through this codec.
The engine stays wrapper-agnostic: this crate turns envelopes inside out.
Structs§
- Result of peeling an Rx/Tx wrapper.
- Inputs for building an Rx or Tx wrapper around an inner UCI payload.
- Classification / header shell supplied by the caller — we do not invent markings.
- Metadata lifted off the wrapper (not the inner UCI message).
Enums§
Constants§
- Largest payload an
EncodedPayloadelement may decode to. - Deepest element nesting a wrapper document is allowed before parsing is refused outright.
Functions§
- Decode
xs:hexBinary, tolerating the whitespace the type permits. - Convert a global element name (
PositionReport) toMessageTypeEnum(POSITION_REPORT). - json_
str 🔒 - Text of the first descendant element named
local, ignoring whatever namespace prefix it carries. - Text of the
UUIDchild nested inside the first descendant element namedparent_local. - Whether
xmlnests elements deeper thanlimit, checked on the text rather than a parsed tree. - Parses
xmlinto a tree, refusing anything nested deep enough to be a stack-overflow attempt before roxmltree — which has no depth limit of its own — ever recurses into it. - Bytes consumed by a start tag, and whether it closed itself.
- Bytes consumed if
restopens withopen, through the matchingclose. - Unwrap OMS JSON or XML Rx/Tx envelopes into wrapper + inner envelopes.
- Builds wrapper and inner envelopes from structured Rx/Tx fields.
- Wrap an inner UCI payload (XML or OMS JSON bytes) as hexBinary inside Rx/Tx OMS JSON.
- Detect whether OMS JSON (or XML document element) is an Rx/Tx wrapper.
- Local name of an XML document element, or
Noneif there is no element.