Skip to content
Version 6.1.0
Contact Us

BACnetStack_SendConfirmedTextMessage

bool BACnetStack_SendConfirmedTextMessage(
uint8_t * sentInvokeId,
const uint32_t sourceDeviceInstance,
const bool useMessageClass,
const bool useNumericMessageClass,
const uint32_t messageClassUnsigned,
const char * messageClassString,
const uint32_t messageClassStringLength,
const uint8_t messagePriority,
const char * message,
const uint32_t messageLength,
const uint8_t * connectionString,
const uint8_t connectionStringLength,
const uint32_t networkPortInstance,
const uint16_t destinationNetwork,
const uint8_t * destinationAddress,
const uint8_t destinationAddressLength,
const uint8_t messageClassStringEncoding,
const uint8_t messageEncoding);

Sends a confirmed ConfirmedTextMessage request, delivering a text message to a remote device and requiring acknowledgment.

See also: Client response hooks

BACnet reference: ANSI/ASHRAE 135-2024 clause 16.5 (ConfirmedTextMessage Service).

Parameter Direction Description
sentInvokeId out The invoke-id of the sent request, valid only if this function returns true.
sourceDeviceInstance in The device instance originating the message.
useMessageClass in Whether message-class [1] is sent at all - it is OPTIONAL per cl. 21.2.4.
useNumericMessageClass in When useMessageClass is true, selects which CHOICE arm of message-class [1] is sent: true for the numeric [0] Unsigned arm (messageClassUnsigned, which may legally be 0), false for the character [1] CharacterString arm (messageClassString, messageClassStringLength). Ignored when useMessageClass is false.
messageClassUnsigned, messageClassString, messageClassStringLength in The message class value: messageClassUnsigned when useNumericMessageClass is true, otherwise the string.
messagePriority in The BACnetMessagePriority of the message: normal = 0, urgent = 1. The value is not validated; any other number is encoded as it is.
message, messageLength in The text message content and its length.
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.
messageClassStringEncoding, messageEncoding in The character set (cl. 20.2.9) messageClassString/message are encoded in: 0 = UTF-8, 1 = IBM/Microsoft DBCS, 2 = JIS C 6226, 3 = ISO 10646 (UCS-4), 4 = ISO 10646 (UCS-2), 5 = ISO 8859-1.

True if the request was sent, otherwise false.

Topic: Client requests. Declared in CASBACnetStackDLL.h.