IEC_BACNET_STRING (STRUCT)

TYPE IEC_BACNET_STRING : STRUCT

Structure for representing the BACnetCharString type

A Character String is a BACnet primitive datatype. Any BACnet character string can be stored in the BACNET_CHAR_STRING datatype. A Property Contents containing this datatype will have its tag equal to DATA_TYPE_CHAR_STRING. A BACnet character string can be one of the five character sets described below. The enumeration datatype BACNET_STRING_TYPE is used to represent each BACnet character set. In addition, BACNET_STRING_TYPE may have a STRING_NONE value, which is used to indicate the absent of an optional string.

The string delimiter is added by ASN decoder for convenience, but the application does not have to rely on it to determine the total length of the string, because the total size of the string in bytes is ready available in nBufferSize.n

NOTE: The stack API expects the string to be in the right encoding. It doesn’t make any character or codepage conversions here.

InOut:

Name

Type

Comment

typ

IEC_BACNET_STRING_TYPE

Specifies the encoding of the string

codePage

IEC_BACNET_WORD

Specifies the codepage of the string (only needed for type BACNET_STRING_DBCS)

nBufferSize

IEC_BACNET_UNSIGNED

Size of the buffer in Bytes which holds the string (up to but not neccessary including the termination character)

data

UNION_BACNET_STRING

Union which covers the pointers for the different possible encodings