File Reader
Node ID: fileReader · Role: Source · Realtime config: no
Description
Replays recorded sensor data from JSON line files. Supports rate control and all data types. Useful for offline analysis and testing.
Inputs / Outputs
- Inputs: (none)
- Outputs:
Any
Config aliases
FileReader, fileReader, filereader
Properties
The following fields are exposed in the node’s Properties panel in the UI. Types map to UI widgets (e.g. string → text input, number → numeric, boolean → toggle, select → dropdown, json → JSON editor).
| Key | Label | Type | Default | Description / Notes |
|---|---|---|---|---|
filename | File Path | filepath | "" | Path to the JSON-lines log file to replay. |
realTime | Real-Time Playback | boolean | true | Pace playback so wall-clock advances at the same rate as data timestamps. Disable to use Playback Interval instead (for deterministic test harnesses). |
loop | Loop Playback | boolean | true | — |
playbackInterval | Playback Interval (s) | number | 0.0 | Used only when Real-Time Playback is off. Fixed sleep between emitted samples in seconds (0 = no sleep, max speed). |
exitOnEnd | Exit Process On End | boolean | false | Exit the process when playback reaches end-of-file (used by deterministic test harnesses). |
Example node definition
A full node definition in config.json looks like the block below. Paste it under the sources key of your config, keyed by the node’s instance name (any identifier; it doesn’t have to match the node ID).
{
"sources": {
"fileReader": {
"outEndpoint": "inproc://fileReader_data",
"settings": {
"exitOnEnd": false,
"filename": "",
"loop": true,
"playbackInterval": 0.0,
"realTime": true
}
}
}
}
Field reference
| Field | Purpose |
|---|---|
outEndpoint | ZMQ / inproc endpoint this source binds to publish its output. The runtime auto-generates one if omitted. |
settings | All user-configurable fields — see the Properties table above. |
Connections can also be declared at the top-level
connectionsarray whensettings.explicitConnectionsistrue, as an alternative to fillinginputEndpointson each node.