BACnetSubscribeCOVProperty
(FUN)
FUNCTION BACnetSubscribeCOVProperty : IEC_BACNET_STATUS
Sends an SubscribeCovProperty request
Sends a message to subscribe a COV client to receive COV notifications for an arbitrary property in an arbitrary BACnet object, or to cancel an existing subscription. If the object supports COV reporting, COV notifications may be sent to one or more subscriber clients. A subscription establishes a connection between the change of value detection and reporting mechanism within the COV initiating object, and a logical process within the COV-client. This routine may control APDU Properties like APDU length and segmentation and timeout for both request and response processing. This routine may send asynchronous messages, i.e. this routine will complete its execution before the BACnet reply comes so the application 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_SIMPLE_ACK_COMPLETE_CB routine, which is provided by the BACnet application, shall be used to process this information. If a number of asynchronous messages are sent, the responses shall be queued and identified by the transaction handles. If no BACNET_SIMPLE_ACK_COMPLETE_CB routine is used then BACnetSubscribeCOVProperty routine sends a request message and waits for the reply.
NOTE: If fLifeTimePresent and fCovIncrementPresent of pSubscriber are not set to 1, on some systems errors may occur. However, these parameters can be 1 any time, because a liftime of 0 indicates infinite lifetime and an increment of 0 an infinitesimal small increment.
- InOut:
Scope
Name
Type
Comment
Return
BACnetSubscribeCOVProperty
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.
pSubscriber
POINTER TO IEC_BACNET_SUBSCRIBE_COVP_INFO
A pointer to a memory block which contains data structure defining a set of parameters: whether this request is for subscription or cancellation, the destination Process identifier, monitored object identifier, monitored property reference, COV increment, whether confirmed or unconfirmed notification is required, and subscription lifetime.
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.
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.