BACnetStack_AddCalendarDateEntry
bool BACnetStack_AddCalendarDateEntry( const uint32_t deviceInstance, const uint32_t calendarObjectInstance, const uint16_t year, const uint8_t month, const uint8_t day, const uint8_t weekday);Appends a Date entry - a specific date or a date pattern - to a stack-held Calendar’s Date_List.
The entry is the date arm of the BACnetCalendarEntry CHOICE (cl. 21). Each field is matched independently and every specified field must match (cl. 12.9.6): for example month 12, day 25 with year 0 and weekday 255 matches December 25 every year.
BACnet reference: ANSI/ASHRAE 135-2024 clause 12.9 (Calendar Object Type).
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
deviceInstance |
in | The device instance that owns the Calendar object. |
calendarObjectInstance |
in | The stack-held Calendar (BACnetStack_AddCalendarObject()). |
year |
in | The FULL year, 1900..2154 (e.g. 2026, not 126), or 0 = any year. |
month |
in | 1..12 (January = 1), 13 = odd months, 14 = even months, 255 = any. |
day |
in | 1..31, 32 = last day of the month, 33 = odd days, 34 = even days, 255 = any. |
weekday |
in | 1..7 (Monday = 1), 255 = any. |
Returns
Section titled “Returns”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. Fields are range-checked, not cross-checked: an impossible combination such as month 2 day 31 is stored and simply never matches. Entries are appended as given - adding the same entry twice stores it twice.
Topic: Schedules, calendars, trend logs and other object configuration. Declared in CASBACnetStackDLL.h.