All docsStellar LinkRF bench · by Stellar Systems v0.4.0

Control & Automation

Campaigns

The stellarlink.campaign/v1 roadmap: scenario, board and gate steps, failure policy, schedules, the persistent cursor, and the shipped health-check campaigns.

A campaign chains whole runs in order: scenarios, actions on the unit, and gates that refuse to go further unless the unit is in a state worth measuring. It keeps a cursor in persistent storage, can be paused at a step boundary and resumed, and a single step can be re-run.

Campaigns are a sequence, not a timeline: each step starts when the previous one finishes, because the length of a scenario or of a restart is not known in advance.

Example#

Adapted from the shipped release_healthcheck campaign:

YAML
version: "stellarlink.campaign/v1"

metadata:
  name: "release_healthcheck"
  display_name: "Health check"
  description: >
    A byte-exact internal loopback first, then every modulation, coding,
    scrambler setting, symbol rate and frame length the product offers.
  tags: ["healthcheck"]

schedule:
  cron: "0 3 * * *"
  skip_if_running: true

steps:
  - id: "counters_clear"
    description: "Nothing has been fed yet, so nothing should have been counted."
    gate: { check: "counters_clear" }

  - id: "pl_reference"
    board: { do: "apply_profile", name: "pl_loopback" }

  - id: "pl_target"
    board: { do: "condition_chain", target: "pl" }

  - id: "byte_exact"
    gate: { check: "byte_exact_loopback", min_accuracy_pct: 99.0, blocks: 4 }

  - id: "mod_qpsk"
    scenario: { name: "hc_qpsk", timeout_s: 120 }

  - id: "mod_bpsk"
    scenario: { name: "hc_bpsk", timeout_s: 120 }
    on_failure: "continue"

File structure#

KeyRequiredMeaning
versionyesMust be stellarlink.campaign/v1
metadata.nameyesIdentifier used to run it
metadata.descriptionyesWhat the campaign establishes
metadata.display_name, author, tagsnoShown in listings
schedulenoStart automatically (see Schedules). Absent: manual only
stepsyesThe roadmap
pass_criteria.toleratednoSteps allowed to fail without failing the campaign

Each step has a unique id, an optional description, exactly one of scenario, board or gate, and an optional on_failure (stop, the default, or continue).

Step kinds#

scenario#

YAML
- id: "fec_conv"
  scenario: { name: "hc_qpsk_conv", timeout_s: 120 }
  on_failure: "continue"

Runs a scenario by name and takes its verdict. timeout_s gives up on the run after that long. A cancelled scenario run fails the step; the step detail says it was cancelled.

board#

doFieldsEffect
apply_profilenameApply a profile
condition_chaintarget, profile (optional)Condition the chain for a target (see Chain Conditioning). Name the profile here: the conditioning applies it after tuning, so a separate apply_profile before it would be undone. Refused when no profile has been applied since start-up and none is named
recover—Reset the receiver's tracking loops, without a restart
waitsecondsWait, for a settling time with no better observable
rebootwait_s (default 180)Restart the unit and wait for the API
power_cyclewait_s (default 180)Cut and restore the unit's power and wait for it

gate#

checkFieldsPasses when
byte_exact_loopbackmin_accuracy_pct (default 99.0), blocks (default 4)The internal loopback returns a payload with at least this byte accuracy over blocks blocks
counters_clear—The modem's frame counters read zero before anything was fed. A non-zero counter means state is left over from an earlier run, and every later reading would include it
rf_receiver_probed—The AD9361's receive interface came up when the unit started. Without it nothing can be received over the air, even when the internal loopback passes

A gate always stops the campaign when it fails: a gate declared with on_failure: continue is refused at load. The byte-exact gate uses 99.0 % rather than 100 % to allow for a small edge effect at the boundaries of each captured block (about 0.1 point), which is not a demodulation error.

The byte-exact gate is the one everything else rests on: a receive path can lock and count frames while delivering wrong bytes, and nothing measured in that state means anything.

Pass criteria#

YAML
pass_criteria:
  tolerated:
    - step: "rate_156k"
      reason: "156 kbaud variant not required for this mission"

The campaign passes when every step passed, except the tolerated ones. Each tolerated entry needs a non-empty reason, or the file is refused.

Running and following#

Shell
stellarlinkctl campaign list
stellarlinkctl campaign get release_healthcheck
stellarlinkctl campaign run release_healthcheck --follow
stellarlinkctl campaign active                 # what is running, and the board provider
stellarlinkctl campaign runs                   # every execution, newest first
stellarlinkctl campaign status <id>            # cursor, attempts, verdict
stellarlinkctl campaign pause <id>             # stop at the NEXT step boundary
stellarlinkctl campaign resume <id> --follow
stellarlinkctl campaign rerun <id> <step-id>   # run one step again, appending an attempt

--follow polls the saved state rather than a WebSocket, so it picks the campaign back up when the unit returns from a restart. The same operations are available under /api/v1/campaigns and /api/v1/campaign-runs, and ws://<unit>:8080/ws/campaign-runs/{id} streams progress.

The cursor is kept on persistent storage (the data partition when present, see [daemon] campaign_state_dir), so it survives restarts and power cuts. Only the position and the verdicts are kept there; the scenario reports are in the run store (see Assertions and Reports).

Renaming a step's id breaks a saved cursor on purpose: resuming at a step that no longer exists fails loudly rather than resuming somewhere else.

Schedules#

YAML
schedule:
  cron: "0 3 * * *"          # minute hour day-of-month month day-of-week
  skip_if_running: true      # default

A five-field cron expression, in the unit's local time, validated at load. With skip_if_running, a firing while the previous run is still going is skipped rather than queued.

Shipped campaigns#

CampaignPurpose
release_healthcheckGates on clean counters and a byte-exact internal loopback, then runs every internal-loopback health-check variant: QPSK, BPSK, GMSK, convolutional, RS, RS+convolutional, scrambler off, 39 and 156 kbaud, 1024-byte frames, CCSDS TM transfer frames. Scheduled daily at 03:00
device_loopback_healthcheckQPSK through the AD9361's internal digital loopback (hc_dev_qpsk)
rf_healthcheckQPSK, BPSK and GMSK over the air path through an external cable loopback (hc_air_*). Run it after a fresh start-up

↑↓ to moveEnter to open