Modified the character strings encoding to intialize character strings with NULLs at the end. Changed device object demo to use ANSI X34 only. Fixed bug in WriteProperty for Device Object Name.

This commit is contained in:
skarg
2006-01-05 18:40:11 +00:00
parent 105528e7b1
commit 137f36a977
5 changed files with 64 additions and 53 deletions
+2 -1
View File
@@ -48,12 +48,13 @@ typedef struct BACnet_Bit_String
uint8_t value[MAX_BITSTRING_BYTES];
} BACNET_BIT_STRING;
#define MAX_CHARACTER_STRING_BYTES (MAX_APDU-6)
typedef struct BACnet_Character_String
{
size_t length;
uint8_t encoding;
/* limit - 6 octets is the most our tag and type could be */
char value[MAX_APDU-6];
char value[MAX_CHARACTER_STRING_BYTES];
} BACNET_CHARACTER_STRING;
/* FIXME: convert the bacdcode library to use BACNET_OCTET_STRING