Skip to main content

Steps

A step transforms a value on its way through a pipeline. A pipeline names one with op:, which is both the directory below and the crate name, with no suffix.

There are 7 steps in the tree.

StepTakesProducesConfiguration
cadenceanysame as inputevery, mode
fan-curvef32PwmDutyin_min, in_max, out_min, out_max
hysteresisf32DigitalStateon_threshold, off_threshold
max-valuef32f32-
min-valuef32f32-
moving-averagef32f32window
threshold-triggerf32ThresholdAlarmthreshold, fire_below

Each step in detail

cadence

Cadence a path: pass one of every every samples, controlling how often the downstream (typically an Outlet) is recomputed and written. On the ticks between samples it either drops the value (Decimate) or re-emits the last sampled value (SampleHold). Type-transparent (generic over the value it carries), so it declares no fixed input/output type.

Type-transparent: it declares no fixed input or output type and passes through whatever it carries.

Configuration

FieldWhere it is setTypeDefault
everypipelineu321
modepipelineCadenceModeDecimate

fan-curve

Feed-forward transfer function mapping an input reading (e.g. temperature) to a PWM duty via a linear curve, clamped to the output range. Drives a PWM Outlet directly. Threshold/hysteresis's continuous counterpart — no PID.

NameType
invaluef32
outcommandPwmDuty

Configuration

FieldWhere it is setTypeDefault
in_minpipelinef320.0
in_maxpipelinef32100.0
out_minpipelinef320.0
out_maxpipelinef321.0

hysteresis

Two-threshold hysteresis controller for feed-forward actuator control. Turns ON when the input rises to/above on_threshold and OFF when it falls to/below off_threshold, emitting a DigitalState only on a transition (edge). Drives a digital Outlet directly.

NameType
invaluef32
outcommandDigitalState

Configuration

FieldWhere it is setTypeDefault
on_thresholdpipelinef320.0
off_thresholdpipelinef320.0

max-value

Running maximum: keeps the largest value seen so far and emits it on every sample, so the output is monotonically non-decreasing. Seeded at negative infinity, so the very first sample is always its own maximum: there is no warm-up, and the step always emits, never nothing. Unconfigurable and time-independent, with no window, decay or reset, so a single outlier pins the output high for the lifetime of the pipeline.

NameType
invaluef32
outmaxf32

Configuration

No configuration.

min-value

Running minimum: keeps the smallest value seen so far and emits it on every sample, so the output is monotonically non-increasing. Seeded at positive infinity, so the very first sample is always its own minimum: there is no warm-up, and the step always emits, never nothing. Unconfigurable and time-independent, with no window, decay or reset, so a single outlier pins the output low for the lifetime of the pipeline.

NameType
invaluef32
outminf32

Configuration

No configuration.

moving-average

Arithmetic mean over a sliding window of the last window samples, summed afresh from a ring buffer on every sample so no running accumulator can drift. Emits nothing at all until the window has filled: the first window - 1 samples yield no value, and every sample after that yields the mean of the most recent window. It never emits a partial-window average or a placeholder, so anything downstream is simply not updated during the warm-up, and once filled it never returns to that state. window is silently clamped to 1..=64, so 0 becomes 1 (each sample passed through as its own average) and anything above 64 becomes 64.

NameType
invaluef32
outaveragef32

Configuration

FieldWhere it is setTypeDefault
windowpipelineusize8

threshold-trigger

Edge-triggered threshold alarm. Emits one ThresholdAlarm on each transition into the trigger region and nothing otherwise, neither while the input stays there nor when it leaves, so there is no cleared event and a consumer cannot learn from this step when the condition ends. Re-entering fires again, and with no hysteresis band or dwell time an input dithering across the threshold re-fires on every crossing (use hysteresis where that matters). fire_below picks the side: false (the default) makes the region value > threshold, true makes it value < threshold. Both comparisons are strict, so a sample equal to threshold never fires. The step starts inactive, so a first sample already inside the region counts as a transition. The alarm carries the sample that fired it and the configured threshold.

NameType
invaluef32
outalarmThresholdAlarm

Configuration

FieldWhere it is setTypeDefault
thresholdpipelinef320.0
fire_belowpipelineboolfalse
Cookie Policy