pub enum FaultParameters {
FaultNone,
FaultCharacterString {
fault_values: Vec<String>,
},
FaultExtended {
vendor_id: u16,
extended_fault_type: u32,
parameters: Vec<u8>,
},
FaultLifeSafety {
fault_values: Vec<LifeSafetyState>,
mode_property_reference: BACnetDeviceObjectPropertyReference,
},
FaultState {
fault_values: Vec<BACnetPropertyStates>,
},
FaultStatusFlags {
reference: BACnetDeviceObjectPropertyReference,
},
FaultOutOfRange {
min_normal: f64,
max_normal: f64,
},
FaultListed {
reference: BACnetDeviceObjectPropertyReference,
},
}Expand description
Fault parameter variants for configuring fault detection algorithms.
Variants§
FaultNone
No fault detection.
FaultCharacterString
Fault on characterstring match.
Fields
FaultExtended
Vendor-defined fault algorithm.
Fields
FaultLifeSafety
Fault on life safety state match.
Fields
fault_values: Vec<LifeSafetyState>Life safety states that indicate a fault.
mode_property_reference: BACnetDeviceObjectPropertyReferenceReference to the mode property consulted when evaluating these states.
FaultState
Fault on property state match.
Fields
fault_values: Vec<BACnetPropertyStates>Property states that indicate a fault when the monitored property takes one of them.
FaultStatusFlags
Fault on status flags change.
Fields
reference: BACnetDeviceObjectPropertyReferenceReference to the StatusFlags property whose FAULT bit is monitored.
FaultOutOfRange
Fault when value exceeds range.
Fields
FaultListed
Fault from listed reference.
Fields
reference: BACnetDeviceObjectPropertyReferenceBACnetLIST property whose entries carry the fault indications to watch.
Implementations§
Source§impl FaultParameters
impl FaultParameters
Sourcepub const fn fault_type(&self) -> FaultType
pub const fn fault_type(&self) -> FaultType
Return the fault algorithm selected by this parameter alternative.
Sourcepub fn encode_property_value(&self) -> PropertyValue
pub fn encode_property_value(&self) -> PropertyValue
Encode this fault-parameter set as a flat PropertyValue::List.
The first element is the variant 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_fault_parameters. See
Self::decode_property_value for the inverse.
Sourcepub fn decode_property_value(value: &PropertyValue) -> Result<Self, Error>
pub fn decode_property_value(value: &PropertyValue) -> Result<Self, Error>
Decode a PropertyValue previously produced by
Self::encode_property_value.