BACnetRetrievePropertyInstance (FUN)

FUNCTION BACnetRetrievePropertyInstance : IEC_BACNET_STATUS

Reads a property value from the BACnet server database.

This routine extracts the value stored in the BACnet server database for the given property. This routine carries some similarity with BACnetReadProperty, but it significantly differ in the way it performs the operation and may give the different result. While BACnetRetrievePropertyInstance extracts the value for the given property from the BACnet server database, BACnetReadProperty will send a Read-Property request.

InOut:

Scope

Name

Type

Comment

Return

BACnetRetrievePropertyInstance

IEC_BACNET_STATUS

A status indicating if the operation worked.

Input

deviceInstNumber

IEC_BACNET_DWORD

Instance number of a Device Object.

pObjectID

POINTER TO IEC_BACNET_OBJECT_ID

A pointer to the Object Identifier.

propID

IEC_BACNET_PROPERTY_ID

The Property identifier of the local property.

nIndex

DINT

Use array-indices for specific element of an array property. If the array index is not available, an error is returned. You can use -1 for non array properties. Indizes count from 1. Using -1 for array properties indicates reading the whole array.

pVal

POINTER TO IEC_BACNET_PROPERTY_CONTENTS

Pointer to a Property Contents containing a buffer into which to copy the value. Upon successful completion of this routine, the Property Contents tag attribute indicates the type of the Property. The application may initialize the buffer size with 0 and pointer with NULL. In this case the API will allocate the memory needed to store the value and the application must release it.