All docsStellar ControlMission control · by Stellar Systems v1.1.0

Topology

Link Parameters

Parameters of a link, overridden by environment, given to the driver and the transport.

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 unit on its integration bench and on the flatsat, with different values.

YAML
targets:
  # The engineering model of the camera, on its integration bench, then on the CAN bus of the
  # flatsat, where the ground has another CSP address.
  cam-em-1:
    platform: hsc-100@1.0.0
    environments: [BENCH, FLATSAT]
    links:
      can:
        driver: hsc-100-csp@1
        transport: csp1-can@1
        gateway: bench-can-1
        default: true
        params: {csp_address: 6}
        environments:
          FLATSAT: {params: {csp_address: 10}}
  sat-fm-1:
    platform: cubesat-6u@1.0.0
    environments: [FM, in_orbit]
    links:
      sband:
        driver: cubesat-6u-ccsds@1
        transport: ccsds-tc@1
        gateway: "any(tag: sband)"
        default: true
        params: {scid: 0x2C5, tm_length: 256}

Declaring parameters#

  • params maps names to booleans, numbers or text: {scid: 0x2C5, tm_ocf: true, t1: 2.5}. Names are identifiers (topology::invalid-param).
  • environments overrides them key by key for some environments of the target: FLATSAT: {params: {csp_address: 10}}. 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.

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 hsc-100-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):

CaseEnvironment used
Declared, and the target is engaged in itThat one
Declared, but the target is not engaged in itRefused: tc::unknown-environment
Not declared, target engaged in a single environmentThat one
Not declared, the link overrides parameters by environment, target engaged in severalRefused: tc::environment-required
Not declared otherwiseNone: that of the last telecommand of the link, see below
Shell
stellar send cam-em-1 camera.housekeeping --environment FLATSAT

A 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, a transport and a gateway may declare the JSON Schema of the parameters they read (params_schema, an object schema with properties). A gateway declares the settings of its port: rate, termination, electrical mode. 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 the driver and the transport declare a schema; the schema of the gateway adds the keys of its port;
  • a component without schema is not checked.

A refusal leaves the link unbound, with the reason in the readiness of the target:

text
link `can`: parameters of link in `FLATSAT` refused by driver `hsc-100-csp-1`: `csp_address`: 40 is greater than the maximum of 31

Several targets on one gateway#

A CAN or RS-485 bus often carries several targets (the camera and the EPS of a flatsat): one gateway serves several links. Its parameters are of two kinds:

  • port parameters, every key of the schema of the gateway but rx_filter (rate, termination, electrical mode): one bus has one setting, so they must be equal on every link bound to the gateway, in the base parameters and in every environment. Otherwise none of these links is bound, each with the reason gateway-param-conflict naming the key and the other link;
  • rx_filter, a link parameter: which received frames go to the target of the link. On CAN, "0x200/0x700" (identifier and mask, hexadecimal or decimal), "0x211" or an integer (that identifier); on RS-485, the address the gateway reads. A link without filter takes every frame of the bus.
YAML
targets:
  cam-em-1:
    links:
      bus: {driver: hsc-100-csp@1, transport: csp1-can@1, gateway: bench-can-1, params: {csp_address: 10, bitrate: 1000000, rx_filter: "0x6000000/0x1F000000"}}
  eps-em-1:
    links:
      bus: {driver: cubesat-eps-csp@1, transport: csp1-can@1, gateway: bench-can-1, params: {csp_address: 10, bitrate: 1000000, rx_filter: "0x2000000/0x1F000000"}}

The reconciler checks the port parameters when it binds, as the gateway declares them; the compiler does not know the schema of a gateway.

Parameters of the example components#

ccsds-tc (transport of space packets in CCSDS TC frames under COP-1, and back from TM frames):

ParameterTypeDefaultMeaning
scidinteger 0–1023requiredSpacecraft identifier of the TC and TM frames
vcidinteger 0–630Virtual channel of the telecommands
windowinteger 1–25510Sliding window K of the FOP, below W/2 of the FARM
t1number, seconds, above 0 up to 36005Timer T1 of the FOP
transmission_limitinteger 1–2553Transmissions of a frame, the first one included
tm_lengthinteger 16–20481115Length of the TM frames, in octets
tm_ocfbooleantrueTM frames with an Operational Control Field (the CLCW)
tm_fecfbooleantrueTM frames with a Frame Error Control Field

csp1-kiss, csp2-kiss (CSP packets in KISS frames):

ParameterTypeDefaultMeaning
crc32booleantruePackets sent up with their CRC32 (CRC-32C), flagged in their header

csp1-can, csp2-can (CSP packets on a CAN bus, CFP of libcsp):

ParameterTypeDefaultMeaning
crc32booleantruePackets sent up with their CRC32 (CRC-32C), flagged in their header
viainteger 0–31the destinationCFP 1: the node of the bus the packets go through
can_addressinteger 0–63the source of the packetCFP 2: the address of the CAN interface of the ground, sender of the frames
reassembly_timeout_msinteger, at least 11000How long a packet down may take to arrive whole

hsc-100-csp (driver of the hsc-100 camera, in the payload integration repository):

ParameterTypeDefaultMeaning
csp_addressinteger 0–31requiredCSP address of the ground on the link

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.

↑↓ to moveEnter to open