Skip to main content

LogDatum

Enum LogDatum 

Source
pub enum LogDatum {
    LogStatus(u8),
    BooleanValue(bool),
    RealValue(f32),
    EnumValue(u32),
    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

The datum field of a BACnetLogRecord: a CHOICE covering all possible logged value types.

Context tags per spec (Clause 12.20.5):

  • [0] log-status (BACnetLogStatus, 8-bit flags)
  • [1] boolean-value
  • [2] real-value
  • [3] enum-value (unsigned)
  • [4] unsigned-value
  • [5] signed-value
  • [6] bitstring-value
  • [7] null-value
  • [8] failure (BACnetError)
  • [9] time-change (REAL, clock-adjustment seconds)
  • [10] any-value (raw application-tagged bytes)

Variants§

§

LogStatus(u8)

Log-status flags (context tag 0). Bit 0=log-disabled, bit 1=buffer-purged, bit 2=log-interrupted.

§

BooleanValue(bool)

Boolean value (context tag 1).

§

RealValue(f32)

Real (f32) value (context tag 2).

§

EnumValue(u32)

Enumerated value (context tag 3).

§

UnsignedValue(u64)

Unsigned integer value (context tag 4).

§

SignedValue(i64)

Signed integer value (context tag 5).

§

BitstringValue

Bit-string value (context tag 6).

Fields

§unused_bits: u8

Number of unused bits in the last byte.

§data: Vec<u8>

The bit data.

§

NullValue

Null value (context tag 7).

§

Failure

Error (context tag 8): error class + error code.

Fields

§error_class: u32

Raw BACnet error class value.

§error_code: u32

Raw BACnet error code value.

§

TimeChange(f32)

Time-change: clock-adjustment amount in seconds (context tag 9).

§

AnyValue(Vec<u8>)

Any-value: raw application-tagged bytes for types not enumerated above (context tag 10).

Trait Implementations§

Source§

impl Clone for LogDatum

Source§

fn clone(&self) -> LogDatum

Returns a duplicate of the value. Read more
1.0.0 · 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 PartialEq for LogDatum

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.