ExIcaoVds.MessageZone
(ex_icao_vds v0.3.2)
Copy Markdown
VDS message zone: an ordered list of TLV-encoded feature fields.
Binary format (each feature)
<<tag::8, length_prefix::variable, value::length_prefix>>Parsing stops when the byte 0xFF (signature zone marker) is encountered
or the input is exhausted. The remaining bytes (starting at 0xFF) are
returned for the caller (Codec) to pass to SignatureZone.decode/1.
Summary
Functions
Decodes features from bytes using profile to map tags to field names.
Encodes a MessageZone into bytes. Features must already have encoded_value
populated. Returns {:ok, binary} or {:error, Error.t()}.
Types
@type t() :: %ExIcaoVds.MessageZone{ features: [ExIcaoVds.Feature.t()], profile_id: atom() | nil, raw: binary() | nil }
Functions
@spec decode(binary(), profile: module() | nil, profile_config: map() | nil) :: {:ok, t(), binary()} | {:error, ExIcaoVds.Error.t()}
Decodes features from bytes using profile to map tags to field names.
Returns {:ok, message_zone, remaining_bytes} where remaining_bytes
begins with 0xFF (the signature zone marker) or is empty.
@spec encode(t()) :: {:ok, binary()} | {:error, ExIcaoVds.Error.t()}
Encodes a MessageZone into bytes. Features must already have encoded_value
populated. Returns {:ok, binary} or {:error, Error.t()}.