How It Works

From ICD to verified flight code

See Spacebackend's outputs and how they fit your subsystem workflow.

Pipeline

A three-stage pipeline

Interface Control Document PDF, Excel, XML Spacebackend Parser + Generator Field extraction, code synthesis Flight Modules + Test Suite Python, C, traceability
1

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.

2

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.

3

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.

ICD Parsing

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.

ICD Source Table
FieldTypeBitsOffsetMinMax
PKT_VERSIONuint40015
PKT_TYPEuint1401
APIDuint11502047
SEQ_FLAGSuint21603
PKT_DATA_LENuint1632065535
TEMP_ADCint161648-2001250
Parsed Output (JSON)
"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]
  }
}
Code Generation

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.

Python tm_hk_packet.py
# 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
V&V Output

Test suite generation

Each generated test names its ICD field. Export the traceability matrix instead of maintaining it manually.

pytest test_tm_hk_packet.py
# 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()
Traceability trace_matrix.csv view
ICD FieldTest IDStatus
PKT_VERSIONtest_pkt_version_rangePASS
APIDtest_apid_rangePASS
SEQ_FLAGStest_seq_flags_valuesPASS
PKT_DATA_LENtest_data_len_rangePENDING
TEMP_ADCtest_temp_adc_roundtripPASS
Integrations

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.