EVT_BACNET_PROP_WRITE (STRUCT)

TYPE EVT_BACNET_PROP_WRITE : STRUCT

Prototype for the write callback

This function is invoked by the API default actions if a WriteProperty or WritePropertyMutiple request is being processed or an internal write to the property is made which changes it’s value. A pointer to the function is registered with the ::BACnetSetCallback.nn NOTE: On initialization of the client or server interface of this API the user application has to make the choice, if it preferes the write callback to be called BEFORE the internal database contents is updated or AFTER the update has been done. The configuration is done by setting the bRWPropCBComplete member of the ::BACNET_SRVR_INIT or ::BACNET_CLI_INIT struct to True or False. If this is set to True, write callbacks will occur AFTER the internal database has been updated and parameter index will always have a value of BACNET_VOID_INDEX to indicate that the whole array contents is present even if only one index of content has been changed.

Return: IEC_BACNET_CALLBACK_STATUS

InOut:

Name

Type

Comment

pCBStatus

POINTER TO IEC_BACNET_CALLBACK_STATUS

Return value of a service application callback event set with BACnetSetCallback.

objectH

IEC_BACNET_HANDLE

Handle to the object within the API’s databse of which property value is to be written.

deviceID

IEC_BACNET_INST_NUMBER

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 to be written.

propertyID

IEC_BACNET_PROPERTY_ID

Specifies the property identifier of the property which value is to be written.

index

IEC_BACNET_ARRAY_INDEX

The optional array index for which the value is written. In case of the defined value ::BACNET_VOID_INDEX the accessed property is no array. The defined value ::BACNET_ENTIRE_ARRAY indicates that the whole array content is written. Any other value indicates a write for a specific array element. The index of BACnet arrays start counting at 1.

bInternalCall

IEC_BACNET_BOOLEAN

If set the write callback has been initiated by internal API update processes for the specified property and it was NOT initiated by an service access (write, write-multiple…) over BACnet.

pPropertyContents

POINTER TO IEC_BACNET_PROPERTY_CONTENTS

The property contents buffer which is filled by the stack API. The user has the choice to use the c-structure representation of the value (stored in the buffer member of the structure) or to use the ASN1 encoded representation of the value (stored in the rawBuffer member of the structure).

pUserPointer

POINTER TO IEC_BACNET_BYTE

This is the pointer which the user application has provided by the declaration before object construction. See also ::BACNET_PROPERTY_INSTANCE.