Skip to main content

Module schedule

Module schedule 

Source
Expand description

Clause 21 codecs for the Schedule object’s constructed properties (Clause 12.24): Weekly_Schedule and Exception_Schedule.

  • BACnetTimeValue is a SEQUENCE of two untagged members, so it is an application-tagged Time followed by one application-tagged primitive value, with no frame. BACnetTimeValue::value holds that value typed.
  • BACnetDailySchedule is a SEQUENCE with one member, day-schedule [0], a SEQUENCE OF BACnetTimeValue: an opening/closing [0] pair around the time-values. Weekly_Schedule is a BACnetARRAY[7] of them, Monday first.
  • BACnetSpecialEvent is three members with no outer frame:
MemberTagEncoding
period(untagged)CHOICE: calendar-entry [0] or calendar-reference [1]
list-of-time-values[2]opening/closing pair around the time-values
event-priority[3]primitive Unsigned, 1 through 16 when valid

The calendar-entry alternative wraps a BACnetCalendarEntry, itself a CHOICE, so it is an opening/closing [0] pair around the entry’s own tagged encoding (see super::calendar). The calendar-reference alternative is a primitive [1] Calendar object identifier. Exception_Schedule is a BACnetARRAY of special events, concatenated when read whole.

These codecs check structure only, like the calendar-entry codec: a well-formed event with a priority outside 1 through 16 decodes, and the consumer range-checks it (#1087).

Functions§

decode_daily_schedule
Decode one BACnetDailySchedule at offset; returns its time-values and the offset just past the closing [0].
decode_exception_schedule
Decode a whole Exception_Schedule: zero or more special events, back to back, with every byte belonging to one. Like decode_special_event, it leaves each event-priority’s range to the caller.
decode_special_event
Decode one BACnetSpecialEvent at offset; returns the event and the offset just past it.
decode_special_event_period
Decode the period CHOICE of a BACnetSpecialEvent at offset.
decode_time_value
Decode one BACnetTimeValue at offset.
decode_weekly_schedule
Decode a whole Weekly_Schedule.
encode_daily_schedule
Encode one BACnetDailySchedule: its time-values inside [0]. Fails only on a time-value that encode_time_value refuses.
encode_exception_schedule
Encode a whole Exception_Schedule: the special events, concatenated.
encode_special_event
Encode one BACnetSpecialEvent; fails only on a time-value that encode_time_value refuses. The event-priority goes out as held, in or out of its range.
encode_special_event_period
Encode the period CHOICE of a BACnetSpecialEvent.
encode_time_value
Encode one BACnetTimeValue: the application-tagged Time, then the application-tagged value.
encode_weekly_schedule
Encode a whole Weekly_Schedule: seven daily schedules, Monday first.