added additional BACnet 2004 enumerations. Added some more BACnet text for the enumerations.

This commit is contained in:
skarg
2005-11-19 22:56:58 +00:00
parent 876608d1ac
commit 6e84cf38e2
3 changed files with 120 additions and 13 deletions
+28 -13
View File
@@ -546,7 +546,8 @@ typedef enum
RELIABILITY_NO_OUTPUT = 6,
RELIABILITY_UNRELIABLE_OTHER = 7,
RELIABILITY_PROCESS_ERROR = 8,
RELIABILITY_MULTI_STATE_FAULT = 9
RELIABILITY_MULTI_STATE_FAULT = 9,
RELIABILITY_CONFIGURATION_ERROR = 10
// Enumerated values 0-63 are reserved for definition by ASHRAE.
// Enumerated values 64-65535 may be used by others subject to
// the procedures and constraints described in Clause 23.
@@ -560,18 +561,21 @@ typedef enum
EVENT_COMMAND_FAILURE = 3,
EVENT_FLOATING_LIMIT = 4,
EVENT_OUT_OF_RANGE = 5,
// complex-event-type (6), -- see comment below
EVENT_BUFFER_READY =7,
CHANGE_OF_LIFE_SAFETY = 8
/* complex-event-type (6), -- see comment below */
/* event-buffer-ready (7), -- context tag 7 is deprecated */
EVENT_CHANGE_OF_LIFE_SAFETY = 8,
EVENT_EXTENDED = 9,
EVENT_BUFFER_READY = 10,
EVENT_UNSIGNED_RANGE = 11,
// Enumerated values 0-63 are reserved for definition by ASHRAE.
// Enumerated values 64-65535 may be used by others subject to
// the procedures and constraints described in Clause 23.
// It is expected that these enumerated values will correspond to
// the use of the complex-event-type CHOICE [6] of the
// BACnetNotificationParameters production.
// The last enumeration used in this version is 8.
// The last enumeration used in this version is 11.
} BACNET_EVENT_TYPE;
typedef enum
{
FILE_RECORD_ACCESS = 0,
@@ -609,7 +613,10 @@ typedef enum
LIFE_SAFETY_OPERATION_SILENCE_VISUAL = 3,
LIFE_SAFETY_OPERATION_RESET = 4,
LIFE_SAFETY_OPERATION_RESET_ALARM = 5,
LIFE_SAFETY_OPERATION_RESET_FAULT = 6
LIFE_SAFETY_OPERATION_RESET_FAULT = 6,
LIFE_SAFETY_OPERATION_UNSILENCE = 7,
LIFE_SAFETY_OPERATION_UNSILENCE_AUDIBLE = 8,
LIFE_SAFETY_OPERATION_UNSILENCE_VISUAL = 9
// Enumerated values 0-63 are reserved for definition by ASHRAE.
// Enumerated values 64-65535 may be used by others subject to
// procedures and constraints described in Clause 23.
@@ -1015,7 +1022,10 @@ typedef enum {
ERROR_CODE_AUTHENTICATION_FAILED = 1,
ERROR_CODE_CHARACTER_SET_NOT_SUPPORTED = 41,
ERROR_CODE_CONFIGURATION_IN_PROGRESS = 2,
ERROR_CODE_DATATYPE_NOT_SUPPORTED = 47,
ERROR_CODE_DEVICE_BUSY = 3,
ERROR_CODE_DUPLICATE_NAME = 48,
ERROR_CODE_DUPLICATE_OBJECT_ID = 49,
ERROR_CODE_DYNAMIC_CREATION_NOT_SUPPORTED = 4,
ERROR_CODE_FILE_ACCESS_DENIED = 5,
ERROR_CODE_INCOMPATIBLE_SECURITY_LEVELS = 6,
@@ -1042,6 +1052,7 @@ typedef enum {
ERROR_CODE_OPTIONAL_FUNCTIONALITY_NOT_SUPPORTED = 45,
ERROR_CODE_PASSWORD_FAILURE = 26,
ERROR_CODE_PROPERTY_IS_NOT_A_LIST = 22,
ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY = 50,
ERROR_CODE_READ_ACCESS_DENIED = 27,
ERROR_CODE_SECURITY_NOT_SUPPORTED = 28,
ERROR_CODE_SERVICE_REQUEST_DENIED = 29,
@@ -1056,17 +1067,21 @@ typedef enum {
ERROR_CODE_VT_SESSION_ALREADY_CLOSED = 38,
ERROR_CODE_VT_SESSION_TERMINATION_FAILURE = 39,
ERROR_CODE_WRITE_ACCESS_DENIED = 40,
// see character_set_not_supported = 41,
// see invalid_array_index = 42,
/* see character-set-not-supported (41), */
/* see invalid-array-index (42), */
ERROR_CODE_COV_SUBSCRIPTION_FAILED = 43,
ERROR_CODE_NOT_COV_PROPERTY = 44,
// see optional_functionality_not_supported, = 45,
// see invalid_configuration_data = 46,
/* see optional-functionality-not-supported (45), */
/* see invalid-configuration-data (46), */
/* see datatype-not-supported (47), */
/* see duplicate-name (48), */
/* see duplicate-object-id (49), */
/* see property-is-not-an-array (50), */
// Enumerated values 0-255 are reserved for definition by ASHRAE.
// Enumerated values 256-65535 may be used by others subject to
// the procedures and constraints described in Clause 23.
// The last enumeration used in this version is 46.
MAX_BACNET_ERROR_CODE = 47,
// The last enumeration used in this version is 50.
MAX_BACNET_ERROR_CODE = 51,
FIRST_PROPRIETARY_ERROR_CODE = 256,
LAST_PROPRIETARY_ERROR_CODE = 65535
} BACNET_ERROR_CODE;
+87
View File
@@ -605,3 +605,90 @@ const char *bactext_abort_reason_name(int index)
ASHRAE_Reserved_String,
Vendor_Proprietary_String);
}
INDTEXT_DATA bacnet_error_class_names[] = {
{ ERROR_CLASS_DEVICE, "device"},
{ ERROR_CLASS_OBJECT, "object"},
{ ERROR_CLASS_PROPERTY, "property"},
{ ERROR_CLASS_RESOURCES, "resources"},
{ ERROR_CLASS_SECURITY, "security"},
{ ERROR_CLASS_SERVICES, "services"},
{ ERROR_CLASS_VT, "vt"},
{0,NULL}
};
const char *bactext_error_class_name(int index)
{
return indtext_by_index_split_default(
bacnet_error_class_names,
index,
FIRST_PROPRIETARY_ERROR_CLASS,
ASHRAE_Reserved_String,
Vendor_Proprietary_String);
}
INDTEXT_DATA bacnet_error_code_names[] = {
{ ERROR_CODE_OTHER, "other"},
{ ERROR_CODE_AUTHENTICATION_FAILED, "authentication-failed"},
{ ERROR_CODE_CHARACTER_SET_NOT_SUPPORTED, "character-set-not-supported"},
{ ERROR_CODE_CONFIGURATION_IN_PROGRESS, "configuration-in-progress"},
{ ERROR_CODE_DATATYPE_NOT_SUPPORTED, "datatype-not-supported"},
{ ERROR_CODE_DEVICE_BUSY, "device-busy"},
{ ERROR_CODE_DUPLICATE_NAME, "duplicate-name"},
{ ERROR_CODE_DUPLICATE_OBJECT_ID, "duplicate-object-id"},
{ ERROR_CODE_DYNAMIC_CREATION_NOT_SUPPORTED, "dynamic-creation-not-supported"},
{ ERROR_CODE_FILE_ACCESS_DENIED, "file-access-denied"},
{ ERROR_CODE_INCOMPATIBLE_SECURITY_LEVELS, "incompatible-security-levels"},
{ ERROR_CODE_INCONSISTENT_PARAMETERS, "inconsistent-parameters"},
{ ERROR_CODE_INCONSISTENT_SELECTION_CRITERION, "inconsistent-selection-criterion"},
{ ERROR_CODE_INVALID_ARRAY_INDEX, "invalid-array-index"},
{ ERROR_CODE_INVALID_CONFIGURATION_DATA, "invalid-configuration-data"},
{ ERROR_CODE_INVALID_DATA_TYPE, "invalid-data-type"},
{ ERROR_CODE_INVALID_FILE_ACCESS_METHOD, "invalid-file-access-method"},
{ ERROR_CODE_ERROR_CODE_INVALID_FILE_START_POSITION, "error-code-invalid-file-start-position"},
{ ERROR_CODE_INVALID_OPERATOR_NAME, "invalid-operator-name"},
{ ERROR_CODE_INVALID_PARAMETER_DATA_TYPE, "invalid-parameter-data-type"},
{ ERROR_CODE_INVALID_TIME_STAMP, "invalid-time-stamp"},
{ ERROR_CODE_KEY_GENERATION_ERROR, "key-generation-error"},
{ ERROR_CODE_MISSING_REQUIRED_PARAMETER, "missing-required-parameter"},
{ ERROR_CODE_NO_OBJECTS_OF_SPECIFIED_TYPE, "no-objects-of-specified-type"},
{ ERROR_CODE_NO_SPACE_FOR_OBJECT, "no-space-for-object"},
{ ERROR_CODE_NO_SPACE_TO_ADD_LIST_ELEMENT, "no-space-to-add-list-element"},
{ ERROR_CODE_NO_SPACE_TO_WRITE_PROPERTY, "no-space-to-write-property"},
{ ERROR_CODE_NO_VT_SESSIONS_AVAILABLE, "no-vt-sessions-available"},
{ ERROR_CODE_OBJECT_DELETION_NOT_PERMITTED, "object-deletion-not-permitted"},
{ ERROR_CODE_OBJECT_IDENTIFIER_ALREADY_EXISTS, "object-identifier-already-exists"},
{ ERROR_CODE_OPERATIONAL_PROBLEM, "operational-problem"},
{ ERROR_CODE_OPTIONAL_FUNCTIONALITY_NOT_SUPPORTED, "optional-functionality-not-supported"},
{ ERROR_CODE_PASSWORD_FAILURE, "password-failure"},
{ ERROR_CODE_PROPERTY_IS_NOT_A_LIST, "property-is-not-a-list"},
{ ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY, "property-is-not-an-array"},
{ ERROR_CODE_READ_ACCESS_DENIED, "read-access-denied"},
{ ERROR_CODE_SECURITY_NOT_SUPPORTED, "security-not-supported"},
{ ERROR_CODE_SERVICE_REQUEST_DENIED, "service-request-denied"},
{ ERROR_CODE_TIMEOUT, "timeout"},
{ ERROR_CODE_UNKNOWN_OBJECT, "unknown-object"},
{ ERROR_CODE_UNKNOWN_PROPERTY, "unknown-property"},
{ ERROR_CODE_RESERVED1, "reserved1"},
{ ERROR_CODE_UNKNOWN_VT_CLASS, "unknown-vt-class"},
{ ERROR_CODE_UNKNOWN_VT_SESSION, "unknown-vt-session"},
{ ERROR_CODE_UNSUPPORTED_OBJECT_TYPE, "unsupported-object-type"},
{ ERROR_CODE_VALUE_OUT_OF_RANGE, "value-out-of-range"},
{ ERROR_CODE_VT_SESSION_ALREADY_CLOSED, "vt-session-already-closed"},
{ ERROR_CODE_VT_SESSION_TERMINATION_FAILURE, "vt-session-termination-failure"},
{ ERROR_CODE_WRITE_ACCESS_DENIED, "write-access-denied"},
{ ERROR_CODE_COV_SUBSCRIPTION_FAILED, "cov-subscription-failed"},
{ ERROR_CODE_NOT_COV_PROPERTY, "not-cov-property"},
{0,NULL}
};
const char *bactext_error_code_name(int index)
{
return indtext_by_index_split_default(
bacnet_error_code_names,
index,
FIRST_PROPRIETARY_ERROR_CLASS,
ASHRAE_Reserved_String,
Vendor_Proprietary_String);
}
+5
View File
@@ -47,6 +47,11 @@ const char *bactext_unconfirmed_service_name(int index);
const char *bactext_application_tag_name(int index);
const char *bactext_object_type_name(int index);
const char *bactext_property_name(int index);
const char *bactext_engineering_unit_name(int index);
const char *bactext_reject_reason_name(int index);
const char *bactext_abort_reason_name(int index);
const char *bactext_error_class_name(int index);
const char *bactext_error_code_name(int index);
#ifdef __cplusplus
}