pub struct SensorUpsert {
pub source_key: String,
pub name: String,
pub serial_number: Option<String>,
pub manufacturer: Option<String>,
pub model: Option<String>,
pub notes: Option<String>,
pub is_lab_instrument: bool,
pub data_frequency: Option<String>,
pub metadata: Option<Value>,
}Expand description
One instrument from a source’s own register, to introduce into river-data.
For a source whose instruments do not each have a stream: every other instrument is minted as a side effect of registering the stream that names it, and a portal’s instrument register has no streams to mint from. Registration is idempotent per (source_system, source_key), and a row the API already holds under that key is never rewritten.
Fields§
§source_key: StringThe instrument’s identity within the source, e.g. “sensor_inventory:62”.
name: String§serial_number: Option<String>The lab’s own serial. The API claims it only when no other instrument holds it, and says which one does when it declines.
manufacturer: Option<String>§model: Option<String>§notes: Option<String>§is_lab_instrument: boolTrue for an instrument that corrects a grab in the lab rather than standing in a river.
data_frequency: Option<String>The cadence the instrument logs at (‘high’ | ‘low’), read as a declaration when a stream classifies its readings. None leaves the API’s default of ‘high’.
metadata: Option<Value>Whatever the source knows that river-data has no column for.
Trait Implementations§
Source§impl Clone for SensorUpsert
impl Clone for SensorUpsert
Source§fn clone(&self) -> SensorUpsert
fn clone(&self) -> SensorUpsert
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more