Skip to content
Version 6.1.0
Contact Us

Calendar

A Calendar holds a list of dates, date ranges and recurring patterns, and reports whether today matches any of them. Its Present_Value is TRUE on a matching day. Schedules refer to calendars to find holidays and other special days.

  • A list of public holidays
  • Building closure days
  • Maintenance windows by date range
  • Every Monday in a given month
Property What it holds
Present_Value TRUE when the current date matches an entry in Date_List, otherwise FALSE.
Date_List The entries to match. Each is a single date, a date range or a week-and-day pattern.

A Calendar is not commandable. It has no intrinsic event algorithm. The device re-evaluates Present_Value as the date changes, and clients can subscribe to be told when it flips. A Schedule can use a calendar through a calendar reference in its exception schedule.

Enable it with the STACK_OPTION_OBJECT_TYPE_CALENDAR build option and add each object with BACnetStack_AddObject. Then choose who keeps the dates.

You serve it. Present_Value comes from the callback you register with BACnetStack_RegisterCallbackGetPropertyBool, and Date_List from your callbacks too.

The stack holds it. Call BACnetStack_AddCalendarObject. The stack then holds Date_List, which you fill with BACnetStack_AddCalendarDateEntry, BACnetStack_AddCalendarDateRangeEntry and BACnetStack_AddCalendarWeekNDayEntry, and works out Present_Value on every tick and every read. To do that it needs the date: enable the Device object’s Local_Date property with BACnetStack_SetPropertyEnabled and serve it through the callback you register with BACnetStack_RegisterCallbackGetPropertyDate. Date_List is read-only to clients until you call BACnetStack_SetPropertyWritable for it. A Schedule’s calendar reference works only with a calendar the stack holds.

Schedule, Device, Date Pattern Value, Date Value

The properties ASHRAE 135-2024 clause 12.9 defines for this object type.

How to read the table:

  • Conformance is what the standard asks of every object of this type: R is required, W is required and writable by a client, O is optional. A digit after the letter marks a condition in the standard that decides when the property is present or writable, such as support for intrinsic reporting.
  • Present by default: yes means the stack presents the property as soon as you add the object; no means it is optional and you turn it on with BACnetStack_SetPropertyEnabled. This is the stack’s starting setup, so it can differ from the conformance code.
  • Writable is whether a client can write the property by default. Change it with BACnetStack_SetPropertyWritable.
  • not in profile means the stack does not offer this property for this object type.
  • Value when your callback does not answer: “Held by the stack” means the stack stores and serves the value itself and does not ask your callbacks. Otherwise it is the value the stack answers when your callback declines or is not registered.
Property Datatype Conformance Present by default Writable Value when your callback does not answer
Object_Identifier BACnetObjectIdentifier R yes no Held by the stack.
Object_Name CharacterString R yes no "Object <type>,<instance>", such as "Object 0,1" for Analog Input 1.
Object_Type BACnetObjectType R yes no Held by the stack.
Description CharacterString O no no ""
Present_Value Boolean R yes no Computed by the stack after BACnetStack_AddCalendarObject. Otherwise no default: value-not-initialized.
Date_List BACnetLIST of BACnetCalendarEntry R yes no Held by the stack after BACnetStack_AddCalendarObject.
Property_List BACnetARRAY[N] of BACnetPropertyIdentifier R yes no Held by the stack.
Audit_Level BACnetAuditLevel O1 not in profile not in profile No default: the read fails.
Auditable_Operations BACnetAuditOperationFlags O1 not in profile not in profile No default: the read fails.
Tags BACnetARRAY[N] of BACnetNameValue O no no No default: the read fails.
Profile_Location CharacterString O no no ""
Profile_Name CharacterString O no no ""