BACnetReadRange (FUN)

FUNCTION BACnetReadRange : IEC_BACNET_STATUS

Sends a ReadRange request

Sends a request to read a specific range of data items representing a subset of data available within a specified object property. This routine may be used with any list or array of lists property. This routine may control APDU properties like APDU length, segmentation, and timeout for both request and in response. This routine can execute asynchronously, i.e. this routine will return to the caller before the BACnet reply comes so that the applications can keep running. In this case the response information will be received by the thread which is responsible for receiving asynchronous responses. An optional BACNET_READ_RANGE_COMPLETE_CB routine, which is provided by the BACnet application, shall be used to process this information. If a number of asynchronous requests are sent, the responses shall be queued and identified by the transaction handles. If the application does not supply the BACNET_READ_RANGE_COMPLETE_CB routine; then the BACnetReadRange routine sends a request and waits for reply.

Asynchron call, which fills pResult 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

BACnetReadRange

IEC_BACNET_STATUS

A status indicating whether 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_RANGE_INFO

A pointer to the service information data structure of datatype IEC_BACNET_READ_RANGE_INFO.

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.

pResult

POINTER TO IEC_BACNET_READ_RANGE_RESULT

A pointer to a buffer to place the Result data if successful reading (datatype IEC_BACNET_READ_RANGE_RESULT). The application may initialize the itemData member of the IEC_BACNET_READ_RANGE_RESULT struture with a 0 pointer and bufferSize with 0 too. In this case the memory for the response is allocated by the API 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.