BACnet.Protocol.EventInformation (bacstack v0.1.0-dev.1)

Copy Markdown View Source

Event Information is the rich data structure returned by the Get Event Information service (ASHRAE 135 Clause 13.12). It is the modern replacement for the older Get Alarm Summary service and is the recommended way for a client to obtain a complete picture of every object in a device that is capable of generating events.

Each entry contains the object identifier, its current event state, the acknowledged transition bits, the timestamps of the three state transitions, the notify type, the event enable bits, and the three priority values that will be used for notifications at each transition. This level of detail allows a sophisticated operator workstation to present accurate alarm lists, compute alarm durations, and correctly route or escalate notifications.

Summary

Types

t()

Represents a single entry in the response of a Get Event Information service.

Functions

Encodes a BACnet event information into BACnet application tags encoding.

Parses a BACnet event information from BACnet application tags encoding.

Validates whether the given event information is in form valid.

Types

t()

@type t() :: %BACnet.Protocol.EventInformation{
  acknowledged_transitions: BACnet.Protocol.EventTransitionBits.t(),
  event_enable: BACnet.Protocol.EventTransitionBits.t(),
  event_priorities:
    {to_offnormal :: byte(), to_fault :: byte(), to_normal :: byte()},
  event_state: BACnet.Protocol.Constants.event_state(),
  event_timestamps: BACnet.Protocol.EventTimestamps.t(),
  notify_type: BACnet.Protocol.Constants.notify_type(),
  object_identifier: BACnet.Protocol.ObjectIdentifier.t()
}

Represents a single entry in the response of a Get Event Information service.

Functions

encode(event, opts \\ [])

@spec encode(t(), Keyword.t()) ::
  {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}

Encodes a BACnet event information into BACnet application tags encoding.

parse(tags)

Parses a BACnet event information from BACnet application tags encoding.

valid?(t)

@spec valid?(t()) :: boolean()

Validates whether the given event information is in form valid.

It only validates the struct is valid as per type specification.