BACnet notification parameters define the additional data that is included in ConfirmedEventNotification and UnconfirmedEventNotification messages.
Different event algorithms produce different sets of notification parameters
(e.g. the new value that triggered the alarm, the setpoint that was crossed,
timestamps, etc.). These structures are carried inside the Event Message Parameters of the notification so that receiving devices and operator
workstations have rich context without needing to read additional properties.
This module provides the encoding/decoding layer for all supported notification parameter variants. The inner modules contain the concrete fields for each algorithm's notification data.
The event algorithm AccessEvent is not supported.
Consult the module BACnet.Protocol.EventAlgorithms for
details about each event's algorithms.
Consult the module BACnet.Protocol.EventParameters for
details about each event's parameters.
Examples
Different notification parameter types (CHOICE arms):
# Change of Value
iex> %NotificationParameters.ChangeOfValue{
...> new_value: {:real, 42.5},
...> status_flags: %StatusFlags{}
...> }
# Out of Range (common for analog alarms)
iex> %NotificationParameters.OutOfRange{
...> exceeding_value: 105.0,
...> status_flags: %StatusFlags{fault: false},
...> deadband: 2.0,
...> exceeded_limit: 100.0
...> }
Summary
Types
Possible BACnet notification parameters.
Functions
Encodes a notification parameter variant into BACnet application tag encoding.
Parses a constructed application tag (from an event notification) into the corresponding notification parameter.
Validates whether the given notification parameter is in form valid.
Types
@type notification_parameter() :: BACnet.Protocol.NotificationParameters.ChangeOfBitstring.t() | BACnet.Protocol.NotificationParameters.ChangeOfState.t() | BACnet.Protocol.NotificationParameters.ChangeOfValue.t() | BACnet.Protocol.NotificationParameters.CommandFailure.t() | BACnet.Protocol.NotificationParameters.FloatingLimit.t() | BACnet.Protocol.NotificationParameters.OutOfRange.t() | BACnet.Protocol.NotificationParameters.ComplexEventType.t() | BACnet.Protocol.NotificationParameters.ChangeOfLifeSafety.t() | BACnet.Protocol.NotificationParameters.Extended.t() | BACnet.Protocol.NotificationParameters.BufferReady.t() | BACnet.Protocol.NotificationParameters.UnsignedRange.t() | BACnet.Protocol.NotificationParameters.DoubleOutOfRange.t() | BACnet.Protocol.NotificationParameters.SignedOutOfRange.t() | BACnet.Protocol.NotificationParameters.UnsignedOutOfRange.t() | BACnet.Protocol.NotificationParameters.ChangeOfCharacterString.t() | BACnet.Protocol.NotificationParameters.ChangeOfStatusFlags.t() | BACnet.Protocol.NotificationParameters.ChangeOfReliability.t()
Possible BACnet notification parameters.
Functions
@spec encode(notification_parameter(), Keyword.t()) :: {:ok, BACnet.Protocol.ApplicationTags.encoding()} | {:error, term()}
Encodes a notification parameter variant into BACnet application tag encoding.
@spec parse(BACnet.Protocol.ApplicationTags.encoding()) :: {:ok, notification_parameter()} | {:error, term()}
Parses a constructed application tag (from an event notification) into the corresponding notification parameter.
@spec valid?(notification_parameter()) :: boolean()
Validates whether the given notification parameter is in form valid.
It only validates the struct is valid as per type specification.