Changed the object type print to be as defined in EPICS.
Changed property names to show "proprietary #" when in proprietary range.
This commit is contained in:
@@ -206,8 +206,14 @@ static void PrintReadPropertyMultipleData(
|
|||||||
listOfProperties = rpm_data->listOfProperties;
|
listOfProperties = rpm_data->listOfProperties;
|
||||||
while (listOfProperties) {
|
while (listOfProperties) {
|
||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
fprintf(stdout, " %s: ",
|
if (listOfProperties->propertyIdentifier < 512) {
|
||||||
bactext_property_name(listOfProperties->propertyIdentifier));
|
fprintf(stdout, " %s: ",
|
||||||
|
bactext_property_name(
|
||||||
|
listOfProperties->propertyIdentifier));
|
||||||
|
} else {
|
||||||
|
fprintf(stdout, " proprietary %u: ",
|
||||||
|
listOfProperties->propertyIdentifier);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (listOfProperties->propertyArrayIndex != BACNET_ARRAY_ALL) {
|
if (listOfProperties->propertyArrayIndex != BACNET_ARRAY_ALL) {
|
||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
|
|||||||
@@ -70,8 +70,13 @@ void handler_ucov_notification(
|
|||||||
bactext_object_type_name(cov_data.monitoredObjectIdentifier.type),
|
bactext_object_type_name(cov_data.monitoredObjectIdentifier.type),
|
||||||
cov_data.monitoredObjectIdentifier.instance);
|
cov_data.monitoredObjectIdentifier.instance);
|
||||||
fprintf(stderr, "time remaining=%u seconds ", cov_data.timeRemaining);
|
fprintf(stderr, "time remaining=%u seconds ", cov_data.timeRemaining);
|
||||||
fprintf(stderr, "%s ",
|
if (property_value.propertyIdentifier < 512) {
|
||||||
bactext_property_name(property_value.propertyIdentifier));
|
fprintf(stderr, "%s ",
|
||||||
|
bactext_property_name(property_value.propertyIdentifier));
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "proprietary %u ",
|
||||||
|
property_value.propertyIdentifier);
|
||||||
|
}
|
||||||
if (property_value.propertyArrayIndex != BACNET_ARRAY_ALL) {
|
if (property_value.propertyArrayIndex != BACNET_ARRAY_ALL) {
|
||||||
fprintf(stderr, "%u ", property_value.propertyArrayIndex);
|
fprintf(stderr, "%u ", property_value.propertyArrayIndex);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -903,6 +903,7 @@ typedef enum {
|
|||||||
/* the procedures and constraints described in Clause 23. */
|
/* the procedures and constraints described in Clause 23. */
|
||||||
} BACNET_OBJECT_TYPE;
|
} BACNET_OBJECT_TYPE;
|
||||||
/* used for bit string loop */
|
/* used for bit string loop */
|
||||||
|
#define PROPRIETARY_BACNET_OBJECT_TYPE 128
|
||||||
#define MAX_BACNET_OBJECT_TYPE 1023
|
#define MAX_BACNET_OBJECT_TYPE 1023
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
@@ -847,17 +847,31 @@ bool bacapp_print_value(
|
|||||||
case BACNET_APPLICATION_TAG_ENUMERATED:
|
case BACNET_APPLICATION_TAG_ENUMERATED:
|
||||||
switch (property) {
|
switch (property) {
|
||||||
case PROP_OBJECT_TYPE:
|
case PROP_OBJECT_TYPE:
|
||||||
fprintf(stream, "%s",
|
if (value->type.Enumerated < MAX_ASHRAE_OBJECT_TYPE) {
|
||||||
bactext_object_type_name(value->type.Enumerated));
|
fprintf(stream, "%s",
|
||||||
|
bactext_object_type_name(
|
||||||
|
value->type.Enumerated));
|
||||||
|
} else if (value->type.Enumerated < 128) {
|
||||||
|
fprintf(stream, "reserved %u",
|
||||||
|
value->type.Enumerated);
|
||||||
|
} else {
|
||||||
|
fprintf(stream, "proprietary %u",
|
||||||
|
value->type.Enumerated);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PROP_EVENT_STATE:
|
case PROP_EVENT_STATE:
|
||||||
fprintf(stream, "%s",
|
fprintf(stream, "%s",
|
||||||
bactext_event_state_name(value->type.Enumerated));
|
bactext_event_state_name(value->type.Enumerated));
|
||||||
break;
|
break;
|
||||||
case PROP_UNITS:
|
case PROP_UNITS:
|
||||||
fprintf(stream, "%s",
|
if (value->type.Enumerated < 256) {
|
||||||
bactext_engineering_unit_name(value->type.
|
fprintf(stream, "%s",
|
||||||
Enumerated));
|
bactext_engineering_unit_name(value->type.
|
||||||
|
Enumerated));
|
||||||
|
} else {
|
||||||
|
fprintf(stream, "proprietary %u",value->type.
|
||||||
|
Enumerated);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PROP_PRESENT_VALUE:
|
case PROP_PRESENT_VALUE:
|
||||||
fprintf(stream, "%s",
|
fprintf(stream, "%s",
|
||||||
@@ -921,9 +935,19 @@ bool bacapp_print_value(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BACNET_APPLICATION_TAG_OBJECT_ID:
|
case BACNET_APPLICATION_TAG_OBJECT_ID:
|
||||||
fprintf(stream, "%s %u",
|
if (value->type.Object_Id.type < MAX_ASHRAE_OBJECT_TYPE) {
|
||||||
bactext_object_type_name(value->type.Object_Id.type),
|
fprintf(stream, "(%s, %u)",
|
||||||
value->type.Object_Id.instance);
|
bactext_object_type_name(value->type.Object_Id.type),
|
||||||
|
value->type.Object_Id.instance);
|
||||||
|
} else if (value->type.Object_Id.type < 128) {
|
||||||
|
fprintf(stream, "(reserved %u, %u)",
|
||||||
|
value->type.Object_Id.type,
|
||||||
|
value->type.Object_Id.instance);
|
||||||
|
} else {
|
||||||
|
fprintf(stream, "(proprietary %u, %u)",
|
||||||
|
value->type.Object_Id.type,
|
||||||
|
value->type.Object_Id.instance);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
status = false;
|
status = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user