EVT_BACNET_READPROPERTYCALLBACK
(STRUCT)
TYPE EVT_BACNET_READPROPERTYCALLBACK : STRUCT
This is the type declaration for the read callback. This routine is provided by the API application and is invoked by the default actions when a ReadProperty or ReadPropertyMultiple request is being processed or an internal access is made to get the value for internal processing. A pointer to the routine is registered with the BACnetSetCallback. The callback has the opportunity to supply to update the value of the property stored in the database. The callback is invoked for any property that has been attached to the read callback regardless of the current value of the Out-Of-Service property. When Out-Of-Service is TRUE, some properties are no longer represent the physical value of the device assosiated with this object. Therefore, the application callback should check the value of the Out-Of-Service property, and if Out-Of-Service is TRUE and the target property is required to be decoupled from the physical device when Out-Of-Service is TRUE then the callback should not take any action and return immediately with CALLBACK_STATUS_DEFAULT.
- InOut:
Name
Type
Comment
pCallbackStatus
POINTER TO IEC_BACNET_CALLBACK_STATUS
Callback-Status returned for the event. “Default” processes the standard APIs reaction and takes no action.
deviceNumber
The device instance number in which the object is to be expected.
pObjectID
POINTER TO IEC_BACNET_OBJECT_ID
Pointer to the object identifier of the object which property value is beeing requested.
propertyID
The Property Identifier of the Property to be read (for example the Present Value Property of an Analog Input Object. The same callback routine is invoked for all properties of all objects.
index
An index of an array item. If the Property is not an array, the index value BACNET_VOID_INDEX (-1) should be used. If the Property is an array, the index value BACNET_ENTIRE_ARRAY (-1) can be used to read the entire array. If the Property is an array, the index value BACNET_ARRAY_COUNT (0) (use 0) will return the number of elements in the array. The indices of BACnet arrays start counting at 1.*)
pPropertyContents
POINTER TO IEC_BACNET_PROPERTY_CONTENTS
The PROPERTY contents buffer which needs TO be filled BY the user application. The user has the choice to return the requested property value as c-structure (to fill the buffer member of the structure) or as an ASN1 formatted encoded value (to fill the rawBuffer member of the structure, the application is responsible for making sure that syntax is correct). In any case the application may use allocated memory for this transfer. The application will be informed with the BACNET_CALLBACK_RELEASE_PROC that it may release the buffers memory.