Skip to main content

LogDatum

Enum LogDatum 

Source
pub enum LogDatum {
    LogStatus(LogStatus),
    BooleanValue(bool),
    RealValue(f32),
    EnumValue(u64),
    UnsignedValue(u64),
    SignedValue(i64),
    BitstringValue {
        unused_bits: u8,
        data: Vec<u8>,
    },
    NullValue,
    Failure {
        error_class: u32,
        error_code: u32,
    },
    TimeChange(f32),
    AnyValue(Vec<u8>),
}
Expand description

What a Trend Log record carries: a sampled value, the error that stopped the sample, a status change of the log, or a clock change.

On the wire each alternative takes a context tag, 0 to 10 in declaration order; the encoding crate owns that numbering.

Variants§

§

LogStatus(LogStatus)

A status change of the log itself.

§

BooleanValue(bool)

A BOOLEAN value.

§

RealValue(f32)

A REAL value.

§

EnumValue(u64)

An ENUMERATED value. A logging device may hold these to 32 bits but need not, so a decoded record keeps up to 64.

§

UnsignedValue(u64)

An Unsigned value, up to 64 bits.

§

SignedValue(i64)

An INTEGER value, up to 64 bits.

§

BitstringValue

A BIT STRING value.

Fields

§unused_bits: u8

Padding bits at the end of the final octet, 0 to 7.

§data: Vec<u8>

The bit data.

§

NullValue

A NULL value.

§

Failure

The error that kept the value from being logged.

Fields

§error_class: u32

Raw BACnet error class value.

§error_code: u32

Raw BACnet error code value.

§

TimeChange(f32)

The device clock moved by this many seconds; zero when unknown.

§

AnyValue(Vec<u8>)

A value of any other datatype, as the tagged encoding a property read carries for it: one or more complete values, context tags balanced.

Trait Implementations§

Source§

impl Clone for LogDatum

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LogDatum

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<LogValue> for LogDatum

Source§

fn from(value: LogValue) -> Self

The same sampled value as a Trend Log datum.

Source§

impl PartialEq for LogDatum

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LogDatum

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.