Skip to content
Version 6.1.0
Contact Us

BACnetStack_RegisterHookIHave

void BACnetStack_RegisterHookIHave(
void (*FPHookIHave)(const uint32_t deviceIdentifier, const uint16_t objectType, const uint32_t objectInstance, const char *objectName, const uint32_t objectNameLength, const uint8_t objectNameEncoding, const uint8_t *connectionString, const uint8_t connectionStringLength, const uint32_t networkPortInstance, const uint16_t sourceNetwork, const uint8_t *sourceAddress, const uint8_t sourceAddressLength));

Registers a hook the stack calls when an I-Have is received, delivering the object identity found in response to a previously sent Who-Has.

Fires from inside BACnetStack_Tick().

The object name the hook receives points into a TEMPORARY string that the stack destroys the moment the hook returns - copy it inside the hook, and use the accompanying length rather than assuming the buffer stays valid. The name’s encoding is the peer’s declared character set, which need not be UTF-8 even though this stack always SENDS UTF-8. The hook returns void; the stack takes no further action on an I-Have either way.

See also: CASBACnetStack::FPHookIHave

BACnet reference: ANSI/ASHRAE 135-2024 clause 16.9 (Who-Has and I-Have Services).

Parameter Direction Description
FPHookIHave in The function pointer for the HookIHave function. See CASBACnetStack::FPHookIHave for more info.

FPHookIHave

Topic: Client response hooks. Declared in CASBACnetStackDLL.h.