BACnetRegisterClientCommunicationStateCallback (FUN)

FUNCTION BACnetRegisterClientCommunicationStateCallback : IEC_BACNET_STATUS

Registers a callback for communication changes.

This registers a callback routine. This callback can be registered at any time. If the callback is registered more than once, the new callback procedure replaces old one. A NULL procedure pointer cancels the callback.n This function gives a user application the ability to get notified if an connection to one of the registered devices couldn’t or could be established. It is called in every case were the connection state to an BACnet remote device changes.

InOut:

Scope

Name

Type

Comment

Return

BACnetRegisterClientCommunicationStateCallback

IEC_BACNET_STATUS

Input

hCustomer

IEC_BACNET_HANDLE

An handle to an created advanced BACnet client customer created by BACnetOpenClientCustomer.

pICallback

CmpEventMgr.ICmpEventCallback

A pointer to the event-callback interface which gets called on changes in communication to the device. To unregister a NULL pointer shall be used here.

pUserArg

POINTER TO BYTE

A pointer to data from the user application which is transparent for the API. This pointer will not be modified by the BACnet API. This may be NULL.