All docsStellar ControlMission control · by Stellar Systems v1.1.0

Catalogues

Telecommands and Verification

Arguments, preconditions, verification and the flags that drive the runtime.

A telecommand of the catalogue is semantic: a name, typed arguments and the rules the runtime applies around it. The driver turns it into bytes; Stellar Control checks its preconditions, follows its acknowledgements and verifies its effect on the measures. Four keys drive the runtime: changes_state (automatic retry), hazardous (confirmation), requires (preconditions) and verify (ACK 3).

YAML
components:
  camera:
    telecommands:
      ping:
        changes_state: false
        args:
          data: {type: bytes}
        verify: [echo]
      housekeeping:
        changes_state: false
        verify: [{responding: true, within: 5s}]
      set_mode:
        args:
          mode: {type: camera_mode}
        requires:
          - "mode is not BOOT and mode is not IMAGING"
          - "not faulty"
        verify: [{mode: args.mode, within: 130s}]
      configure_acquisition:
        args:
          integration_time: {type: u16, unit: us, range: [100 us, 20000 us], default: 4000 us}
          lines: {type: u16, range: [64, 4096], default: 1024}
        verify: [{last_status: OK, within: 5s}]
      release_cover:
        hazardous: true
        requires: [{mode: STANDBY, cover: CLOSED}]
        verify: [{cover: RELEASED, within: 10s}]

Keys of a telecommand#

KeyDefaultMeaning
argsnoneTyped arguments, by name.
changes_statetrueWhether the telecommand changes the on-board state. Only telecommands with false are retried automatically.
hazardousfalseEvery send needs a confirmation, given by the roles of the environment.
requiresnonePreconditions checked before encoding, on the current values.
verifynoneVerification (ACK 3): echo and conditions on measures, with an optional within.
descriptionnoneFree text for operators.

On a multi-instance component, a telecommand is sent to one instance (send switch_on to sat.channel[PAYLOAD], stellar send flatsat-1 'channel[PAYLOAD].switch_on'); its requires and verify read the measures of that instance.

Arguments#

YAML
args:
  integration_time: {type: u16, unit: us, range: [100 us, 20000 us], default: 4000 us, description: Integration time of a line.}
  temperature: {type: f32, unit: degC, range: [10 degC, 25 degC]}
  band_set: {type: band_set, default: FULL}
  data: {type: bytes}
KeyMeaning
typeNumeric (u8…f64), bool, bytes, a named enum, or enum with inline values.
unitUnit of a numeric argument.
rangeAccepted [low, high], with units when the argument has one; numeric arguments only (catalogue::range-on-non-numeric), within the bounds of an integer type (catalogue::range-out-of-type).
defaultValue used when the argument is omitted; inside the range (catalogue::default-out-of-range).

A value of an integer argument written in another unit is converted, then taken as the whole number it stands for: default: 0.004 s on a u16 in us is 4000. A value that is not a whole number once converted (1.5 us, 0.5 ms on a u16 in ms) is refused (catalogue::not-whole), for a default as for the bounds of a range. | description | Free text for operators. |

Arguments are always named when sent. Their values are written like the inputs of a run: a quantity with its unit (4 ms, converted into the unit of the argument), an enum value, a boolean, or bytes in hexadecimal. The compiler checks type, unit and range of the literal values of send … with; values coming from inputs are checked when the run is resolved; a direct telecommand is checked by the API (POST /v1/tc).

Procedure
send configure_acquisition to cam.camera with integration_time = 4 ms, band_set = RGB
Shell
stellar send cam-sim-1 camera.configure_acquisition 'integration_time=4 ms'   # the others take their default

changes_state and retries#

A telecommand is assumed to change the on-board state unless it says otherwise. Only a step whose telecommands are all changes_state: false is eligible for retry. A run that sends only such telecommands (and checks) holds a shared lease on its targets, and only such a telecommand may be sent directly while a run holds a shared lease on the target. See Retries and Leases and Crash Recovery.

hazardous#

A hazardous telecommand needs a confirmation before each send: in a step, every send of it follows its own ask operator "…" (a compile error otherwise). Who confirms depends on the environment (hazardous_confirmation): the operator alone in BENCH, the operator then a supervisor in FM, nobody where human orchestration is off. See Safety Rules and Hazardous Confirmations.

A hazardous telecommand without verify raises a compile warning (catalogue::hazardous-without-verify): its effect should be checked. The procedure of an alarm reaction may not send a hazardous telecommand.

Conditions#

requires and verify list conditions. A condition is written in one of two forms:

  • a map of measure → expected value, with within in verify only: {mode: STANDBY, within: 10s}, {voltage: args.voltage, within: 3s}. Several measures in one map must all match. A plain number is taken in the unit of the measure; text is an enum value, a quantity (28 V) or an argument (args.mode). YAML reads ON, OFF, YES and NO (any case) as booleans: for a measure whose enum has such a value, {pump: OFF} means OFF; otherwise the compiler says so (catalogue::yaml-boolean) — quote the value or write an expression ("pump is OFF"). The same holds for the values of a simulation;
  • an expression, as a string: "mode is not SAFE", "args.lines * args.integration_time <= 60 s", "responding and mode is STANDBY". See Derived Measures for the syntax.

