BACnetStack_RegisterHookIAm
void BACnetStack_RegisterHookIAm( void (*FPHookIAm)(const uint32_t deviceIdentifier, const uint32_t maxApduLengthAccepted, const uint8_t segmentationSupported, const uint16_t vendorIdentifier, 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-Am is received, delivering the announcing device’s identity and communication parameters.
Fires from inside BACnetStack_Tick().
The stack refreshes its Device Address Binding table BEFORE calling the hook, and does so even when no hook is registered - so a hook that immediately sends a follow-up request to the announcing device already has a resolved address to use. The hook returns void; there is no way to suppress or alter the stack’s own handling from it.
See also: CASBACnetStack::FPHookIAm
BACnet reference: ANSI/ASHRAE 135-2024 clause 16.10 (Who-Is and I-Am Services).
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
FPHookIAm |
in | The function pointer for the HookIAm function. See CASBACnetStack::FPHookIAm for more info. |
Callback type
Section titled “Callback type”Topic: Client response hooks. Declared in CASBACnetStackDLL.h.