Added missing enumeration text for Program object: BACnetProgramError, BACnetProgramState, and BACnetProgramRequest (#1068)
This commit is contained in:
@@ -108,3 +108,4 @@ apps/piface/libmcp23s17/
|
|||||||
apps/piface/libpifacedigital/
|
apps/piface/libpifacedigital/
|
||||||
|
|
||||||
*.vcxproj.user
|
*.vcxproj.user
|
||||||
|
.venv/
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ LFLAGS += $(GTK_LIBS)
|
|||||||
CFLAGS += $(GTK_CFLAGS)
|
CFLAGS += $(GTK_CFLAGS)
|
||||||
CFLAGS += -std=gnu99
|
CFLAGS += -std=gnu99
|
||||||
|
|
||||||
|
# BACnet Library adjustments
|
||||||
|
CFLAGS += -DTARGET_DATA_QUEUE_COUNT=128
|
||||||
|
|
||||||
# Check if GTK is available
|
# Check if GTK is available
|
||||||
GTK_CHECK = $(shell pkg-config --exists gtk+-3.0 && echo "yes")
|
GTK_CHECK = $(shell pkg-config --exists gtk+-3.0 && echo "yes")
|
||||||
|
|
||||||
|
|||||||
@@ -2442,6 +2442,18 @@ static int bacapp_snprintf_enumerated(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case PROP_PROGRAM_CHANGE:
|
||||||
|
ret_val = bacapp_snprintf(
|
||||||
|
str, str_len, "%s", bactext_program_request_name(value));
|
||||||
|
break;
|
||||||
|
case PROP_PROGRAM_STATE:
|
||||||
|
ret_val = bacapp_snprintf(
|
||||||
|
str, str_len, "%s", bactext_program_state_name(value));
|
||||||
|
break;
|
||||||
|
case PROP_REASON_FOR_HALT:
|
||||||
|
ret_val = bacapp_snprintf(
|
||||||
|
str, str_len, "%s", bactext_program_error_name(value));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ret_val =
|
ret_val =
|
||||||
bacapp_snprintf(str, str_len, "%lu", (unsigned long)value);
|
bacapp_snprintf(str, str_len, "%lu", (unsigned long)value);
|
||||||
|
|||||||
+67
-10
@@ -1752,11 +1752,13 @@ bool bactext_days_of_week_index(const char *search_name, unsigned *found_index)
|
|||||||
bacnet_days_of_week_names, search_name, found_index);
|
bacnet_days_of_week_names, search_name, found_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
INDTEXT_DATA bacnet_notify_type_names[] = { { NOTIFY_ALARM, "alarm" },
|
INDTEXT_DATA bacnet_notify_type_names[] = {
|
||||||
{ NOTIFY_EVENT, "event" },
|
/* BACnetNotifyType enumerations */
|
||||||
{ NOTIFY_ACK_NOTIFICATION,
|
{ NOTIFY_ALARM, "alarm" },
|
||||||
"ack-notification" },
|
{ NOTIFY_EVENT, "event" },
|
||||||
{ 0, NULL } };
|
{ NOTIFY_ACK_NOTIFICATION, "ack-notification" },
|
||||||
|
{ 0, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
const char *bactext_notify_type_name(unsigned index)
|
const char *bactext_notify_type_name(unsigned index)
|
||||||
{
|
{
|
||||||
@@ -2527,14 +2529,69 @@ const char *bactext_success_filter_name(unsigned index)
|
|||||||
bactext_success_filter_names, index, ASHRAE_Reserved_String);
|
bactext_success_filter_names, index, ASHRAE_Reserved_String);
|
||||||
}
|
}
|
||||||
|
|
||||||
INDTEXT_DATA bactext_logging_type_names[] = { { LOGGING_TYPE_POLLED, "polled" },
|
INDTEXT_DATA bactext_logging_type_names[] = {
|
||||||
{ LOGGING_TYPE_COV, "cov" },
|
/* BACnetLoggingType enumerations */
|
||||||
{ LOGGING_TYPE_TRIGGERED,
|
{ LOGGING_TYPE_POLLED, "polled" },
|
||||||
"triggered" },
|
{ LOGGING_TYPE_COV, "cov" },
|
||||||
{ 0, NULL } };
|
{ LOGGING_TYPE_TRIGGERED, "triggered" },
|
||||||
|
{ 0, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
const char *bactext_logging_type_name(unsigned index)
|
const char *bactext_logging_type_name(unsigned index)
|
||||||
{
|
{
|
||||||
return indtext_by_index_default(
|
return indtext_by_index_default(
|
||||||
bactext_logging_type_names, index, ASHRAE_Reserved_String);
|
bactext_logging_type_names, index, ASHRAE_Reserved_String);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
INDTEXT_DATA bactext_program_request_names[] = {
|
||||||
|
{ PROGRAM_REQUEST_READY, "ready" },
|
||||||
|
{ PROGRAM_REQUEST_LOAD, "load" },
|
||||||
|
{ PROGRAM_REQUEST_RUN, "run" },
|
||||||
|
{ PROGRAM_REQUEST_HALT, "halt" },
|
||||||
|
{ PROGRAM_REQUEST_RESTART, "restart" },
|
||||||
|
{ PROGRAM_REQUEST_UNLOAD, "unload" },
|
||||||
|
{ 0, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
const char *bactext_program_request_name(unsigned index)
|
||||||
|
{
|
||||||
|
return indtext_by_index_default(
|
||||||
|
bactext_program_request_names, index, ASHRAE_Reserved_String);
|
||||||
|
}
|
||||||
|
|
||||||
|
INDTEXT_DATA bactext_program_state_names[] = {
|
||||||
|
{ PROGRAM_STATE_IDLE, "idle" },
|
||||||
|
{ PROGRAM_STATE_LOADING, "loading" },
|
||||||
|
{ PROGRAM_STATE_RUNNING, "running" },
|
||||||
|
{ PROGRAM_STATE_WAITING, "waiting" },
|
||||||
|
{ PROGRAM_STATE_HALTED, "halted" },
|
||||||
|
{ PROGRAM_STATE_UNLOADING, "unloading" },
|
||||||
|
{ 0, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
const char *bactext_program_state_name(unsigned index)
|
||||||
|
{
|
||||||
|
return indtext_by_index_default(
|
||||||
|
bactext_program_state_names, index, ASHRAE_Reserved_String);
|
||||||
|
}
|
||||||
|
|
||||||
|
INDTEXT_DATA bactext_program_error_names[] = {
|
||||||
|
{ PROGRAM_ERROR_NORMAL, "normal" },
|
||||||
|
{ PROGRAM_ERROR_LOAD_FAILED, "load-failed" },
|
||||||
|
{ PROGRAM_ERROR_INTERNAL, "internal" },
|
||||||
|
{ PROGRAM_ERROR_PROGRAM, "program" },
|
||||||
|
{ PROGRAM_ERROR_OTHER, "other" },
|
||||||
|
{ 0, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
const char *bactext_program_error_name(unsigned index)
|
||||||
|
{
|
||||||
|
if (index < PROGRAM_ERROR_PROPRIETARY_MIN) {
|
||||||
|
return indtext_by_index_default(
|
||||||
|
bactext_program_error_names, index, ASHRAE_Reserved_String);
|
||||||
|
} else if (index <= PROGRAM_ERROR_PROPRIETARY_MAX) {
|
||||||
|
return Vendor_Proprietary_String;
|
||||||
|
} else {
|
||||||
|
return "Invalid BACnetProgramError";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -189,6 +189,13 @@ const char *bactext_result_flags_name(unsigned index);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
const char *bactext_logging_type_name(unsigned index);
|
const char *bactext_logging_type_name(unsigned index);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
const char *bactext_program_request_name(unsigned index);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
const char *bactext_program_state_name(unsigned index);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
const char *bactext_program_error_name(unsigned index);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|||||||
Reference in New Issue
Block a user