BACnetAsyncTransactionToken (STRUCT)¶
TYPE BACnetAsyncTransactionToken : STRUCT
A transaction token for BACnet “asynchronous calls”.
For all “asynchronous calls” there is a callback in CODESYS runtime component CmpBACnet, which get’s called asynchronously after the IEC-code has startet the “asynchronous call”. This had been chosen as the best solution to avoid the complexitity of handling those callbacks via “IEC-Events”. The callback in CODESYS runtime component CmpBACnet sets a request status, which can be checked by the IEC-code, this mechanism is referenced as “caller status polling” later on.
BACnetAsyncTransactionToken is used to identify transactions of “asynchronous calls” like BACnetReadProperty, and to allow BACnetCancelPendingConfirmedRequest if needed. BACnetAsyncTransactionToken transports a pointer to the request status, to allow “caller status polling”. The caller had to provide the memory pointed to by this pointer.
- InOut:
Name
Type
Initial
Comment
transactionID
UDINT
0
Unique ID to identify the transaction. Set the transactionID prio to the “asynchronous call”. Reset the transactionID to 0 after the “asynchronous call” is done or after a call to BACnetCancelPendingConfirmedRequest.
pStatus
POINTER TO IEC_BACNET_STATUS
0
Asynchronous Status of the call. If this value switches from IEC_BACNET_STATUS.BACNET_STATUS_BUSY to another state, for example IEC_BACNET_STATUS.BACNET_STATUS_OK, the asynchronous call has finished.
callbackDone
UDINT
0
internal information to keep track of transaction status
cancelled
UDINT
0
internal information to keep track of transaction status