BACnetReadProperty
(FUN)
FUNCTION BACnetReadProperty : IEC_BACNET_STATUS
Sends a ReadProperty request
Sends a request to read the value of a property of an object. This routine may send asynchronous messages, i.e. this routine will complete its execution before the BACnet reply comes so the applications can keep running. The response information will be received by an internal thread which is responsible for receiving asynchronous responses. An optional BACNET_READ_PROP_COMPLETE_CB routine, which is provided by the BACnet application, may be used to process this information. If a number of asynchronous requests are sent, the responses may be queued and identified by the application provided handles. If this routine does not use the BACNET_READ_PROP_COMPLETE_CB routine, then the BACnetReadProperty routine sends a request and waits for the reply. This routine may control APDU Properties like APDU length and segmentation and timeout, both during its execution and in response processing.
Asynchron call, which fills pContents with the call result in an asynchronus manner. As soon as pContentsStatus is IEC_BACNET_STATUS.BACNET_STATUS_OK the data in pContents is valid.
- InOut:
Scope
Name
Type
Comment
Return
BACnetReadProperty
A status indicating if the operation worked.
Input
pSourceAddress
POINTER TO IEC_BACNET_ADDRESS
If the BACnet application has only one device constructed and installed, this can be 0. In this case the MAC address of this device will be used. Otherwise this shall be the MAC address returned on device object construction.
pDestinationAddress
POINTER TO IEC_BACNET_ADDRESS
This is the MAC address of the device to which the request should be sent.
pReadInfo
POINTER TO IEC_BACNET_READ_INFO
A pointer to the service information data structure. This data structure identifies the property within the device and includes the object ID, property ID, and array index.
pAPDUParams
POINTER TO IEC_BACNET_APDU_PROPERTIES
A pointer to the APDU-Properties structure which sets APDU properties for this transaction only. This does not change global defaults or settings for the application APDU Properties. This argument may be 0. In this case APDU properties are used which were specified in the device object properties of the applications device which sends the request.
pContents
POINTER TO IEC_BACNET_PROPERTY_CONTENTS
Pointer to a property contents buffer structure. This data structure must contain a pointer to a buffer into which the value is copied. Upon successful completion, the contents IEC_BACNET_DATA_TYPE tag attribute indicates the datatype of the property. The buffer pointer in the property contents structure may be 0 along with the size. In this case the API will fill the buffer and the application is responsible to release it with a call to BACnetFreeStackAllocatedMemory if the buffer is no longer needed.
pTransactionToken
POINTER TO BACnetAsyncTransactionToken
Transaction token of the asynchronous call - see BACnetAsyncTransactionToken.
pError
POINTER TO IEC_BACNET_ERROR
A pointer to a structure to hold BACnet Error information. pError may be 0 if the application isn’t interested in detailed error information.