Skip to main content

BACnetEventParameter

Enum BACnetEventParameter 

Source
pub enum BACnetEventParameter {
Show 20 variants ChangeOfBitstring { time_delay: u32, bitmask: (u8, Vec<u8>), list_of_values: Vec<(u8, Vec<u8>)>, }, ChangeOfState { time_delay: u32, list_of_values: Vec<BACnetPropertyStates>, }, ChangeOfValue { time_delay: u32, criteria: ChangeOfValueCriteria, }, CommandFailure { time_delay: u32, feedback_property_reference: BACnetDeviceObjectPropertyReference, }, FloatingLimit { time_delay: u32, setpoint_reference: BACnetDeviceObjectPropertyReference, low_diff_limit: f32, high_diff_limit: f32, deadband: f32, }, OutOfRange { time_delay: u32, low_limit: f32, high_limit: f32, deadband: f32, }, ChangeOfLifeSafety { time_delay: u32, list_of_life_safety_alarm_values: Vec<LifeSafetyState>, list_of_alarm_values: Vec<LifeSafetyState>, mode_property_reference: BACnetDeviceObjectPropertyReference, }, Extended { vendor_id: u16, extended_event_type: u32, parameters: Vec<u8>, }, BufferReady { notification_threshold: u32, previous_notification_count: u32, }, UnsignedRange { time_delay: u32, low_limit: u64, high_limit: u64, }, AccessEvent { list_of_access_events: Vec<AccessEvent>, access_event_time_reference: BACnetDeviceObjectPropertyReference, }, DoubleOutOfRange { time_delay: u32, low_limit: f64, high_limit: f64, deadband: f64, }, SignedOutOfRange { time_delay: u32, low_limit: i32, high_limit: i32, deadband: u64, }, UnsignedOutOfRange { time_delay: u32, low_limit: u64, high_limit: u64, deadband: u64, }, ChangeOfCharacterstring { time_delay: u32, list_of_alarm_values: Vec<String>, }, ChangeOfStatusFlags { time_delay: u32, selected_flags: StatusFlags, }, None, ChangeOfDiscreteValue { time_delay: u32, }, ChangeOfTimer { time_delay: u32, alarm_values: Vec<TimerState>, update_time_reference: BACnetDeviceObjectPropertyReference, }, Opaque { tag: u8, data: Vec<u8>, },
}
Expand description

Structured Event_Parameters for an EventEnrollment object.

Models every algorithm alternative of the Clause 21 BACnetEventParameter CHOICE. A context tag the 2020 production doesn’t assign (a later addendum’s or a vendor’s) is preserved verbatim via BACnetEventParameter::Opaque, so values written by a remote client are never silently discarded.

