A Daily Schedule is a list of BACnet.Protocol.TimeValue pairs that define the
desired behavior of a scheduled property for one 24-hour period. It is the
fundamental building block of both the normal weekly_schedule (7 entries,
one per BACnet.Protocol.DaysOfWeek) and the exception_schedule in Schedule objects.
Each TimeValue specifies the time at which the scheduled property should
take on the given value (and keep it until the next entry or the end of the day).
BACnet Specification References
- ASN.1 (Clause 21):
BACnetDailySchedule ::= SEQUENCE { daySchedule SEQUENCE OF BACnetTimeValue } - Schedule object (12.24):
weekly_scheduleis aBACnetARRAY[7]ofBACnet.Protocol.DailySchedule;exception_scheduleis a list ofBACnet.Protocol.SpecialEventeach containing aBACnet.Protocol.DailySchedule(in thelistfield). - Time values may be unspecified patterns in some contexts, but for normal schedule operation concrete times are expected.
Examples (Doc Test)
iex> schedule = %DailySchedule{
...> schedule: [
...> %TimeValue{time: %BACnetTime{hour: 8, minute: 0, second: 0, hundredth: 0}, value: {:real, 22.0}},
...> %TimeValue{time: %BACnetTime{hour: 18, minute: 0, second: 0, hundredth: 0}, value: {:real, 18.0}}
...> ]
...> }
iex> length(schedule.schedule)
2See Also
Summary
Types
One day's schedule: list of BACnet.Protocol.TimeValue (see BACnet.Protocol.DailySchedule module
docs and Schedule object Clause 12.24).
Functions
Encode a BACnet daily schedule into application tag-encoded.
Parse a BACnet daily schedule from application tags encoding.
Validates whether the given daily schedule is in form valid.
Types
@type t() :: %BACnet.Protocol.DailySchedule{schedule: [BACnet.Protocol.TimeValue.t()]}
One day's schedule: list of BACnet.Protocol.TimeValue (see BACnet.Protocol.DailySchedule module
docs and Schedule object Clause 12.24).
Functions
@spec encode(t(), Keyword.t()) :: {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}
Encode a BACnet daily schedule into application tag-encoded.
@spec parse(BACnet.Protocol.ApplicationTags.encoding_list()) :: {:ok, {t(), rest :: BACnet.Protocol.ApplicationTags.encoding_list()}} | {:error, term()}
Parse a BACnet daily schedule from application tags encoding.
Validates whether the given daily schedule is in form valid.
It only validates the struct is valid as per type specification.