BACnet.Protocol.DaysOfWeek (bacstack v0.0.1)

View Source

Summary

Types

t()

Represents a BACnet days of week.

Functions

Encodes a BACnet days of week into application tags encoding.

Creates from an application tag bitstring a days of week.

Parses a BACnet days of week from application tags encoding.

Creates an application tag bitstring from a days of week.

Validates whether the given days of week is in form valid.

Types

t()

@type t() :: %BACnet.Protocol.DaysOfWeek{
  friday: boolean(),
  monday: boolean(),
  saturday: boolean(),
  sunday: boolean(),
  thursday: boolean(),
  tuesday: boolean(),
  wednesday: boolean()
}

Represents a BACnet days of week.

Functions

encode(flags, opts \\ [])

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

Encodes a BACnet days of week into application tags encoding.

from_bitstring(bitstring)

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

Creates from an application tag bitstring a days of week.

parse(tags)

Parses a BACnet days of week from application tags encoding.

to_bitstring(t)

Creates an application tag bitstring from a days of week.

valid?(t)

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

Validates whether the given days of week is in form valid.

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