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
ChangeOfState
change-of-state [1]: report when the monitored value matches a
configured BACnetPropertyStates value.
Fields
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
criteria: ChangeOfValueCriteriacov-criteria [1] CHOICE.
CommandFailure
command-failure [3]: report when a commanded value and its feedback
disagree.
Fields
feedback_property_reference: BACnetDeviceObjectPropertyReferencefeedback-property-reference [1] — where the feedback is read.
FloatingLimit
floating-limit [4]: report when the value leaves a band around a
setpoint reference.
Fields
setpoint_reference: BACnetDeviceObjectPropertyReferencesetpoint-reference [1] BACnetDeviceObjectPropertyReference — where
the moving setpoint is read.
OutOfRange
out-of-range [5]: report when the value leaves a fixed band.
Fields
ChangeOfLifeSafety
change-of-life-safety [8]: report when a life safety state enters
one of the listed states, or the mode changes.
Fields
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: BACnetDeviceObjectPropertyReferencemode-property-reference [3] — where the mode is read.
Extended
extended [9]: vendor-defined algorithm.
Fields
BufferReady
buffer-ready [10]: report when a log has gathered enough new
records.
Fields
UnsignedRange
unsigned-range [11]: report when an Unsigned value leaves a band.
Fields
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: BACnetDeviceObjectPropertyReferenceaccess-event-time-reference [1] — where the event’s time is read.
DoubleOutOfRange
double-out-of-range [14]: Self::OutOfRange for a Double value.
Fields
SignedOutOfRange
signed-out-of-range [15]: Self::OutOfRange for a signed value.
Fields
UnsignedOutOfRange
unsigned-out-of-range [16]: Self::OutOfRange for an Unsigned
value.
Fields
ChangeOfCharacterstring
change-of-characterstring [17]: report when a string matches one of
the listed values.
Fields
ChangeOfStatusFlags
change-of-status-flags [18]: report when one of the selected status
flags changes.
Fields
selected_flags: StatusFlagsselected-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.
ChangeOfTimer
change-of-timer [22]: report when a Timer enters one of the listed
states.
Fields
alarm_values: Vec<TimerState>alarm-values [1] — the timer states that are alarms.
update_time_reference: BACnetDeviceObjectPropertyReferenceupdate-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.
Implementations§
Source§impl BACnetEventParameter
impl BACnetEventParameter
Sourcepub fn encode(&self) -> PropertyValue
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.
Sourcepub fn decode(value: &PropertyValue) -> Result<Self, Error>
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.