BACnetStack_SendSubscribeCOVPropertyMultiple
bool BACnetStack_SendSubscribeCOVPropertyMultiple( uint8_t * sentInvokeId, const uint32_t subscriberProcessIdentifier, const bool issueConfirmedNotifications, const bool useLifetime, const uint32_t lifetime, const bool useMaxNotificationDelay, const uint32_t maxNotificationDelay, const void * references, const uint32_t referenceCount, const uint32_t referencesLength, const uint8_t * connectionString, const uint8_t connectionStringLength, const uint32_t networkPortInstance, const uint16_t destinationNetwork, const uint8_t * destinationAddress, const uint8_t destinationAddressLength);Sends a SubscribeCOVPropertyMultiple request, which subscribes to change-of-value on several properties in one request.
SubscribeCOVPropertyMultiple is a confirmed service (135-2024 clause 13.16). references is referenceCount packed elements, little-endian, each a FIXED 19 BYTES:
* +-[0]---------*-[1][2]-------------*-[3..6]-------------------*-[7..10]-------------*-[11..14]------------*-[15..18]----------** | uint8 flags | uint16 objectType | uint32 objectInstance | uint32 propertyId | uint32 arrayIndex | float covIncrement |* +-------------*--------------------*--------------------------*---------------------*---------------------*--------------------**flags: bit0 = usePropertyArrayIndex, bit1 = useCovIncrement, bit2 = timestamped. References sharing a monitored object-identifier are grouped into one per-object specification. referencesLength is the total byte length of references (>= referenceCount * 19). Use the language adapter’s packer to build the buffer.
referencesLength must be at least referenceCount * 19; a shorter buffer is DETECTED and rejected rather than over-read. referenceCount must be at least 1, so the cancellation form (an empty subscription list) cannot be sent through this export.
Worked example - subscribe to Analog Input 1’s Present_Value with a COV increment of 1.0, no array index:
* 02 00 00 01 00 00 00 55 00 00 00 00 00 00 00 00 00 80 3F (19 bytes total)* |fl| |objType||objInstance||propertyId ||arrayIndex ||covIncrement 1.0f as IEEE-754 LE|*referenceCount = 1, referencesLength = 19. flags = 0x02 (bit1 useCovIncrement set; bit0 usePropertyArrayIndex and bit2 timestamped both clear).
See also: Client response hooks
BACnet reference: ANSI/ASHRAE 135-2024 clause 13.16 (SubscribeCOVPropertyMultiple Service).
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
sentInvokeId |
out | The invoke-id of the sent request, valid only if this function returns true. |
subscriberProcessIdentifier |
in | The process identifier the subscriber uses to distinguish its own subscriptions. |
issueConfirmedNotifications |
in | Whether to request confirmed (true) or unconfirmed (false) COV notifications. |
useLifetime, lifetime |
in | If useLifetime is true, the requested subscription lifetime in seconds; otherwise indefinite. |
useMaxNotificationDelay, maxNotificationDelay |
in | If useMaxNotificationDelay is true, the maximum delay the subscriber accepts before an initial notification. |
references, referenceCount, referencesLength |
in | The packed COV-reference array described above. |
connectionString, connectionStringLength |
in | The datalink address to send TO (the destination) - not the local address to send from. For IPv4 this is 6 bytes: 4 octets of IPv4 address followed by 2 octets of port, big-endian (e.g. 0xC0,0xA8,0x01,0x05,0xBA,0xC0 = 192.168.1.5:47808; see BACnetStack_SendRegisterForeignDevice() for a worked example); on BACnet/IPv4 the stack refuses to send to a connection string of any other length, except that a broadcast from a device registered as a foreign device goes to its BBMD and does not use the connection string. MS/TP and BACnet/SC use a different connection-string shape; see their respective Set/Send exports. |
networkPortInstance |
in | The Network Port object instance to send the message on, or BACNET_NETWORK_PORT_DEFAULT (4194303) for the default/single port. |
destinationNetwork, destinationAddress, destinationAddressLength |
in | The destination to send the request to. |
Returns
Section titled “Returns”True on success, false on invalid parameters or if not compiled.
Topic: Client requests. Declared in CASBACnetStackDLL.h.