Astro~/0.3
** CLI / astro usdl * PAGE 06 / 22
** Astro * CLI
** /cli/usdl

astro usdl

USLP transfer frames, encode, decode, inspect.

USLP Transfer Frame operations: encode, decode, inspect, and generate USLP Transfer Frames (CCSDS 732.1-B-3).

Subcommands

CommandDescription
astro usdl decodeDecode a USLP Transfer Frame into header fields and data
astro usdl encodeConstruct a USLP Transfer Frame from fields
astro usdl inspectAnnotated frame breakdown with hex dump
astro usdl genGenerate synthetic USLP Transfer Frames

Common flags

FlagDefaultDescription
--inputhexInput format: hex or bin
--formatvariesOutput format: text, json, or hex
--no-fecffalseFrame carries no FECF (decode/inspect)
--insert-len0Octets of insert zone (decode/inspect)

astro usdl decode

Decode a USLP Transfer Frame from raw bytes. FECF is verified automatically.

astro usdl decode [file] [flags]

Flags

FlagDefaultDescription
--inputhexInput format: hex or bin
--formattextOutput format: text, json, or hex
--no-fecffalseFrame carries no FECF
--insert-len0Octets of insert zone the frame carries

Examples

# Decode from hex stdin
astro usdl encode --scid 100 --vcid 1 --mapid 0 --data 0102030405 | astro usdl decode --input hex

# Decode with JSON output
astro usdl encode --scid 100 --vcid 1 --mapid 0 --data 0102030405 | astro usdl decode --input hex --format json

astro usdl encode

Construct a USLP Transfer Frame from header fields and data. FECF is computed automatically.

astro usdl encode [flags]

Flags

FlagDefaultDescription
--scid0Spacecraft ID (0-65535)
--vcid0Virtual Channel ID (0-63)
--mapid0MAP ID (0-15)
--datarequiredData field as hex string
--ocfOperational Control Field as hex string (4 bytes)
--upid0USLP protocol identifier (0-31)
--rule7TFDZ construction rule (0-7)
--vcf-len0VCF count field length in octets (0-7)
--vcf-count0VCF count value
--formathexOutput format: text, json, or hex

Examples

# Encode a basic USLP frame
astro usdl encode --scid 100 --vcid 1 --mapid 0 --data 0102030405

# Encode with an OCF
astro usdl encode --scid 100 --vcid 1 --mapid 0 --data 0102030405 --ocf 00000000

# Encode with JSON output
astro usdl encode --scid 100 --vcid 1 --mapid 0 --data 0102030405 --format json

astro usdl inspect

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

astro usdl inspect [file] [flags]

Flags

FlagDefaultDescription
--inputhexInput format: hex or bin
--no-fecffalseFrame carries no FECF
--insert-len0Octets of insert zone the frame carries

Examples

# Inspect from hex stdin
astro usdl encode --scid 100 --vcid 1 --mapid 0 --data 0102030405 | astro usdl inspect --input hex

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

astro usdl gen

Generate a stream of synthetic USLP Transfer Frames with incrementing sequence numbers and random data.

astro usdl gen [flags]

Flags

FlagDefaultDescription
--scid0Spacecraft ID (0-65535)
--vcid0Virtual Channel ID (0-63)
--mapid0MAP ID (0-15)
--count10Number of frames to generate
--data-size64Data field size in bytes per frame
--formatbinOutput format: bin or hex

Examples

# Generate 10 USLP frames
astro usdl gen --scid 100 --vcid 1 --mapid 0 --count 10 --data-size 64

# Generate with hex output
astro usdl gen --scid 100 --vcid 1 --count 5 --data-size 32 --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.