Skip to content
Version 6.1.0
Contact Us

BACnetStack_AddObjectPropertyReferenceToChannel

bool BACnetStack_AddObjectPropertyReferenceToChannel(
const uint32_t deviceInstance,
const uint32_t channelObjectInstance,
const uint16_t refObjectType,
const uint32_t refObjectInstance,
const uint32_t refPropertyIdentifier,
const bool refUsePropertyArrayIndex,
const uint32_t refPropertyArrayIndex,
const bool refUseDeviceIdentifier,
const uint32_t refDeviceInstance,
const uint32_t executionDelay);

Appends one reference to a Channel object’s stack-held List_Of_Object_Property_References.

The reference is a BACnetDeviceObjectPropertyReference, and the property is a BACnetARRAY[N] of them (cl. 12.53, cl. 21).

The Channel does not present the optional Execution_Delay or Allow_Group_Delay_Inhibit properties (a read of either answers UNKNOWN_PROPERTY) and applies no delay to a member write. The executionDelay value is kept with the reference but has no effect.

ADDRESS BINDING: a reference to a property of ANOTHER device makes this device bind that device’s address (135-2024 cl. 16.10, dynamic binding). It sends a Who-Is for that device instance at once and then on every heartbeat - broadcast until the device answers with an I-Am, directed to its address after. The heartbeat is 3600 s by default; BACnetStackSetting_DABHeartbeatIntervalSeconds changes it, and 0 disables it. The binding is held while any reference to that device remains.

BACnet reference: ANSI/ASHRAE 135-2024 clause 12.53 (Channel Object Type).

Parameter Direction Description
deviceInstance in The device instance that owns this Channel object.
channelObjectInstance in The Channel object to modify.
refObjectType in The referenced object type. See CASBACnetStack::BACnetObjectType. With refObjectInstance, this is one BACnet Object Identifier carried as two parameters.
refObjectInstance in The referenced object instance.
refPropertyIdentifier in The referenced property identifier.
refUsePropertyArrayIndex in True if the reference targets one array element of the property.
refPropertyArrayIndex in The array index, used only when refUsePropertyArrayIndex is true.
refUseDeviceIdentifier in True if the reference names an explicit device (a remote target); false for a local object.
refDeviceInstance in The device instance, used only when refUseDeviceIdentifier is true. SIDE EFFECT: when this names a device other than this one and other than 4194303, that device is added to the stack’s Device Address Binding table, which starts ongoing background binding traffic for it. 4194303 is the spec’s “empty reference” sentinel (135-2024 cl. 12.53.11.1).
executionDelay in Accepted and kept with the reference, but the Channel does not present Execution_Delay and applies no delay: every member is written when the Channel is. Pass 0.

True on success; false if no device has been added, BACnetStack_AddChannelObject() has not been called for channelObjectInstance, refUseDeviceIdentifier is true and refDeviceInstance is above 4194303 (not a device instance; nothing is added), allocation fails, or Channel support is not compiled. Each call APPENDS with no duplicate check and no upper bound, and there is no export to remove an entry; read the lists back with BACnetStack_SendReadProperty().

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