use super::property_states::{
decode_device_obj_prop_ref, decode_property_states, decode_status_flags,
encode_property_states, extract_raw_context,
};
use super::*;
mod decode;
mod decode_timer;
mod encode;
#[derive(Debug, Clone, PartialEq)]
pub enum NotificationParameters {
ChangeOfBitstring {
referenced_bitstring: (u8, Vec<u8>),
status_flags: u8,
},
ChangeOfState {
new_state: BACnetPropertyStates,
status_flags: u8,
},
ChangeOfValue {
new_value: ChangeOfValueChoice,
status_flags: u8,
},
CommandFailure {
command_value: Vec<u8>,
status_flags: u8,
feedback_value: Vec<u8>,
},
FloatingLimit {
reference_value: f32,
status_flags: u8,
setpoint_value: f32,
error_limit: f32,
},
OutOfRange {
exceeding_value: f32,
status_flags: u8,
deadband: f32,
exceeded_limit: f32,
},
ChangeOfLifeSafety {
new_state: u32,
new_mode: u32,
status_flags: u8,
operation_expected: u32,
},
Extended {
vendor_id: u16,
extended_event_type: u32,
parameters: Vec<u8>,
},
BufferReady {
buffer_property: BACnetDeviceObjectPropertyReference,
previous_notification: u32,
current_notification: u32,
},
UnsignedRange {
exceeding_value: u64,
status_flags: u8,
exceeded_limit: u64,
},
AccessEvent {
access_event: u32,
status_flags: u8,
access_event_tag: u32,
access_event_time: (Date, Time),
access_credential: BACnetDeviceObjectPropertyReference,
authentication_factor: Vec<u8>,
},
DoubleOutOfRange {
exceeding_value: f64,
status_flags: u8,
deadband: f64,
exceeded_limit: f64,
},
SignedOutOfRange {
exceeding_value: i32,
status_flags: u8,
deadband: u64,
exceeded_limit: i32,
},
UnsignedOutOfRange {
exceeding_value: u64,
status_flags: u8,
deadband: u64,
exceeded_limit: u64,
},
ChangeOfCharacterstring {
changed_value: String,
status_flags: u8,
alarm_value: String,
},
ChangeOfStatusFlags {
present_value: Vec<u8>,
referenced_flags: u8,
},
ChangeOfReliability {
reliability: u32,
status_flags: u8,
property_values: Vec<u8>,
},
NoneParams,
ChangeOfDiscreteValue {
new_value: Vec<u8>,
status_flags: u8,
},
ChangeOfTimer {
new_state: u32,
status_flags: u8,
update_time: (Date, Time),
last_state_change: u32,
initial_timeout: u32,
expiration_time: (Date, Time),
},
}
#[derive(Debug, Clone, PartialEq)]
pub enum ChangeOfValueChoice {
ChangedBits { unused_bits: u8, data: Vec<u8> },
ChangedValue(f32),
}