Skip to content
Version 6.1.0
Contact Us

BACnetStack_RegisterCallbackGetListOfEnumerations

void BACnetStack_RegisterCallbackGetListOfEnumerations(
bool (*CallbackGetListOfEnumerations)(const uint32_t deviceInstance, const uint16_t objectType, const uint32_t objectInstance, const uint32_t propertyIdentifier, const uint8_t rangeOption, const uint32_t rangeIndexOrSequenceNumber, const bool rangeInPositiveDirection, uint32_t *enumeration, bool *more));

Registers the callback the stack calls to enumerate an Enumerated-element LIST property, such as a Lift’s Fault_Signals or an Access Door’s event-driven lists.

It is called once per element.

ONLY ONE PAGING MODE IS EVER USED. The stack’s single call site always passes rangeOption 0, rangeInPositiveDirection true, and rangeIndexOrSequenceNumber as a 0-based counter starting at 0 and incrementing by one per call. No caller varies them. Ignore them and page by that counter.

SENTINEL: the stack seeds the enumeration out-parameter with UINT32_MAX before EVERY call. An element still holding UINT32_MAX is skipped, so a call that leaves it untouched adds nothing.

Set the more out-parameter true while further elements remain and false on the last one. It keeps the value the previous call left in it, so a callback that never sets it false is stopped after 200,000 elements and the read fails as described below.

Returning false fails the read: the client receives a BACnet-Error, READ_ACCESS_DENIED (class PROPERTY). Leaving this callback UNREGISTERED is a different answer entirely - the property then reads as a valid EMPTY list.

See also: CASBACnetStack::FPCallbackGetListOfEnumerations

Parameter Direction Description
CallbackGetListOfEnumerations in The function pointer for the CallbackGetListOfEnumerations function. See CASBACnetStack::FPCallbackGetListOfEnumerations for more info.

FPCallbackGetListOfEnumerations

Topic: Property value callbacks. Declared in CASBACnetStackDLL.h.