BACnetWritePropertyInstance (FUN)

FUNCTION BACnetWritePropertyInstance : IEC_BACNET_STATUS

Updates an object property with new data value.

This function updates an object property with new data value like BACnetStorePropertyInstance does but it simulates as if this value was written from a BACnet client and this write property request has been received from outside. All access, priorization and range checks are executed by this call and on return the occurred BACnet error code will be returned.

InOut:

Scope

Name

Type

Comment

Return

BACnetWritePropertyInstance

IEC_BACNET_STATUS

A status indicating if the operation worked.

Input

instNumber

IEC_BACNET_DWORD

The device instance number where the object exists.

pObjectID

POINTER TO IEC_BACNET_OBJECT_ID

A pointer to the Object Identifier.

ePropertyID

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 arrays initiates writing the whole array. Do not use 0.

priority

IEC_BACNET_PRIORITY_LEVEL

The priority level for the Write-Property request, if the Property is a commandable Property (such as the present-value property of Output and Value Objects). If the Property is not commandable, the priority level BACNET_VOID_PRI should be used. If the Property is commandable, a priority level from 1 to 16 or BACNET_DEFAULT_PRI (16) can be used. The value is written into the Priority-Array Property of the Object, and the highest priority value in that array is used as the value for the commandable property.

pValue

POINTER TO IEC_BACNET_PROPERTY_CONTENTS

A pointer to a Property Contents containing the value of the Property. The Property Contents tag attribute must indicate the data type of the Property.

pError

POINTER TO IEC_BACNET_ERROR

A pointer to store the returned BACnet error code.