BACnet.Protocol.DateRange (bacstack v0.0.1)

View Source

Summary

Types

t()

Represents a BACnet Date Range.

Functions

Encodes a BACnet date range into BACnet application tags encoding.

Get a Date.Range struct for this date range. Only specific dates are allowed.

Parses a BACnet date range from BACnet application tags encoding.

Validates whether the given BACnet date range is in form valid.

Types

t()

@type t() :: %BACnet.Protocol.DateRange{
  end_date: BACnet.Protocol.BACnetDate.t(),
  start_date: BACnet.Protocol.BACnetDate.t()
}

Represents a BACnet Date Range.

Functions

encode(date_range, opts \\ [])

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

Encodes a BACnet date range into BACnet application tags encoding.

get_date_range(date_range)

@spec get_date_range(t()) :: {:ok, Date.Range.t()} | {:error, term()}

Get a Date.Range struct for this date range. Only specific dates are allowed.

parse(tags)

Parses a BACnet date range from BACnet application tags encoding.

valid?(t)

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

Validates whether the given BACnet date range is in form valid.

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