Skip to content
Version 6.1.0
Contact Us

BACnetStack_AddCalendarWeekNDayEntry

bool BACnetStack_AddCalendarWeekNDayEntry(
const uint32_t deviceInstance,
const uint32_t calendarObjectInstance,
const uint8_t month,
const uint8_t weekOfMonth,
const uint8_t dayOfWeek);

Appends a BACnetWeekNDay entry to a stack-held Calendar’s Date_List: month, week of the month and day of the week, each matched independently (cl. 12.9.6).

For example month 255, week 255, day 1 matches every Monday; month 11, week 4, day 4 matches the fourth Thursday of November.

BACnet reference: ANSI/ASHRAE 135-2024 clause 12.9 (Calendar Object Type).

Parameter Direction Description
deviceInstance in The device instance that owns the Calendar object.
calendarObjectInstance in The stack-held Calendar (BACnetStack_AddCalendarObject()).
month in 1..12, 13 = odd months, 14 = even months, 255 = any.
weekOfMonth in 1..5 = days 1-7, 8-14, 15-21, 22-28, 29-31; 6 = the last 7 days of the month; 7, 8, 9 = the 7 days before the last 7, 14, 21 days (135-2024 cl. 21); 255 = any.
dayOfWeek in 1..7 (Monday = 1), 255 = any.

True on success; false if the device does not exist, the Calendar is not stack-held, a field is out of range, or Calendar support was not compiled.

Topic: Schedules, calendars, trend logs and other object configuration. Declared in CASBACnetStackDLL.h.