Channel Access Data Unit operations: wrap, unwrap, inspect, and sync CADUs (CCSDS 131.0-B-5).
Subcommands
| Command | Description |
|---|---|
astro cadu wrap | Wrap a TM frame into a CADU (prepend ASM, optionally randomize) |
astro cadu unwrap | Strip ASM and optionally de-randomize to extract TM frame |
astro cadu inspect | Annotated CADU breakdown with ASM validation and hex dump |
astro cadu sync | Scan a byte stream for ASM markers and extract aligned CADUs |
astro cadu gen | Generate synthetic CADUs |
astro cadu wrap
Prepend the Attached Sync Marker (0x1ACFFC1D) and optionally apply CCSDS pseudo-randomization to produce a CADU.
astro cadu wrap [file] [flags]Flags
| Flag | Default | Description |
|---|---|---|
--input | hex | Input format: hex or bin |
--format | hex | Output format: text, json, or hex |
--randomize | false | Apply CCSDS pseudo-randomization |
Examples
# Wrap a TM frame
astro tm encode --scid 26 --vcid 1 --data 0102030405 | astro cadu wrap --input hex
# Wrap with randomization
astro tm encode --scid 26 --vcid 1 --data 0102030405 | astro cadu wrap --input hex --randomizeastro cadu unwrap
Strip the ASM and optionally de-randomize to extract TM Transfer Frame data.
astro cadu unwrap [file] [flags]Flags
| Flag | Default | Description |
|---|---|---|
--input | hex | Input format: hex or bin |
--format | hex | Output format: text, json, or hex |
--derandomize | false | Apply CCSDS de-randomization |
Examples
# Unwrap a CADU
astro cadu unwrap --input hex cadu.hex
# Unwrap with de-randomization
cat cadu.hex | astro cadu unwrap --input hex --derandomizeastro cadu inspect
Display an annotated breakdown of a CADU showing ASM validation, frame data hex dump, and full raw dump.
astro cadu inspect [file] [flags]Flags
| Flag | Default | Description |
|---|---|---|
--input | hex | Input format: hex or bin |
Examples
astro tm encode --scid 26 --vcid 1 --data 0102030405 | astro cadu wrap --input hex | astro cadu inspect --input hexastro cadu sync
Scan a raw byte stream for CCSDS Attached Sync Markers (0x1ACFFC1D) and extract aligned CADUs of a given length.
A CADU stream carries no length field, so alignment is found by searching for the marker. Octets outside any CADU are skipped and counted rather than treated as an error: a capture normally begins part way through a frame, and there is noise between passes. Alignment is reacquired at the next marker, so junk in the middle costs only the frames it overwrote.
The scan is incremental, so it works on a live pipe and on a capture larger than memory.
astro cadu sync [file] [flags]Flags
| Flag | Default | Description |
|---|---|---|
--input | hex | Input format: hex or bin |
--format | text | Output format: text, json, or hex |
--frame-len | (required) | Total CADU length in bytes including ASM |
Examples
# Sync and extract CADUs from a binary capture
astro cadu sync --input bin --frame-len 1115 capture.bin
# Sync from hex with JSON output
astro cadu sync --input hex --frame-len 17 --format json stream.hexastro cadu gen
Generate a stream of synthetic CADUs (an ASM followed by a TM frame) with incrementing counters and random data.
astro cadu gen [flags]Flags
| Flag | Default | Description |
|---|---|---|
--scid | 0 | Spacecraft ID (0-1023) |
--vcid | 0 | Virtual Channel ID (0-7) |
--count | 10 | Number of CADUs to generate |
--data-size | 1024 | TM frame data field size in bytes |
--randomize | false | Apply CCSDS pseudo-randomization |
--format | bin | Output format: bin or hex |
Examples
# Generate 100 CADUs
astro cadu gen --scid 1 --vcid 0 --count 100 --data-size 1024
# Generate randomized CADUs and sync them back
astro cadu gen --scid 1 --count 10 --data-size 100 --format bin | astro cadu sync --input bin --frame-len 112Piping
# Full TM chain: encode frame -> wrap CADU -> inspect
astro tm encode --scid 26 --vcid 1 --data 0102030405 | astro cadu wrap --input hex | astro cadu inspect --input hex
# Wrap -> Unwrap round-trip
astro tm encode --scid 26 --vcid 1 --data 0102030405 | astro cadu wrap --input hex | astro cadu unwrap --input hex
# Wrap with randomize -> Unwrap with derandomize
astro tm encode --scid 26 --vcid 1 --data 0102030405 | astro cadu wrap --input hex --randomize | astro cadu unwrap --input hex --derandomizeSee also: the protocol page for the standard and the Go API, and the conformance statement for what is and is not implemented.