apps - allow text strings for object-type and property arguments. (#8)

The existing method of calling various example apps requires the user to
know the enumeration value for the object-type and property values. This
patch enhances to allow the object-type and property arguments to be
specified as strings, using the strings as defined in the spec. It does
not remove the old behaviour.

Current:
  bacrp 1234 3 1 85

New:
  bacrp 1234 binary-input 1 present-value

This change does not currently apply to the property arguments of the
readm and writem applications.
This commit is contained in:
Roger Light
2020-01-15 05:18:30 +00:00
committed by Steve Karg
parent ed3f0982a3
commit 5a7049557b
10 changed files with 193 additions and 66 deletions
+6
View File
@@ -55,6 +55,9 @@ extern "C" {
bool bactext_object_type_index(
const char *search_name,
unsigned *found_index);
bool bactext_object_type_strtol(
const char *search_name,
unsigned *found_index);
const char *bactext_notify_type_name(
unsigned index);
const char *bactext_event_type_name(
@@ -67,6 +70,9 @@ extern "C" {
bool bactext_property_index(
const char *search_name,
unsigned *found_index);
bool bactext_property_strtol(
const char *search_name,
unsigned *found_index);
const char *bactext_engineering_unit_name(
unsigned index);
bool bactext_engineering_unit_index(