From ICD to verified flight code
See Spacebackend's outputs and how they fit your subsystem workflow.
A three-stage pipeline
Add your ICD
Provide a PDF, Excel spreadsheet, or XML schema. Spacebackend reads packet field tables, frame layouts, type definitions, and limit values from the document structure.
Extract the structure
The parser creates an internal model containing field names, types, bit widths, offsets, and value ranges. Each field retains a reference to its source row in the original document.
Get code and tests
Spacebackend creates Python modules and C headers for packet encoding and decoding, along with a pytest suite asserting every field boundary. A traceability matrix connects each code line to an ICD field ID.
Turn specification tables into structured data
Spacebackend interprets document structure as well as text. Your subsystem engineer's field table becomes a usable data model in seconds.
| Field | Type | Bits | Offset | Min | Max |
|---|---|---|---|---|---|
| PKT_VERSION | uint | 4 | 0 | 0 | 15 |
| PKT_TYPE | uint | 1 | 4 | 0 | 1 |
| APID | uint | 11 | 5 | 0 | 2047 |
| SEQ_FLAGS | uint | 2 | 16 | 0 | 3 |
| PKT_DATA_LEN | uint | 16 | 32 | 0 | 65535 |
| TEMP_ADC | int16 | 16 | 48 | -200 | 1250 |
"TM_HK_PACKET": {
"PKT_VERSION": {
"type": "uint",
"bits": 4,
"offset": 0
},
"APID": {
"type": "uint",
"bits": 11,
"range": [0, 2047]
},
"TEMP_ADC": {
"type": "int16",
"bits": 16,
"range": [-200, 1250]
}
}
Generated flight modules
Python classes and C headers come directly from ICD field names and types. Nothing is renamed or reinterpreted, so the generated code mirrors your document.
# Generated by Spacebackend from ICD Rev 4.2 - TM_HK_PACKET
import struct
class TM_HK_Packet:
"""Housekeeping TM packet encoder/decoder. ICD ref: TM_HK_PACKET."""
PKT_VERSION_OFFSET = 0 # bits 0-3
APID_OFFSET = 5 # bits 5-15
SEQ_FLAGS_OFFSET = 16 # bits 16-17
PKT_DATA_LEN_OFFSET= 32 # bits 32-47
TEMP_ADC_OFFSET = 48 # bits 48-63, int16
def __init__(self, apid=0, temp_adc=0):
self.pkt_version = 1
self.pkt_type = 0
self.apid = apid
self.seq_flags = 3
self.temp_adc = temp_adc
def encode(self) -> bytes:
hdr = (self.pkt_version & 0xF) << 28
hdr |= (self.pkt_type & 0x1) << 27
hdr |= (self.apid & 0x7FF) << 16
hdr |= (self.seq_flags & 0x3) << 14
return struct.pack('>IHh', hdr, 2, self.temp_adc)
@classmethod
def decode(cls, data: bytes) -> 'TM_HK_Packet':
hdr, _, temp = struct.unpack('>IHh', data[:8])
pkt = cls(apid=(hdr >> 16) & 0x7FF, temp_adc=temp)
return pkt
Test suite generation
Each generated test names its ICD field. Export the traceability matrix instead of maintaining it manually.
# ICD ref: TM_HK_PACKET - generated test suite
import pytest
from tm_hk_packet import TM_HK_Packet
def test_apid_range():
# ICD field APID: range 0-2047
with pytest.raises(ValueError):
TM_HK_Packet(apid=2048).encode()
def test_temp_adc_roundtrip():
# ICD field TEMP_ADC: int16 [-200, 1250]
pkt = TM_HK_Packet(apid=300, temp_adc=-40)
decoded = TM_HK_Packet.decode(pkt.encode())
assert decoded.temp_adc == -40
def test_temp_adc_max_boundary():
# ICD field TEMP_ADC: upper limit 1250
with pytest.raises(ValueError):
TM_HK_Packet(temp_adc=1251).encode()
| ICD Field | Test ID | Status |
|---|---|---|
| PKT_VERSION | test_pkt_version_range | PASS |
| APID | test_apid_range | PASS |
| SEQ_FLAGS | test_seq_flags_values | PASS |
| PKT_DATA_LEN | test_data_len_range | PENDING |
| TEMP_ADC | test_temp_adc_roundtrip | PASS |
Fits your existing toolchain
Standard files fit your pipelines without platform lock-in.
Python pip installable
Generated modules arrive as a local pip-installable package. Import them into your test runner or ground software.
C headers for ECSS frames
C structs and encode/decode functions target ECSS-E-ST-70-41C compliant frame layouts.
CLI for CI/CD workflows
Invoke Spacebackend from a build script: ICD in, code and tests out. Connect it to GitHub Actions, GitLab CI, or Jenkins.
Traceability CSV export
Export the requirements traceability matrix as CSV for review gates, audit trails, and document management systems.