BACnetStack_SetScheduleDefault
bool BACnetStack_SetScheduleDefault( const uint32_t deviceInstance, const uint32_t scheduleObjectInstance, const uint8_t valueDatatype, const uint32_t valueAsUnsigned, const float valueAsReal);Sets the Schedule_Default - the value the Schedule serves when no weekly or exception entry is active (135-2024 cl. 12.24.9).
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. |
valueDatatype |
in | The application datatype of the default: 0 = Null (no value / relinquish), 1 = Boolean, 2 = UnsignedInteger, 3 = SignedInteger, 4 = Real, 9 = Enumerated. See CASBACnetStack::BACnetStackDatatypes. Use 9 = Enumerated for a Binary Value or Binary Output target - BACnetBinaryPV is an ENUMERATED, and scheduling it as 2 = UnsignedInteger produces a Schedule whose value datatype does not match its references (135-2024 cl. 12.24.13 makes that a CONFIGURATION_ERROR). Any other datatype, including 5 = Double, is rejected and the call returns false; Double is excluded deliberately because the FFI payload below is a 32-bit float. CharacterString, OctetString, BitString, Date, Time and ObjectIdentifier are spec-legal for a Schedule but are not reachable through this triple. |
valueAsUnsigned |
in | The value when valueDatatype is Boolean (0 = false, non-zero = true), UnsignedInteger, SignedInteger (reinterpreted as int32_t, so pass a negative value by cast) or Enumerated; ignored otherwise. |
valueAsReal |
in | The value when valueDatatype is Real; ignored otherwise. |
Returns
Section titled “Returns”True on success; false if the device or Schedule object does not exist, or Schedule support was not compiled.
Topic: Schedules, calendars, trend logs and other object configuration. Declared in CASBACnetStackDLL.h.