Sidereon.CCSDS.TDM (Sidereon v0.23.0)

Copy Markdown View Source

Parse and encode CCSDS Tracking Data Messages (TDM) in KVN format.

Date/time fields are preserved as raw strings. Data record values carry both the parsed float and the original decimal token so KVN round-trips do not rewrite measurement text.

Summary

Types

Failure reason from TDM parsing or encoding.

t()

Functions

Encode a TDM as KVN text.

Encode a TDM as KVN text explicitly.

Parse a TDM KVN document.

Parse a TDM KVN document explicitly.

Types

error()

@type error() ::
  :missing_version
  | :no_segments
  | {:section, {String.t(), String.t()}}
  | {:malformed_line, {String.t(), String.t()}}
  | {:malformed_record, {String.t(), String.t()}}
  | {:invalid_field, {String.t(), String.t()}}

Failure reason from TDM parsing or encoding.

t()

@type t() :: %Sidereon.CCSDS.TDM{
  comments: [String.t()],
  creation_date: String.t() | nil,
  header_fields: [Sidereon.CCSDS.TDM.Field.t()],
  message_id: String.t() | nil,
  originator: String.t() | nil,
  segments: [Sidereon.CCSDS.TDM.Segment.t()],
  version: String.t()
}

Functions

encode(tdm)

@spec encode(t()) :: {:ok, String.t()} | {:error, error()}

Encode a TDM as KVN text.

encode_kvn(tdm)

@spec encode_kvn(t()) :: {:ok, String.t()} | {:error, error()}

Encode a TDM as KVN text explicitly.

parse(text)

@spec parse(String.t()) :: {:ok, t()} | {:error, error()}

Parse a TDM KVN document.

parse_kvn(text)

@spec parse_kvn(String.t()) :: {:ok, t()} | {:error, error()}

Parse a TDM KVN document explicitly.