pub trait Measurement: Display {
    fn signal_id(&self) -> Uuid;
    fn set_signal_id(&mut self, signal_id: Uuid);
    fn value(&self) -> f64;
    fn set_value(&mut self, value: f64);
    fn timestamp(&self) -> Ticks;
    fn set_timestamp(&mut self, timestamp: Ticks);
    fn flags(&self) -> StateFlags;
    fn set_flags(&mut self, flags: StateFlags);
    fn timestamp_value(&self) -> u64;
    fn datetime(&self) -> DateTime<Utc>;

    fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { ... }
}
Expand description

Defines a trait representing measured data in the STTP API.

Required Methods§

Gets measurement’s globally unique identifier.

Sets measurement’s globally unique identifier.

Gets instantaneous value of the measurement.

Sets instantaneous value of the measurement.

Gets the STTP uint64 timestamp, in ticks, that measurement was taken.

Sets the STTP uint64 timestamp, in ticks, that measurement was taken.

Gets flags indicating the state of the measurement as reported by the device that took it.

Sets flags indicating the state of the measurement as reported by the device that took it.

Gets the integer-based time from a Measurement ticks-based timestamp, i.e., the 62-bit time value excluding any leap-second flags.

Gets Measurement ticks-based timestamp as a standard Rust DateTime value.

Provided Methods§

Formats the Measurement using a default formatter.

Implementors§