Inputs
| Port | Type | Required | Description |
|---|---|---|---|
| > | Any | No | Optional gate. When closed, the path stops and no sample is recorded. |
| In | Integer or Float | Yes | The sample to add. A non-numeric or Nil value fails the Node; its On Error verb resolves the failure. |
The Window operation keeps a rolling collection of recent numbers and reports one figure over it — the minimum, maximum, mean, sum, or how many samples it is holding. The collection is bounded either by time (everything from the last N seconds) or by count (the last N samples).
A count window of one sample aggregates only the latest sample, and the Editor marks Samples with an info mark when it is set to 1.
Inputs
| Port | Type | Required | Description |
|---|---|---|---|
| > | Any | No | Optional gate. When closed, the path stops and no sample is recorded. |
| In | Integer or Float | Yes | The sample to add. A non-numeric or Nil value fails the Node; its On Error verb resolves the failure. |
Outputs
| Port | Type | Default | Description |
|---|---|---|---|
| Out | Float | Nil | The chosen aggregate over the collection as it stands after this sample was added. |
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| Window Mode | StackedDataSet | Time | How the collection is bounded. |
| Time — Seconds | Integer | 60 | Keep samples taken within the last N seconds, 1–2147483647. |
| Count — Samples | Integer | 10 | Keep the last N samples. The upper bound is the broker’s configured sample cap. |
| Aggregation | Combo | Mean | Min, Max, Mean, Sum or Count. |
| On Error | Combo | Stop this branch | Per-op On Error verb (Stop this branch / Continue with the last value / Continue with the fallback). See the Error Handling guide. |
State on Reload
Out is preserved across restarts. The collection is not: after a restart the window refills from the next sample onward.
Gate check — if the Gate is connected and closed, the path stops and nothing is recorded.
Read the input — In must carry a number. Anything else fails the Node, and its On Error verb resolves the failure.
Add — the value is appended to the collection with the moment it arrived.
Retire — in Count mode the oldest samples beyond Samples are dropped. In Time mode every sample older than Seconds is dropped. A broker-wide cap then trims whatever remains above it.
Aggregate — the chosen figure is computed over what is left, Out is written as a Float, and the path continues.
Window Mode: Count = 3 Aggregation: Mean
| Run | In | Held | Out |
|---|---|---|---|
| 1 | 10 | 10 | 10.0 |
| 2 | 20 | 10, 20 | 15.0 |
| 3 | 30 | 10, 20, 30 | 20.0 |
| 4 | 40 | 20, 30, 40 | 30.0 |
Window Mode: Count = 3 Aggregation: Max
| Run | In | Held | Out |
|---|---|---|---|
| 1 | 10 | 10 | 10.0 |
| 2 | 50 | 10, 50 | 50.0 |
| 3 | 20 | 10, 50, 20 | 50.0 |
| 4 | 30 | 50, 20, 30 | 50.0 |
| 5 | 30 | 20, 30, 30 | 30.0 (the peak has aged out) |
Window Mode: Time = 60 Aggregation: Count
Out is how many samples arrived in the last minute — a messages-per-minute figure that costs one Node.
Mean over the last 60 seconds gives Compare or Hysteresis something steadier to act on than the raw reading.Max over a rolling window holds the highest value seen recently without keeping a running maximum by hand.Count over a time window answers “how busy has this been” directly.Sum over a time window accumulates without a separate counter to reset.Window fails when In is unconnected, Nil, or not a number; the Node’s On Error verb resolves the failure.
| Verb | What it does |
|---|---|
| Stop this branch (default) | This Node and its dependents stop; Out keeps its value and reads as a failed update. |
| Continue with the last value | Dependents run on the value Out already holds, not stamped as new; it reads as a failed update. |
| Continue with the fallback | Dependents run on Out’s per-output Fallback, stamped as this run’s value; it reads as a failed update. The Editor refuses a Task where the Fallback is unset. |
A rejected sample is not added to the collection.
Count. Feed it through Convert when a downstream port requires an Integer.One host setting bounds Window. It is read at start-up from the host’s configuration file; see the Core configuration reference.
| Key | Type | Default | Effect |
|---|---|---|---|
core.windowMaxSamples | Integer | 1000 | The largest count window a Window node may request. |
The value is carried in the operation’s schema as the upper bound of the sample count, so the editor constrains the setting to it and states the accepted range.