BACnetStack_SetScheduleEffectivePeriod
bool BACnetStack_SetScheduleEffectivePeriod( const uint32_t deviceInstance, const uint32_t scheduleObjectInstance, const uint16_t startYear, const uint8_t startMonth, const uint8_t startDay, const uint16_t endYear, const uint8_t endMonth, const uint8_t endDay);Sets the Effective_Period - the date range over which the Schedule is active (135-2024 cl. 12.24.6).
Outside it the Schedule is inactive: it does not evaluate, and Present_Value keeps the value it last held (it does not change to Schedule_Default), so nothing is written to the referenced properties. On entering the period the Schedule recalculates Present_Value and writes it to every entry of List_Of_Object_Property_References, even when the value has not changed. Effective_Period is a BACnetDateRange (cl. 21).
NOTE the years are FULL 4-digit years (e.g. 2026), not the BACnet wire encoding of years-since-1900. A year of 0 makes that bound OPEN: startYear 0 means “no start limit”, endYear 0 means “no end limit”.
BACnet reference: ANSI/ASHRAE 135-2024 clause 12.24 (Schedule Object Type).
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
deviceInstance |
in | The device instance that owns this Schedule object. |
scheduleObjectInstance |
in | The Schedule object to modify. |
startYear |
in | Full 4-digit start year; 0 = open start. |
startMonth |
in | Start month, 1..12. |
startDay |
in | Start day of month, 1..31. |
endYear |
in | Full 4-digit end year; 0 = open end. |
endMonth |
in | End month, 1..12. |
endDay |
in | End day of month, 1..31. |
Returns
Section titled “Returns”True on success; false if the device or Schedule object does not exist, or Schedule support was not compiled. Also false, with the Effective_Period left as it was, unless each endpoint is year 0 (open; its month and day are then ignored) or a real date: a year in 1900..2154 (the range a BACnet Date can carry), a month 1..12 and a day that exists in that month. The 255 “unspecified” wildcard is not accepted in a month or day.
Topic: Schedules, calendars, trend logs and other object configuration. Declared in CASBACnetStackDLL.h.