Skip to content
Version 6.1.0
Contact Us

BACnetStack_SendUnsubscribedUnconfirmedCOVNotification

bool BACnetStack_SendUnsubscribedUnconfirmedCOVNotification(
const uint32_t initiatingDeviceInstance,
const uint32_t subscriberProcessIdentifier,
const uint16_t monitoredObjectType,
const uint32_t monitoredObjectInstance,
const uint32_t timeRemaining,
const void * properties,
const uint32_t propertyCount,
const uint32_t propertiesLength,
const uint8_t * connectionString,
const uint8_t connectionStringLength,
const uint32_t networkPortInstance,
const bool broadcast,
const uint16_t destinationNetwork,
const uint8_t * destinationAddress,
const uint8_t destinationAddressLength);

Sends an unconfirmed COV notification unprompted by any subscription (cl. 13.1.1), used by a device to announce a value on its own initiative rather than in response to SubscribeCOV.

Clause 21.3.1’s UnconfirmedCOVNotification-Request has FIVE required fields. Subscriber-process-identifier, time-remaining and list-of-values are all parameters.

VALUES COME FROM THIS DEVICE’S OWN DATABASE, not from the caller. initiatingDeviceInstance must name a device added with BACnetStack_AddDevice(), and each property’s value is read from it exactly as a ReadProperty would. A gateway announcing on behalf of a device it proxies models that device as a VIRTUAL device (BACnetStack_AddVirtualNetwork() + BACnetStack_AddDeviceToVirtualNetwork()) and announces from it - at which point the values are local and this rule holds. Supplying values through the call instead would need a datatype-plus-bytes encoding per property, a far larger surface, and would let a caller announce a value the device would not itself report.

properties is propertyCount packed elements, little-endian, each a FIXED 9 BYTES - the same shape convention as BACnetStack_SendSubscribeCOVPropertyMultiple()’s references:

+-[0]---------*-[1..4]--------------*-[5..8]---------------*
| uint8 flags | uint32 propertyId | uint32 arrayIndex |
+-------------*---------------------*----------------------*

flags: bit0 = usePropertyArrayIndex (when clear, arrayIndex is ignored and the whole property is sent). Every element names a property of the SAME monitored object - the object identifier is already given by monitoredObjectType/monitoredObjectInstance.

propertiesLength is the total byte length of properties and must be at least propertyCount * 9; a shorter buffer is DETECTED and rejected rather than over-read. propertyCount must be at least 1.

Worked example - announce Present_Value, no array index:

00 55 00 00 00 00 00 00 00 (9 bytes total)
|fl| |propertyId ||arrayIndex |

propertyCount = 1, propertiesLength = 9. (propertyIdentifier 85 = Present_Value.)

NOTE, PARAMETER-ORDER: unlike its four SendCOVNotification siblings, broadcast sits after networkPortInstance here.

BACnet reference: ANSI/ASHRAE 135-2024 clause 13.1.1 (Unsubscribed COV Notifications); clause 13.7 (UnconfirmedCOVNotification Service).

Parameter Direction Description
initiatingDeviceInstance in The LOCAL device the notification is announced from.
subscriberProcessIdentifier in Clause 21.3.1’s subscriber-process-identifier. 0 is the conventional value for an unsubscribed notification.
monitoredObjectType, monitoredObjectInstance in The object whose properties are announced. The type and instance are one BACnet Object Identifier carried as two parameters (see the API conventions).
timeRemaining in Clause 21.3.1’s time-remaining, in seconds. 0 means “not applicable”, which is correct for an unsubscribed notification and was the previous hardwired value.
properties, propertyCount, propertiesLength in The packed property list 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.
broadcast in Whether to broadcast rather than send to a single destination. A broadcast notification must carry a subscriberProcessIdentifier of 0 (135-2024 cl. 13.1); the stack sends the value it is given.
destinationNetwork, destinationAddress, destinationAddressLength in The destination.

True on success; false if the device or object does not exist, the packed buffer is malformed or too short, any named property cannot be read from the local database, or COV notification support was not compiled.

Topic: Client requests. Declared in CASBACnetStackDLL.h.