What depends on the ICD of a target stays in the code of its driver. What depends on the link (a spacecraft identifier, a CSP address, a virtual channel, a frame length) is a parameter of the link, declared in the topology. The same driver and transport then serve a flatsat and a flight model, or a bench in AIT and in IVV, with different values.
targets:
obc-flatsat-1:
platform: obc-v1@1.0.0
environments: [AIT, IVV]
links:
rf:
driver: obc-csp@1
transport: csp1-kiss@1
gateway: bench-rf-1
default: true
params: {csp_address: 10}
environments:
IVV: {params: {csp_address: 12}}
sat1-fm:
platform: platform-v3@1.4.0
environments: [AIT, IVV, in_orbit]
links:
nominal:
driver: platform-v3-ccsds@4
transport: ccsds-tc@1
gateway: "any(tag: sband)"
default: true
params: {scid: 0x2C5, tm_length: 256}Declaring parameters#
paramsmaps names to booleans, numbers or text:{scid: 0x2C5, tm_ocf: true, t1: 2.5}. Names are identifiers (topology::invalid-param).environmentsoverrides them key by key for some environments of the target:IVV: {params: {csp_address: 12}}. Keys not overridden keep their base value. The environments must be environments of the target (topology::unknown-link-environment).- Parameters belong to the link: they go to its driver and to its transport, each reading the keys it knows.
The link context#
With every telecommand to encode and every frame received, the driver and the transport receive a
context: target, link, environment, and the parameters resolved for that environment. Each
reads what concerns it. The obc-csp driver takes the ground CSP address from csp_address;
the ccsds-tc transport takes its COP-1 and frame settings from scid, vcid, window…
The environment of a telecommand#
A telecommand carries the environment of its run. A direct telecommand may declare one (the
environment field of POST /v1/tc, stellar send --environment, the environment field of the
web form):
| Case | Environment used |
|---|---|
| Declared, and the target is engaged in it | That one |
| Declared, but the target is not engaged in it | Refused: tc::unknown-environment |
| Not declared, target engaged in a single environment | That one |
| Not declared, the link overrides parameters by environment, target engaged in several | Refused: tc::environment-required |
| Not declared otherwise | None: that of the last telecommand of the link, see below |
stellar send obc-flatsat-1 obc.housekeeping --environment IVVA telecommand without environment, such as those the transfer manager sends, takes the
environment of the last telecommand of its link. On reception, a frame is decoded in the context
of the last telecommand of its link, or with the base parameters before any; the decoded values
then carry the header Stellar-Environment.
Parameter schemas#
At registration, a driver and a transport may declare the JSON Schema of the parameters they read
(params_schema, an object schema with properties). When binding a link, the reconciler checks
the resolved parameters of every environment of the link, the base one included:
- each schema validates the keys it declares;
- a key that no component of the chain declares is refused, when all of them declare a schema;
- a component without schema is not checked.
A refusal leaves the link unbound, with the reason in the readiness of the target:
link `rf`: parameters of link in `IVV` refused by driver `obc-csp-1`: `csp_address`: 40 is greater than the maximum of 31Parameters of the example components#
ccsds-tc (transport of space packets in CCSDS TC frames under COP-1, and back from TM
frames):
| Parameter | Type | Default | Meaning |
|---|---|---|---|
scid | integer 0–1023 | required | Spacecraft identifier of the TC and TM frames |
vcid | integer 0–63 | 0 | Virtual channel of the telecommands |
window | integer 1–255 | 10 | Sliding window K of the FOP, below W/2 of the FARM |
t1 | number, seconds, above 0 up to 3600 | 5 | Timer T1 of the FOP |
transmission_limit | integer 1–255 | 3 | Transmissions of a frame, the first one included |
tm_length | integer 16–2048 | 1115 | Length of the TM frames, in octets |
tm_ocf | boolean | true | TM frames with an Operational Control Field (the CLCW) |
tm_fecf | boolean | true | TM frames with a Frame Error Control Field |
csp1-kiss, csp2-kiss (CSP packets in KISS frames):
| Parameter | Type | Default | Meaning |
|---|---|---|---|
crc32 | boolean | true | Packets sent up with their CRC32 (CRC-32C), flagged in their header |
csp1-can, csp2-can (CSP packets on a CAN bus, CFP of libcsp):
| Parameter | Type | Default | Meaning |
|---|---|---|---|
crc32 | boolean | true | Packets sent up with their CRC32 (CRC-32C), flagged in their header |
via | integer 0–31 | the destination | CFP 1: the node of the bus the packets go through |
can_address | integer 0–63 | the source of the packet | CFP 2: the address of the CAN interface of the ground, sender of the frames |
reassembly_timeout_ms | integer, at least 1 | 1000 | How long a packet down may take to arrive whole |
obc-csp (driver of the obc-v1 on-board computer):
| Parameter | Type | Default | Meaning |
|---|---|---|---|
csp_address | integer, up to the largest address of the CSP version | required | CSP address of the ground |
See COP-1 and the Link Component for what the ccsds-tc settings do, and
Writing a Driver to read parameters from a driver or a transport.