BACnetStack_RegisterHookTimeout
void BACnetStack_RegisterHookTimeout( void (*FPHookTimeout)(const uint8_t originalInvokeId, 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 a confirmed request this client sent finally times out.
Fires from inside BACnetStack_Tick().
This fires ONCE per request, when the stack gives up on it without an answer. Normally that is after every retry is exhausted: intermediate timeouts re-transmit the request and decrement the retry counter without notifying the hook, so a single call here can represent several minutes and several transmissions. It fires sooner, with retries left, when a retry cannot be sent: the device the request was sent as may no longer initiate (it is unconfigured, or device communication control has disabled initiation), or a run of local send failures has used up its cap. A segmented request that times out while its segments are being sent is reported through HookAbort with the TSM_TIMEOUT reason and does not fire this hook. The request has already been removed from the pending-request table by the time the hook runs, and the connection string and source address it receives point into a stack-owned copy of that removed entry, valid for the duration of the call only. The hook returns void; there is no way to request another retry from it.
See also: CASBACnetStack::FPHookTimeout
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
FPHookTimeout |
in | The function pointer for the HookTimeout function. See CASBACnetStack::FPHookTimeout for more info. |
Callback type
Section titled “Callback type”Topic: Client response hooks. Declared in CASBACnetStackDLL.h.