BACnet.Protocol.StatusFlags (bacstack v0.0.1)

View Source

Summary

Types

t()

Represents the BACnet Status Flags.

Functions

Encodes a BACnet status flags into application tags encoding.

Creates from an application tag bitstring a status flag.

Parses a BACnet status flags from application tags encoding.

Creates an application tag bitstring from a status flag.

Validates whether the given status flags is in form valid.

Types

t()

@type t() :: %BACnet.Protocol.StatusFlags{
  fault: boolean(),
  in_alarm: boolean(),
  out_of_service: boolean(),
  overridden: boolean()
}

Represents the BACnet Status Flags.

The IN_ALARM flag is set, if the Event State is not normal.

The FAULT flag is set, if the reliability has detected a fault.

The OVERRIDDEN flag is set, if the output has been overridden by some sort of BACnet device local mechanism.

The OUT_OF_SERVICE flag is set, if the Out Of Service property is set.

Functions

encode(flags, opts \\ [])

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

Encodes a BACnet status flags into application tags encoding.

from_bitstring(bitstring)

@spec from_bitstring(tuple()) :: t()

Creates from an application tag bitstring a status flag.

parse(tags)

Parses a BACnet status flags from application tags encoding.

to_bitstring(t)

Creates an application tag bitstring from a status flag.

valid?(t)

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

Validates whether the given status flags is in form valid.

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