Astro~/0.3
** CLI / astro tc * PAGE 04 / 22
** Astro * CLI
** /cli/tc

astro tc

TC transfer frames, encode, decode, inspect.

TC Transfer Frame operations: encode, decode, and inspect CCSDS TC Transfer Frames (CCSDS 232.0-B-4).

Subcommands

CommandDescription
astro tc decodeDecode a TC Transfer Frame with CRC verification
astro tc encodeConstruct a TC Transfer Frame from fields
astro tc inspectAnnotated frame breakdown with hex dump
astro tc genGenerate synthetic TC Transfer Frames

astro tc decode

Decode a TC Transfer Frame from raw bytes. CRC-16-CCITT is verified automatically.

astro tc decode [file] [flags]

Flags

FlagDefaultDescription
--inputhexInput format: hex or bin
--formattextOutput format: text, json, or hex

Examples

# Decode from hex stdin
astro tc encode --scid 26 --vcid 1 --data 0102030405 | astro tc decode --input hex

# Decode with JSON output
astro tc decode --input hex --format json frame.hex

astro tc encode

Construct a TC Transfer Frame from header fields and hex-encoded data. CRC-16-CCITT is computed automatically.

astro tc encode [flags]

Flags

FlagDefaultDescription
--scid0Spacecraft ID (0-1023)
--vcid0Virtual Channel ID (0-63)
--data(required)Data field as hex string
--bypassfalseSet Type-B (expedited) bypass flag
--controlfalseSet control command flag
--seq-num0Frame sequence number (0-255)
--formathexOutput format: text, json, or hex

Examples

# Encode a basic TC frame
astro tc encode --scid 26 --vcid 1 --data 0102030405

# Encode a Type-B (bypass/expedited) frame
astro tc encode --scid 26 --vcid 1 --data 0102030405 --bypass

# Encode with sequence number
astro tc encode --scid 26 --vcid 1 --data 0102030405 --seq-num 42

# Encode with JSON output
astro tc encode --scid 26 --vcid 1 --data 0102030405 --format json

astro tc inspect

Display an annotated breakdown of a TC Transfer Frame showing primary header fields, optional segment header, data field hex dump, and CRC.

astro tc inspect [file] [flags]

Flags

FlagDefaultDescription
--inputhexInput format: hex or bin

Examples

# Inspect from pipe
astro tc encode --scid 26 --vcid 1 --data 0102030405 | astro tc inspect --input hex

# Inspect a bypass frame
astro tc encode --scid 26 --vcid 1 --data 0102030405 --bypass | astro tc inspect --input hex

Sample Output

TC Transfer Frame Inspector
────────────────────────────────────────────────────────────
Primary Header (5 bytes)
  Version .............. 0
  Bypass Flag .......... 0 (Type-A (sequence-controlled))
  Control Command ...... 0 (Data)
  Spacecraft ID ........ 26 (0x01A)
  Virtual Channel ID ... 1
  Frame Length ......... 12 bytes
  Frame Sequence Num ... 0
  MCID ................. 26
  GVCID ................ 1665
────────────────────────────────────────────────────────────
Data Field (5 bytes)
  0000  01 02 03 04 05                                    |.....|
────────────────────────────────────────────────────────────
Frame Error Control: 0x9B15 (CRC-16-CCITT)
────────────────────────────────────────────────────────────
Raw Frame (12 bytes)
  0000  00 1a 04 0b 00 01 02 03  04 05 9b 15              |............|

astro tc gen

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

astro tc gen [flags]

Flags

FlagDefaultDescription
--scid0Spacecraft ID (0-1023)
--vcid0Virtual Channel ID (0-63)
--count10Number of frames to generate
--data-size64Data field size in bytes per frame
--bypassfalseSet the Type-B (expedited) bypass flag
--formatbinOutput format: bin or hex

Examples

# Generate 10 TC frames
astro tc gen --scid 26 --vcid 1 --count 10 --data-size 64

# Generate bypass frames
astro tc gen --scid 26 --vcid 1 --count 5 --data-size 32 --bypass

Piping

# Encode -> Inspect
astro tc encode --scid 26 --vcid 1 --data 0102030405 | astro tc inspect --input hex

# Encode -> Decode as JSON
astro tc encode --scid 26 --vcid 1 --data 0102030405 | astro tc decode --input hex --format json

# Encode bypass -> Decode
astro tc encode --scid 26 --vcid 1 --data 0102030405 --bypass --seq-num 42 | astro tc decode --input hex --format json

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 04 / 22