A component exposes parameters: on-board settings such as the rate of a transmitter or the
detector setpoint of a camera. The topology declares the modes of operation (Nominal,
Cold…) and gives each target the value of its parameters in each mode. Every target has
a current mode; the procedure statement configure applies a mode on board, and the ground
chain (driver, transport, gateway) receives the parameters of the current mode, so that a
ground modem can follow the rate of the spacecraft.
The pieces live in four places:
| Where | What |
|---|---|
| Catalogue | parameters of a component: type, unit, range, and how each is set (set) and read back (readback, tolerance) |
| Topology | modes, and per target parameters (value per mode) and overrides (by environment) |
| Procedures | configure <role> for <mode>, and param <path> [in <Mode>] in expressions |
| Operations | The current mode of each target in the state store (stellar_modes); stellar mode, stellar parameters and the API |
flowchart LR
cat["Catalogue<br/>parameters: set, readback"] --> conf
topo["Topology<br/>modes, values per target"] --> conf
conf["configure cam for Cold<br/>(send setters, expect readbacks)"] --> store[("stellar_modes<br/>current mode")]
op["Operator<br/>stellar mode / PUT"] --> store
store --> rec["Reconciler<br/>bindings: mode + parameters"]
rec --> chain["Driver, transport, gateway<br/>LinkContext.mode, .parameters"]
store --> exe["Executor<br/>param in the current mode"]Parameters in the catalogue#
A component declares its parameters under parameters, like the arguments of a telecommand.
From the catalogue of the HSC-100 camera (packages/hsc-100/catalogue.yaml in
payload-integration):
components:
camera:
measures:
detector_setpoint:
raw: i16
type: f32
unit: degC
calibration: {polynomial: [0.0, 0.01]}
description: Setpoint of the detector temperature.
# … other measures
telecommands:
# … ping, housekeeping, set_mode, configure_acquisition…
set_detector_setpoint:
description: Setpoint of the detector temperature (port 15).
args:
temperature: {type: f32, unit: degC, range: [10 degC, 25 degC]}
verify: [{detector_setpoint: args.temperature, within: 5s}]
parameters:
detector_setpoint:
description: Setpoint of the detector temperature, per mode of the target.
type: f32
unit: degC
range: [10 degC, 25 degC]
tolerance: 0.1 degC
set: {telecommand: set_detector_setpoint, arg: temperature}
readback: detector_setpointsetnames the telecommand of the component that sets the parameter and the argument that carries its value. Several parameters may share one setter, each through its own argument (two parametersintegration_timeandbinningwould both go throughconfigure_acquisition, each through its argument of that name).readbacknames the measure (or derived measure) of the component that reads it back;tolerancebounds the gap accepted on a numeric readback.- A multi-instance component has one parameter per instance. The examples below give the
instanced component
thermalof the 6U CubeSat (satellite-integration) a parameterheater_on, set byset_heater(argumenton) and read back by the measureheater_on: it exists once per zone, such asthermal[PAYLOAD].heater_on.
The full reference of the keys and their checks is in Telecommands and Verification.
Modes and values in the topology#
topology.yaml declares the modes, in their order, and exactly one default: the mode of a
target whose mode was never set.
modes:
Nominal: {description: Camera detector at 18 °C, default: true}
Cold: {description: Camera detector at 12 °C}Each target gives the value of its parameters: one value for every mode, or a table by mode,
possibly partial. A key names the parameter as procedures do (thermal[PAYLOAD].heater_on; the
component is left out on a platform of one component). On a multi-instance component, a key
without instance (thermal.heater_on) holds for every instance; the key of an instance
(thermal[BATTERY].heater_on) wins for that instance.
targets:
sat-sim:
platform: cubesat-6u@1.0.0
environments: [SIM]
parameters:
camera.detector_setpoint: {Nominal: 18 degC, Cold: 12 degC}
thermal.heater_on: false
thermal[BATTERY].heater_on: {Nominal: true}
sat-fm-1:
platform: cubesat-6u@1.0.0
environments: [FLATSAT, FM]
parameters:
camera.detector_setpoint: {Nominal: 18 degC, Cold: 12 degC}
thermal.heater_on: false
# On the flatsat, in ambient air, the detector is kept above the dew point.
overrides:
FLATSAT:
parameters:
camera.detector_setpoint: {Cold: 15 degC}On sat-sim, thermal[BATTERY].heater_on is true in Nominal and, since its own table has
no Cold, false in Cold from the key without instance. On sat-fm-1,
camera.detector_setpoint in Cold is 15 °C in FLATSAT and 12 °C in FM. The topology rules
are on Targets.
Which value applies#
The value of a parameter of a target, in a mode and an environment, is looked up in this order:
- the key as written (with its instance): the override of the environment, then the value of the target;
- for a parameter of an instance without a value of its own: the key without instance, again override first, then the value of the target.
So an override of thermal.heater_on does not change an instance that has its own value in the
same mode, such as thermal[BATTERY].heater_on on sat-sim: override the key of the instance
for that.
The current mode#
The current mode of each target lives in the state store, in stellar_modes, under the name of the
target: the mode, when it was set, who set it, and the run that set it. A target whose mode
was never set (or whose stored mode is no longer declared by the topology) is in the default
mode.
It changes in two ways:
- A run, at the end of a successful
configure: the eventmode_changedis logged, and the record names the run. - An operator, who declares the mode after something that happened outside Stellar Control, such as an autonomous switch of the spacecraft to survival. Declaring a mode sends nothing to the target.
stellar mode cam-sim-1 # cam-sim-1: Nominal (default)
# modes: Nominal, Cold
stellar mode cam-sim-1 Cold # declare the mode, as the operator of --asThe web console shows it in the tab Parameters of a target, where an operator can declare another mode (see Web Console). The API offers the same (tag modes):
| Request | Result |
|---|---|
GET /v1/targets/{target}/mode | ModeView: mode, default, modes, since, by, run |
PUT /v1/targets/{target}/mode with {"mode": "Cold"} | Sets the mode, answers the new ModeView |
PUT needs the identity of the operator (X-Stellar-User or a token, else 400 api::anonymous), refuses a mode the topology does not declare (422 mode::unknown) and a
target held by a run (409 mode::target-held: its runs set its mode). An unknown target answers
404 api::unknown-target.
Parameters of a target#
stellar parameters <target> lists the parameters of a target: their value in the current
mode, their value in each mode, and their readback with its last sample.
$ stellar parameters sat-sim
sat-sim: mode Nominal, environment SIM
thermal[BATTERY].heater_on true [Nominal=true, Cold=false] read true ok
thermal[PAYLOAD].heater_on false [Nominal=false, Cold=false] read false ok
…
camera.detector_setpoint 18.0 degC [Nominal=18.0, Cold=12.0] read 18.02 okThe tab Parameters of a target in the web console shows the same table, read again every
5 s, the readbacks marked ✓ or ✗. --environment picks the environment of the overrides; by default, a target engaged in a single
environment is read in it, and a target engaged in several without overrides. The API is
GET /v1/targets/{target}/parameters?environment=…, answering a ParametersView: for each
parameter its name, unit, value in the current mode, values by mode, set (the setter
telecommand) and readback (measure, current sample, and matches: whether the sample has
the value of the mode within the tolerance; null without a sample or a value). Codes:
404 api::unknown-target, 422 api::unknown-environment (the target is not engaged in it),
503 api::no-catalogue.
Applying a mode: configure#
In a step, configure <role> for <mode> applies a mode to the target of the role. « First
light » (packages/hsc-100-ops/camera.proc) applies Nominal before cooling the detector; two
procedures could switch the camera from one mode to the other:
procedure "Cold detector"
uses cam: hsc-100
step "Configure cold"
configure cam for Cold
procedure "Nominal detector"
uses cam: hsc-100
step "Configure nominal"
configure cam for Nominal
check cam.camera.detector_setpoint is param cam.camera.detector_setpoint +/- 0.1 degCThe compiler expands configure from the catalogue of the platform of the role:
- for each telecommand setting parameters, in the order of the catalogue, and for each instance
of its component in the order of the enum of its instances, one
sendwhose parameter arguments takeparam … in <mode>(the other arguments keep their default); - right after each
send, for each of its parameters that has areadback, anexpectthat the readback measureisthe value of the mode (+/- tolerancewhen declared), within the longestwithinof the verifications of the setter, or 10 s when it has none; - once all have succeeded, the mode of the target becomes the mode (event
mode_changed).
For hsc-100, configure cam for Cold therefore sends set_detector_setpoint with
temperature = 12 degC (on cam-sim-1) and expects detector_setpoint is 12 degC +/- 0.1 degC
within 5 s. On the CubeSat with the parameter heater_on above, configure sat for Cold first
sends, for thermal[BATTERY], then [PAYLOAD], [PANEL_PX] and [PANEL_MX], set_heater with
on = false and expects heater_on is false within 5 s; then it sets the camera, since
thermal comes before camera in the catalogue of cubesat-6u. A dry run shows the expansion:
step Cold payload / Configure cold
send thermal[BATTERY].set_heater to dry-sat
→ VERIFIED
expect sat.thermal[BATTERY].heater_on is param sat.thermal[BATTERY].heater_on in Cold: PASSED
…
send camera.set_detector_setpoint to dry-sat
→ VERIFIED
expect sat.camera.detector_setpoint is param sat.camera.detector_setpoint in Cold +/- 0.1 degC: PASSED
mode of dry-sat: ColdThese sends follow the rules of every send: a hazardous setter needs its ask operator in the
same step, a step with a setter that changes the on-board state is not eligible for retries, and
the maximum duration counts every setter and every readback window (see
Safety Rules). If a step fails, the mode is not changed.
At the resolution of the run, every parameter a configure sets must have a value on the target
in that mode (run::parameter-undefined, 422).
Reading a parameter: param#
In any expression of a procedure, param <role>.<component>[<instance>].<parameter> is the
value of the parameter in the current mode of the target, read when the statement is
evaluated, in the environment of the run; param … in <Mode> is its value in that mode. It has
the type and unit of the parameter, and serves as an argument of a telecommand or in a
condition:
send set_heater to sat.thermal[zone] with on = param sat.thermal[zone].heater_on in Nominal
check sat.camera.detector_setpoint is param sat.camera.detector_setpoint +/- 0.1 degCThe mode is checked at compile time (procedure::unknown-mode). A param … in <Mode> whose
instance is known is checked again at the resolution of the run (run::parameter-undefined);
otherwise a parameter without value for the target fails the statement at run time. Details are
in Expressions.
The ground chain#
The ground segment follows the mode of the target:
- Each binding the reconciler delivers (
stellar_bindings, verbbindings) carries the currentmodeof its target and itsparametersin that mode, plusparameter_environments: the same, overrides applied, for each environment that overrides some. The reconciler watchesstellar_modesand delivers the bindings again at each change of mode. - The context of a link (
LinkContext) gainsmodeandparameters, resolved for the environment likeparams. Drivers and transports receive it with each telecommand and each frame, as before. - A gateway receives it with each frame (
Gateway::send_within Rust, asendwith three arguments in Python) and each time its bindings change (Gateway::configure,@gateway.configure), for instance to set the rate of its modem. LinkContext::parameter("thermal[PAYLOAD].heater_on")gives the value of an instance, falling back on the key without instance, as in procedures.
See Writing a Gateway and Writing a Driver.
Diagnostics#
| Code | Where | Meaning |
|---|---|---|
catalogue::parameter-type | Catalogue | A parameter is a number, bool or an enum value, not bytes nor a duration |
catalogue::unknown-setter, catalogue::unknown-setter-argument | Catalogue | set names no telecommand of the component, or no argument of it |
catalogue::setter-type-mismatch | Catalogue | The argument has another type or unit than the parameter |
catalogue::duplicate-setter | Catalogue | The argument already carries another parameter |
catalogue::setter-argument-without-default | Catalogue | A setter has an argument that carries no parameter and has no default |
catalogue::unknown-readback, catalogue::readback-type-mismatch | Catalogue | readback names no measure of the component, or one of another type or unit |
catalogue::tolerance-on-non-numeric, catalogue::invalid-tolerance | Catalogue | A tolerance on a non-numeric parameter, or negative or in the wrong unit |
topology::default-mode | Topology | No mode, or several, marked default: true |
topology::unknown-parameter | Topology | The key names no parameter of the catalogue of the target |
topology::unknown-mode | Topology | A value is given for an undeclared mode |
topology::invalid-parameter-value | Topology | A value does not fit the parameter: type, unit, range, enum value |
topology::unknown-override-environment | Topology | overrides names an environment the target is not engaged in |
procedure::unknown-mode | Procedure | configure … for or param … in names an undeclared mode |
procedure::unknown-parameter | Procedure | param names no parameter |
procedure::nothing-to-configure | Procedure | The platform of the role has no parameter with a set |
expr::parameter-not-here | Catalogue | param in a catalogue expression: parameters are read in procedures only |
run::parameter-undefined | Run request | The target has no value of a parameter in the mode used |
mode::unknown, mode::target-held | API | See The current mode |