Added parser for command line parsing of a BACnet BitString. This is nice if you want to write Event Enable, for example. Expects the ASCII bits as "1011001" or "1,0,1,1,0,0,1" or "1 0 1 1 0 0 1".

This commit is contained in:
skarg
2014-06-13 21:25:40 +00:00
parent fa1c457f2f
commit 63288d062c
3 changed files with 53 additions and 4 deletions
+3 -3
View File
@@ -1467,9 +1467,9 @@ bool bacapp_parse_application_data(
(char *) argv);
break;
case BACNET_APPLICATION_TAG_BIT_STRING:
/* FIXME: how to parse a bit string? */
status = false;
bitstring_init(&value->type.Bit_String);
#if PRINT_ENABLED
status = bitstring_init_ascii(&value->type.Bit_String, argv);
#endif
break;
case BACNET_APPLICATION_TAG_ENUMERATED:
unsigned_long_value = strtoul(argv, NULL, 0);