Skip to main content

Module fault_parameter

Module fault_parameter 

Source
Expand description

BACnetFaultParameter full ASN.1 framing.

BACnetFaultParameter (ASHRAE 135-2020 Clause 21) selects one fault algorithm by context tag and carries its settings; FaultParameters models every alternative. none is a primitive NULL. Every other alternative is a constructed value holding context-tagged members, all required:

TagAlternativeMember tagMemberType
[0]noneNULL, no members
[1]fault-characterstring[0]list-of-fault-valueslist of CharacterString
[2]fault-extended[0]vendor-idUnsigned16
[1]extended-fault-typeUnsigned
[2]parameterslist of extended values, see below
[3]fault-life-safety[0]list-of-fault-valueslist of life-safety states
[1]mode-property-referenceBACnetDeviceObjectPropertyReference
[4]fault-state[0]list-of-fault-valueslist of BACnetPropertyStates
[5]fault-status-flags[0]status-flags-referencedevice property reference
[6]fault-out-of-range[0]min-normal-valuenumeric choice, see below
[1]max-normal-valuethe same four-way choice
[7]fault-listed[0]fault-list-referencedevice property reference

Each “device property reference” is a BACnetDeviceObjectPropertyReference, and the life-safety list holds BACnetLifeSafetyState values. Each extended parameters entry is an application-tagged primitive or a [0]-framed BACnetDeviceObjectPropertyReference.

The min/max inner CHOICE alternatives are untagged — discovered by their APPLICATION tag (REAL=4, Unsigned=2, Double=5, INTEGER=3). The Rust type stores f64, so encode always selects the Double alternative; decode accepts all four.

Functions§

decode_fault_parameters
Decode one framed FaultParameters CHOICE alternative at offset.
encode_fault_parameters
Encode a FaultParameters as its full CHOICE framing.