Conditions read the measures and derived measures of the component, and the arguments of the telecommand as args.<name>. Temporal functions are refused there: declare a derived measure (ping_answered: updated_at(responding) > sent_at(ping)) and name it in the condition.

requires: preconditions#

Preconditions are checked before ACK 1, on the current value table. A condition that is false, or that reads a value absent or older than its max_age, rejects the telecommand without encoding it: the REJECTED event gives the reason.

YAML
start_acquisition:
  requires: ["can_acquire"]
release_cover:
  hazardous: true
  requires: [{mode: STANDBY, cover: CLOSED}, "not faulty"]

echo and within are refused in requires (catalogue::echo-in-requires, catalogue::within-in-requires).

verify: ACK 3#

ACK 3 is a predicate on measures, not a correlation of packets. It is evaluated only on samples received on the ground after SENT, so that a value older than the telecommand never verifies it:

  • with within, the condition must become true within the window, which starts at SENT;
  • without within, it is judged on the first samples of its measures received after SENT, waited for at most executor.ack_timeout (10 s by default).

Every verification must hold for VERIFIED. A condition without window that is false gives VERIFY_FAILED; a window that elapses gives VERIFY_TIMEOUT.

echo asks the driver, the only one that knows the bytes, to compare the frames it receives with the telecommands it encoded recently. It publishes an ECHO event with conforming; a non-conforming echo gives VERIFY_FAILED.

YAML
set_voltage:
  args:
    voltage: {type: f32, unit: V, range: [0 V, 60 V]}
  verify: [{voltage: args.voltage, within: 3s}]
set_mode:
  args:
    mode: {type: camera_mode}
  verify: [{mode: args.mode, within: 130s}]
ping:
  changes_state: false
  args:
    data: {type: bytes}
  verify: [echo]

verify and within are optional. Without verify, the telecommand goes from SENT to COMPLETE without ACK 3. That is the case of a time-tagged telecommand, executed later on board: its effect is checked afterwards by an explicit check, at the next pass for instance.

See Telecommand Lifecycle for the full state machine.

Parameters#

A component may declare parameters: on-board settings, such as the rate of a transmitter or the detector setpoint of a camera, whose value depends on the mode of the target. The topology gives their value per target and mode; configure <role> for <mode> sets them through the telecommand named by set and checks them through the measure named by readback. The whole mechanism is described in Modes and Parameters.

YAML
components:
  camera:
    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_setpoint

A parameter of a multi-instance component has a value per instance. The thermal zones of the CubeSat (cubesat-thermal) could switch their heaters with the mode, through the telecommand and the measure they already have:

YAML
components:
  thermal:
    instances: thermal_zone
    parameters:
      heater_on:
        description: Heater of the zone, on or off by mode.
        type: bool
        set: {telecommand: set_heater, arg: on}
        readback: heater_on
KeyMeaning
type, values, unit, range, descriptionAs for an argument: a number with its unit, bool, a named enum, or enum with inline values.
set{telecommand, arg}: the telecommand of the same component that sets the parameter, and the argument carrying its value. Optional: a parameter without set is only read (param) and given to the ground chain.
readbackA measure or derived measure of the same component that reads the parameter back; configure expects it to have the value of the mode. Optional.
toleranceFor a numeric parameter, the gap accepted between the readback and the value, in the unit of the parameter (0.1 degC). Without it, the readback must be equal.

Rules checked by the compiler:

  • A parameter is a number, bool or an enum value (catalogue::parameter-type).
  • set names a telecommand of the component (catalogue::unknown-setter) and one of its arguments (catalogue::unknown-setter-argument), of the type and unit of the parameter (catalogue::setter-type-mismatch). Several parameters may share one setter, each through its own argument; two parameters on the same argument are refused (catalogue::duplicate-setter).
  • Every other argument of a setter needs a default, since configure sends only the values of the parameters (catalogue::setter-argument-without-default).
  • readback names a measure or derived measure of the component (catalogue::unknown-readback) of the type and unit of the parameter (catalogue::readback-type-mismatch).
  • tolerance is for numeric parameters only (catalogue::tolerance-on-non-numeric), not negative and in the unit of the parameter (catalogue::invalid-tolerance).
  • Parameters have their own namespace: a parameter may bear the name of a measure (detector_setpoint above); param tells them apart in procedures.
  • A multi-instance component has one parameter per instance: thermal[PAYLOAD].heater_on.
  • Parameters are part of the compiled catalogue: adding one changes its hash, and so the locks of the libraries that use it.

Telecommands of the standard components#

  • files: the telecommands of the transfer protocol (list, read, write), and those a procedure sends to a file (delete_file, activate_file). An argument named file_id receives the file of the instance: send delete_file to cam.files[quicklook] needs no with. See Files and Streams.
  • stream: telecommands addressed to a stream (send start_stream to sat.stream[camera]).
  • link: the COP-1 directives unlock and set_vr, generated for every target. See COP-1 and the Link Component.

Coverage by drivers#

A driver declares the telecommands it covers (camera.set_mode). A link that carries a component needs a driver covering all its telecommands; otherwise it stays unbound with the reason (does not cover 1 of hsc-100@1.0.0, such as camera.erase_storage). See Links and Bindings.

↑↓ to moveEnter to open