domain-tree-hwio
domain-tree-hwio decodes raw capture protobuf bytes and folds the hardware input and output (HWIO) event stream into one flat current-state object. Each field holds its last known value.
HWIO events describe physical controls and indicators, for example a selector position or a button state. The capture carries them as json_event records on a reserved entity id (9999999). Each event only carries the fields that changed on that tick, so a reader that does not carry values forward sees gaps instead of the real state. This node does the carry-forward once so downstream nodes do not have to.
It is not an event history. Once a field is folded into current state its timing is gone. Use domain-tree-hwio-events when you need the discrete occurrences.
When to use
Use this node when a widget or an Arbex script needs the final or current value of hardware controls for a session.
Pipeline position
input-node (agnostic-input) -> domain-tree-hwio -> json-filter -> system-arbex-jsThe node accepts multiple parents and folds every output of every parent into one state object.
Configuration
Configuration is optional.
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
dataSourceName | string | No | The runner default store | Name of the data source the output JSON is written to. |
Output
One JSON object with a single hwio key. Field names come from the capture. The values below are illustrative.
{
"hwio": {
"SELECTOR_A": "4",
"MODE_SELECTOR": "1",
"BUTTON_IR": "0"
}
}Fold rules:
- Every event is sorted by
time_msand folded in order. A later event overwrites an earlier value for the same field. Fields from different events accumulate. - Every event name is folded, including discrete hardware events. The node does not filter by
event_name. - Frame time prefers the capture time stamp over the packet upload time stamp. It falls back to the upload time stamp only when capture time is absent or zero.
The output is written as a node output to the configured data source.
Limitations
- Timing is lost. The output says what the last value was, not when it changed.
- Fields from every event name are mixed into one object. Filter downstream if you need only the state bus.
- The node fails when no data source can be resolved, either from
dataSourceNameor from the runner default store.
Related
- domain-tree-hwio-events emits the same events as a chronological list.
- domain-tree-entities folds entity state from the same capture bytes.
- json-filter narrows the state object to the fields a widget needs.