ExternalStateInput class final

One piece of state that arrived from outside the simulation for one step: a temperature from a plant's sensor, a valve's position from a log, a headset's pose.

Input, not an override. It enters with the step's other input (an InputFrame's external), goes on the tape with the step it was fed in, and replays with it; what the simulation makes of it is the business of an Assimilation inside the step, which decides between the sensor and the model. So a run fed by telemetry replays bit for bit and a server can verify it, as a run fed by a keyboard does.

Fed on a live step, or lost. InputState.feedExternal drops a reading while the input is muted, as it is during a replay, so one that arrives then would otherwise never reach the run. A source on its own clock queues its readings and drains the queue in EngineLoop.onStepInput, which runs at the start of every live step and never during a replay.

Numbers with a unit. value is the reading's components (one for a temperature, seven for a pose: position and a quaternion) in unit, or unitless where unit is null. Times are seconds, on the clocks their names say.

Constructors

ExternalStateInput({required String source, required List<double> value, Unit? unit, double? sourceSeconds, double? receivedSeconds, ReadingQuality? quality, ReadingKind? kind, String? tag, Map<String, Object?> unknown = const <String, Object?>{}})
A reading from source of value in unit.
ExternalStateInput.fromJson(Object? json)
Reads what toJson wrote; a step beside it is the tape's and is passed over. Throws a PluginFormatException naming the field that is not what it says.
factory
ExternalStateInput.quantity(String source, Quantity quantity, {double? sourceSeconds, double? receivedSeconds, ReadingQuality? quality, ReadingKind? kind, String? tag})
One quantity from source: its value in its unit.
factory

Properties

hashCode → int
The hash code for this object.
no setteroverride
kind → ReadingKind?
How it came to be; null when its source does not say.
final
quality → ReadingQuality?
How far its source trusts it; null when it does not say.
final
quantity → Quantity
value as a Quantity, for a reading of one component with a unit. Throws a StateError for any other.
no setter
receivedSeconds → double?
When the engine received it, seconds on the receiving machine's clock; null when not recorded.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → String
Where it comes from, by the name the simulation knows it under: a sensor's tag, a channel, xr.head.
final
sourceSeconds → double?
When the source took it, seconds on the source's clock; null when it does not say.
final
tag → String?
Free text its source attaches: a batch, a line, a device's serial.
final
unit → Unit?
The unit of value, or null for a number with none.
final
unknown → Map<String, Object?>
Fields a later build wrote that this one does not know, kept and written back as they were.
final
value → List<double>
Its components, in unit.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
The reading as plain values: what the tape's externalInputs and the wire hold, beside the step the tape adds.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override