Astro~/0.3
** CLI / astro aos * PAGE 05 / 22
** Astro * CLI
** /cli/aos

astro aos

AOS transfer frames, encode, decode, inspect, gaps, demux.

AOS Transfer Frame operations: encode, decode, inspect, and generate AOS Transfer Frames (CCSDS 732.0-B-4).

Subcommands

CommandDescription
astro aos encodeConstruct an AOS Transfer Frame from fields
astro aos decodeDecode an AOS Transfer Frame into header fields and data
astro aos inspectAnnotated frame breakdown with hex dump
astro aos gapsDetect VC counter gaps in a frame stream
astro aos demuxFilter frames by Virtual Channel ID
astro aos genGenerate synthetic AOS Transfer Frames

Common flags

FlagDefaultDescription
--inputhexInput format: hex or bin
--formatvariesOutput format: text, json, or hex
--fecffalseToggle the 2-byte CRC-16 Frame Error Control Field
--ocf (decode/inspect)falseFrame includes a 4-byte OCF
--insert-len0Insert zone length in bytes

Stream commands (gaps, demux) require --frame-len, because an AOS frame carries no length field. The length is a managed parameter agreed before the pass. They read as they go, so they work on a live pipe and on a capture larger than memory.


astro aos encode

Construct an AOS Transfer Frame from header fields and data. FECF is computed automatically when enabled.

astro aos encode [flags]

Flags

FlagDefaultDescription
--scid0Spacecraft ID (0-255)
--vcid0Virtual Channel ID (0-63)
--datarequiredData field as hex string
--ocfOperational Control Field as hex string (4 bytes)
--insertInsert Zone as hex string
--fecffalseAppend CRC-16 Frame Error Control Field
--vc-count0VC Frame Count (24-bit)
--replayfalseSet the Replay Flag
--formathexOutput format: text, json, or hex

Examples

# Encode a basic AOS frame
astro aos encode --scid 50 --vcid 1 --data 0102030405

# Encode with FECF and OCF
astro aos encode --scid 50 --vcid 1 --data 0102030405 --ocf 00000000 --fecf

# Encode with JSON output
astro aos encode --scid 50 --vcid 1 --data 0102030405 --format json

astro aos decode

Decode an AOS Transfer Frame from raw bytes. FECF is verified automatically when present.

astro aos decode [file] [flags]

Flags

FlagDefaultDescription
--inputhexInput format: hex or bin
--formattextOutput format: text, json, or hex
--fecffalseFrame includes a 2-byte FECF
--ocffalseFrame includes a 4-byte OCF
--insert-len0Insert zone length in bytes

Examples

# Decode from hex stdin
astro aos encode --scid 50 --vcid 1 --data 0102030405 --fecf | astro aos decode --input hex --fecf

# Decode with JSON output
astro aos encode --scid 50 --vcid 1 --data 0102030405 | astro aos decode --input hex --format json

astro aos inspect

Display an annotated breakdown of an AOS Transfer Frame showing all header fields, data regions, and hex dump.

astro aos inspect [file] [flags]

Flags

FlagDefaultDescription
--inputhexInput format: hex or bin
--fecffalseFrame includes a 2-byte FECF
--ocffalseFrame includes a 4-byte OCF
--insert-len0Insert zone length in bytes

Examples

# Inspect from hex stdin
astro aos encode --scid 50 --vcid 1 --data 0102030405 --fecf | astro aos inspect --input hex --fecf

# Inspect a binary file
astro aos inspect --input bin frame.bin

astro aos gaps

Scan a stream of concatenated AOS Transfer Frames and report gaps in the Virtual Channel frame counter. Each gap line gives the number of frames that went missing, not just that the counter jumped.

AOS has no Master Channel frame count, so only virtual channel gaps are reported. Where a frame sets the VC Frame Count Usage Flag, the 4-bit cycle is folded in above the 24-bit count and the pair is treated as one 28-bit counter (clause 4.1.2.5.5.3), so a wrap of the count reads as contiguous rather than as sixteen million missing frames.

Counters are tracked per spacecraft. A capture holding two SCIDs is compared within each, never across them.

astro aos gaps [file] [flags]

Flags

FlagDefaultDescription
--inputhexInput format: hex or bin
--frame-len(required)Fixed frame length in bytes
--fecffalseFrames include a 2-byte FECF
--ocffalseFrames include a 4-byte OCF
--insert-len0Insert zone length in bytes

Examples

# Detect gaps in a binary capture
astro aos gaps --input bin --frame-len 1024 capture.bin

# Frames carrying an insert zone and FECF
astro aos gaps --input bin --frame-len 1115 --insert-len 8 --fecf capture.bin

astro aos demux

Demultiplex a stream of concatenated AOS Transfer Frames, passing on only the frames matching the given Virtual Channel ID.

astro aos demux [file] [flags]

Flags

FlagDefaultDescription
--inputhexInput format: hex or bin
--formattextOutput format: text, json, or hex
--frame-len(required)Fixed frame length in bytes
--vcid(required)Virtual Channel ID to filter (0-63)
--fecffalseFrames include a 2-byte FECF
--ocffalseFrames include a 4-byte OCF
--insert-len0Insert zone length in bytes

Examples

# Extract VCID 2 frames from a binary capture
astro aos demux --input bin --frame-len 1024 --vcid 2 capture.bin

# Demux and pipe back into decode
astro aos demux --input bin --frame-len 1024 --vcid 0 --format hex capture.bin | astro aos decode --input hex --format json

astro aos gen

Generate a stream of synthetic AOS Transfer Frames with incrementing VC frame counts and random data.

astro aos gen [flags]

Flags

FlagDefaultDescription
--scid0Spacecraft ID (0-255)
--vcid0Virtual Channel ID (0-63)
--count10Number of frames to generate
--data-size64Data field size in bytes per frame
--fecffalseAppend CRC-16 Frame Error Control Field
--formatbinOutput format: bin or hex

Examples

# Generate 10 AOS frames
astro aos gen --scid 50 --vcid 1 --count 10 --data-size 64

# Generate with FECF and hex output
astro aos gen --scid 50 --vcid 1 --count 5 --data-size 32 --fecf --format hex

See also: the protocol page for the standard and the Go API, and the conformance statement for what is and is not implemented.

** Conformance-tested CCSDS and ECSS protocols for building spacecraft and ground software. **PAGE 05 / 22