The core of Stellar Control never touches a byte of a target. Everything that depends on a platform, a medium or a downstream system lives in external components: processes outside Stellar Control that talk to it through NATS only (or, for pass feeders, through the HTTP API). This section explains how to write them.
License#
The SDKs — Rust stellar-common, stellar-contract and stellar-sdk, Python stellar-control — are
under the Apache License 2.0: you may write, ship and sell drivers, transports, gateways and
connectors built with them, under the license of your choice. The CLI is free to use; the core
of Stellar Control runs under the license of each cell.
The components you can write#
| Component | What it does | Talks through | Contract |
|---|---|---|---|
| Driver | Encodes semantic telecommands into bytes (ACK 1), decodes telemetry into raw values, recognises echoes, extracts file chunks, decodes recorded files | NATS | Driver contract |
| Transport | Frames the units of a driver for a medium (CCSDS TC frames under COP-1, CSP over KISS…), and back | NATS | Driver contract, Transports |
| Gateway | Carries frames to and from a ground station, a bench or an EGSE (ACK 2), reports link availability and throughput | NATS | Gateway contract |
| Output connector | Consumes the data of Stellar Control to store it (a time-series database) or relay it | NATS (JetStream consumers) | Connector contract |
| Pass feeder | Pushes the passes of a flight dynamics system or a ground station provider | HTTP API | POST /v1/passes, POST /v1/passes/replace_window |
flowchart LR
subgraph CORE["Core of Stellar Control"]
EX[Executor]
CO[Compute stage]
RE[Reconciler]
end
EX -- "SemanticTc<br/>stellar.tc.encode.*" --> D[Driver]
D -- "unit<br/>stellar.tc.wrap.*" --> T[Transport]
T -- "frame<br/>stellar.tc.uplink.*" --> G[Gateway]
D -. "frame (no transport)" .-> G
G -- "raw frame<br/>stellar.tm.raw.*" --> T
T -- "unit<br/>stellar.tm.unit.*" --> D
D -- "RawSample[]<br/>stellar.tm.decoded.*" --> CO
RE -- "bindings, credentials" --> D & T & G
CORE -- "JetStream consumers" --> C[Output connector]
F[Pass feeder] -- "HTTP" --> API[API]The contract is the interface#
The contract is JSON over NATS, independent of any language: registration, heartbeats,
control verbs, bindings and the data plane. Stellar Control checks it at registration and binds only
the instances that fit the topology. The NATS contract reference lists
every subject, header and message; stellar schema <kind> prints the JSON Schema of each
message.
Two SDKs implement it, so that a component only declares what it does:
| Rust SDK | Python SDK | |
|---|---|---|
| Package | crate stellar-sdk, with stellar-contract and stellar-common | package stellar-control (module stellar_control) |
| Driver | Driver trait, driver_main / run_driver | Driver with @driver.encode, @driver.decode, @driver.echo, @driver.chunks, @driver.decode_file |
| Transport | Transport trait, transport_main / run_transport | Transport with @transport.wrap, @transport.unwrap |
| Gateway | Gateway trait, run_gateway | Gateway with @gateway.send, @gateway.receive, @gateway.link_available |
| Output connector | Connector trait, run_connector | Connector with @connector.on("<kind>") |
| Pass feeder | — (plain HTTP) | PassFeeder |
| Own control verbs | Rpc trait | @component.rpc("verb") |
| COP-1 in a transport | yes (Transport::cop1, Transport::clcw) | no |
| CFDP entity in a driver | yes (Driver::cfdp and friends) | no |
| Protocol helpers | CCSDS space packets and frames, CLCW, COP-1 FOP and FARM, CFDP entity, CSP 1/2, KISS, CAN frames, CSP over CAN (CFP) | CSP 1/2, CAN frames, CSP over CAN (CFP) |
| Prometheus endpoint | yes (STELLAR_METRICS_ADDR) | no |
Both SDKs handle the same chores: the nkey key pair, registration with retries, the JWT issued
by the reconciler and its renewal, heartbeats, the common control verbs (status,
credentials, bindings, reregister), subscriptions derived from the bindings, JetStream
consumers, telecommand events (ACK 1 and ACK 2), deadlines, fragments and reconnection.
A component in another language sends the same messages: nothing in Stellar Control knows which SDK, if any, a component uses.
Choosing#
- Python for a quick integration, a bench instrument, a text protocol, a connector or a
feeder script: a driver of a SCPI power supply is a few dozen lines. The driver of the HSC-100
camera in the Payload integration use case
(
drivers/hsc_100, made withstellar generate driver) is a complete one over CSP. - Rust for flight links: CCSDS framing, COP-1, CFDP, strict timing, test vectors replayed bit for bit, and a Prometheus endpoint.
- Any language when a component must live in an existing code base: follow the NATS contract.
Layering#
The SDKs depend on nothing of the core: a component embeds the contract and the SDK, never the core, and the core does not need the SDK. What a component of Stellar Systems does, a team outside Stellar Control can do.
Reference components#
Reference components built on the SDK alone ship with it, on request: drivers (SCPI-like text lines, PUS-C packets behind CCSDS TC frames, CSP 1 packets, a partial driver on a CAN bench bus, an RF bench through its control plane), transports (CCSDS TC frames under COP-1, CSP over KISS, CSP over CAN), gateways (SocketCAN, an RF bench with a REST and ZeroMQ interface, a minimal logging gateway), the TimescaleDB output connector, and their Python counterparts (a driver, a TCP gateway, a CSV connector, a CSP over CAN transport, a pass feeder). They are the best starting points.
How a component joins a target#
- The topology declares a link of a target with a driver (by name and
version,
cubesat-6u-csp@1), an optional transport and a gateway (by name, or a tag constraint such asany(tag: sband)). - The component starts with bootstrap credentials limited to registration and heartbeats, and registers: software name and version, and what it implements.
- The reconciler checks the registration, binds the instance to the links it fits, issues it a JWT with exactly the permissions of its bindings, and sends it its bindings.
- The component subscribes to the subjects of its bindings; the target becomes ready when every link has a driver, a transport when declared, and a gateway bound.
See Drivers, Transports and Gateways for the binding rules seen from the topology.