Crate oa_gateway_agra

Source
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§

Functions§

  • decode_hex 🔒
    Decode xs:hexBinary, tolerating the whitespace the type permits.
  • Convert a global element name (PositionReport) to MessageTypeEnum (POSITION_REPORT).
  • json_str 🔒
  • local_text 🔒
    Text of the first descendant element named local, ignoring whatever namespace prefix it carries.
  • Text of the UUID child nested inside the first descendant element named parent_local.
  • Whether xml nests elements deeper than limit, checked on the text rather than a parsed tree.
  • Parses xml into 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.
  • skip_past 🔒
    Bytes consumed if rest opens with open, through the matching close.
  • Unwrap OMS JSON or XML Rx/Tx envelopes into wrapper + inner envelopes.
  • unwrap_xml 🔒
  • 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 None if there is no element.