Types¤
Shared types: runtime dataclasses (Measurement/Command) and cross-protocol Pydantic configs.
BackgroundDaemonConfig
dataclass
¤
Measurement
dataclass
¤
Measurement(
channel_data: dict[str, list[float]],
timestamps: list[int],
tags: dict[str, str] | None = None,
)
Data structure to hold measurement data. All channels have a common timebase.
values
property
¤
Values for the only channel; raises ValueError if the Measurement holds multiple channels.
latest
property
¤
Most recent value of the only channel; raises ValueError if the Measurement holds multiple.
create_timestamps_from_dt
staticmethod
¤
Build a length-long timestamp list at dt ns spacing starting at t0 (ns since epoch).
With backstamp=True, shift t0 back by dt * (length - 1) so the
last sample lands at the original t0 (useful when t0 is the
completion time of a finite acquisition).
Command
dataclass
¤
DeviceInfo
¤
Bases: BaseModel
Device metadata. name is the channel-name prefix on publish (e.g. my_device.temperature).
LinearScale
¤
Bases: BaseModel
Linear scaling: physical = offset + (gain * raw).
Applied automatically on reads (raw -> physical) and reversed on writes (physical -> raw). Not all protocols or data point types support scaling -- check the protocol-specific documentation.