BACnet.Protocol.CalendarEntry (bacstack v0.0.1)

View Source

Summary

Functions

Encode a calendar entry into application tag-encoded.

Parse application tag-encoded calendar entry into a struct.

Validates whether the given BACnet calendar entry is in form valid.

Types

t()

@type t() :: %BACnet.Protocol.CalendarEntry{
  date: BACnet.Protocol.BACnetDate.t() | nil,
  date_range: BACnet.Protocol.DateRange.t() | nil,
  type: :date | :date_range | :week_n_day,
  week_n_day: BACnet.Protocol.WeekNDay.t() | nil
}

Functions

encode(entry, opts \\ [])

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

Encode a calendar entry into application tag-encoded.

parse(tags)

Parse application tag-encoded calendar entry into a struct.

valid?(t)

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

Validates whether the given BACnet calendar entry is in form valid.

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