Feature/refactor-apps-string-parsing (#1152)
* Added bacnet_str functions for parsing various numeric strings. * Renamed BACnet string API to be clearer when no stdlib function exists. * Fixed incompatible types - from 'BACNET_UNSIGNED_INTEGER *' to 'unsigned long *' warning * Changed bacnet-str-to functions to use ERANGE for error detection. * Refactored some apps to use common string parsing for BACnet data types. * Refactor bacapp_parse_application_data to use bacnet_string_to_unsigned for better clarity * Added strtol for BACnetEventType.
This commit is contained in:
@@ -297,7 +297,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* Handle command-line arguments */
|
||||
if (argc > 1) {
|
||||
device_instance = strtoul(argv[1], NULL, 10);
|
||||
bacnet_string_to_uint32(argv[1], &device_instance);
|
||||
}
|
||||
Device_Set_Object_Instance_Number(device_instance);
|
||||
printf("BACnet Device ID: %u\n", device_instance);
|
||||
|
||||
Reference in New Issue
Block a user