The wire form is the full ASN.1 CHOICE framing of the Clause 21 production, produced by bacnet_encoding::constructed::encode_event_parameter / decode_event_parameter and carried in PropertyValue::ApplicationData. The PropertyValue::List form here (leading algorithm tag as PropertyValue::Unsigned; see BACnetEventParameter::encode and BACnetEventParameter::decode) is the LEGACY pre-framing layout, kept for compatibility with values written before the framing migration (#154).

Variants§

§

ChangeOfBitstring

change-of-bitstring [0]: report when masked bits match a value.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§bitmask: (u8, Vec<u8>)

bitmask [1] BIT STRING — bits of interest.

§list_of_values: Vec<(u8, Vec<u8>)>

list-of-bitstring-values [2], a list of bit strings — alarm values.

§

ChangeOfState

change-of-state [1]: report when the monitored value matches a configured BACnetPropertyStates value.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§list_of_values: Vec<BACnetPropertyStates>

list-of-values [1], a list of BACnetPropertyStates — alarm values.

§

ChangeOfValue

change-of-value [2]: report on a bitmask or increment change.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§criteria: ChangeOfValueCriteria

cov-criteria [1] CHOICE.

§

CommandFailure

command-failure [3]: report when a commanded value and its feedback disagree.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§feedback_property_reference: BACnetDeviceObjectPropertyReference

feedback-property-reference [1] — where the feedback is read.

§

FloatingLimit

floating-limit [4]: report when the value leaves a band around a setpoint reference.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§setpoint_reference: BACnetDeviceObjectPropertyReference

setpoint-reference [1] BACnetDeviceObjectPropertyReference — where the moving setpoint is read.

§low_diff_limit: f32

low-diff-limit [2] REAL — how far below the setpoint the value may fall.

§high_diff_limit: f32

high-diff-limit [3] REAL — how far above the setpoint the value may rise.

§deadband: f32

deadband [4] REAL — hysteresis applied on the return to normal.

§

OutOfRange

out-of-range [5]: report when the value leaves a fixed band.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§low_limit: f32

low-limit [1] REAL.

§high_limit: f32

high-limit [2] REAL.

§deadband: f32

deadband [3] REAL.

§

ChangeOfLifeSafety

change-of-life-safety [8]: report when a life safety state enters one of the listed states, or the mode changes.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§list_of_life_safety_alarm_values: Vec<LifeSafetyState>

list-of-life-safety-alarm-values [1] — states that are life-safety alarms.

§list_of_alarm_values: Vec<LifeSafetyState>

list-of-alarm-values [2] — states that are ordinary alarms.

§mode_property_reference: BACnetDeviceObjectPropertyReference

mode-property-reference [3] — where the mode is read.

§

Extended

extended [9]: vendor-defined algorithm.

Fields

§vendor_id: u16

vendor-id [0] Unsigned16.

§extended_event_type: u32

extended-event-type [1] Unsigned.

§parameters: Vec<u8>

Encoded parameters [2] list items (each a CHOICE), without the enclosing tag pair.

§

BufferReady

buffer-ready [10]: report when a log has gathered enough new records.

Fields

§notification_threshold: u32

notification-threshold [0] Unsigned — new records that trigger a notification.

§previous_notification_count: u32

previous-notification-count [1] Unsigned32 — the record count at the last notification.

§

UnsignedRange

unsigned-range [11]: report when an Unsigned value leaves a band.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§low_limit: u64

low-limit [1] Unsigned.

§high_limit: u64

high-limit [2] Unsigned.

§

AccessEvent

access-event [13]: report the listed access events.

Fields

§list_of_access_events: Vec<AccessEvent>

list-of-access-events [0] — the events to report.

§access_event_time_reference: BACnetDeviceObjectPropertyReference

access-event-time-reference [1] — where the event’s time is read.

§

DoubleOutOfRange

double-out-of-range [14]: Self::OutOfRange for a Double value.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§low_limit: f64

low-limit [1] Double.

§high_limit: f64

high-limit [2] Double.

§deadband: f64

deadband [3] Double.

§

SignedOutOfRange

signed-out-of-range [15]: Self::OutOfRange for a signed value.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§low_limit: i32

low-limit [1] INTEGER.

§high_limit: i32

high-limit [2] INTEGER.

§deadband: u64

deadband [3] Unsigned.

§

UnsignedOutOfRange

unsigned-out-of-range [16]: Self::OutOfRange for an Unsigned value.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§low_limit: u64

low-limit [1] Unsigned.

§high_limit: u64

high-limit [2] Unsigned.

§deadband: u64

deadband [3] Unsigned.

§

ChangeOfCharacterstring

change-of-characterstring [17]: report when a string matches one of the listed values.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§list_of_alarm_values: Vec<String>

list-of-alarm-values [1] — the alarm strings.

§

ChangeOfStatusFlags

change-of-status-flags [18]: report when one of the selected status flags changes.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§selected_flags: StatusFlags

selected-flags [1] BACnetStatusFlags — the flags watched.

§

None

none [20] NULL: no algorithm; the enrollment only reports faults.

§

ChangeOfDiscreteValue

change-of-discrete-value [21]: report any change of a discrete value.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§

ChangeOfTimer

change-of-timer [22]: report when a Timer enters one of the listed states.

Fields

§time_delay: u32

time-delay [0] Unsigned — debounce seconds.

§alarm_values: Vec<TimerState>

alarm-values [1] — the timer states that are alarms.

§update_time_reference: BACnetDeviceObjectPropertyReference

update-time-reference [2] — where the timer’s update time is read.

§

Opaque

Preserves an alternative under a context tag the 2020 production doesn’t assign.

data is the complete SEQUENCE body. The framed encoder rejects the assigned, omitted, deprecated and reserved tags in this variant; tag 255 is the internal marker of a legacy raw-octet value.

Fields

§tag: u8

The unrecognized algorithm tag.

§data: Vec<u8>

The raw parameter bytes.

Implementations§

Source§

impl BACnetEventParameter

Source

pub fn encode(&self) -> PropertyValue

Encode this parameter set as a flat PropertyValue::List.

The first element is the algorithm tag as PropertyValue::Unsigned, followed by the variant’s fields in declaration order. This is the LEGACY pre-framing layout (see #154); the wire form is the full ASN.1 framing from bacnet_encoding::constructed::encode_event_parameter. See Self::decode for the inverse.

Source

pub fn decode(value: &PropertyValue) -> Result<Self, Error>

Decode a PropertyValue previously produced by Self::encode.

Returns Ok with the reconstructed parameter set, or a decoding Error when the value is not a List, is empty, or has an unrecognized/inconsistent shape. Opaque values round-trip unchanged.

Source§

impl BACnetEventParameter

Source

pub fn tag(&self) -> u8

Return the algorithm tag for this alternative.

Trait Implementations§

Source§

impl Clone for BACnetEventParameter

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 BACnetEventParameter

Source§

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

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

impl PartialEq for BACnetEventParameter

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 BACnetEventParameter

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.