pub(crate) struct SampleConfig {Show 13 fields
pub(crate) labjack_on_off: bool,
pub(crate) scans_per_read: i32,
pub(crate) scan_rate_hz: f64,
pub(crate) channels: Vec<u8>,
pub(crate) asset_number: u32,
pub(crate) labjack_name: String,
pub(crate) site_id: Option<String>,
pub(crate) box_id: Option<String>,
pub(crate) source_type: Option<String>,
pub(crate) source_id: Option<String>,
pub(crate) nats_subject: String,
pub(crate) nats_stream: String,
pub(crate) rotate_secs: u64,
}Expand description
Normalized streamer configuration used by the sampling loop.
This is the compact runtime shape derived from the dashboard’s nested JSON.
Equality is used by the KV watcher (watch_kv_config) to decide whether a new
value should restart the LabJack stream, so a change to any field, including
ones the streamer does not use such as rotate_secs, restarts it.
Fields§
§labjack_on_off: boolWhether sampling is enabled.
scans_per_read: i32Scans returned by each LJM stream read.
scan_rate_hz: f64Requested scan rate in Hz. The device may run at a slightly different rate.
channels: Vec<u8>Analog input numbers to stream, in scan order.
asset_number: u32Asset number used in legacy subjects.
labjack_name: StringLogical LabJack name, used as the fallback source token in subjects.
site_id: Option<String>Site identifier for structured subjects.
box_id: Option<String>Box identifier for structured subjects.
source_type: Option<String>Source type. Not used in subjects.
source_id: Option<String>Source identifier for structured subjects.
nats_subject: StringSubject root.
nats_stream: StringJetStream stream name.
rotate_secs: u64Archiver file rotation period in seconds. Not used by the streamer.
Trait Implementations§
Source§impl Clone for SampleConfig
impl Clone for SampleConfig
Source§fn clone(&self) -> SampleConfig
fn clone(&self) -> SampleConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more