Add enumeration text lookup for BACnet types (#1209)

* Added enumeration text lookup for BACnetAuthenticationStatus, BACnetAuthorizationMode, BACnetAccessCredentialDisable, BACnetAccessCredentialDisableReason, BACnetAccessUserType, BACnetAccessZoneOccupancyState, BACnetWriteStatus, BACnetIPMode, BACnetDoorValue, BACnetMaintenance, BACnetEscalatorFault, BACnetEscalatorMode, BACnetEscalatorOperationDirection, BACnetBackupState, BACnetSecurityLevel, BACnetLiftCarDirection, BACnetLiftCarDoorCommand, BACnetLiftCarDriveStatus, BACnetLiftCarMode, BACnetLiftFault, BACnetLiftGroupMode, BACnetAuditLevel, BACnetAuditOperation, BACnetSCHubConnectorState, BACnetSCConnectionState, BACnetNodeRelationship, BACnetAction, BACnetFileAccessMethod, BACnetLockStatus, BACnetDoorAlarmState, BACnetDoorStatus, BACnetDoorSecuredStatus, and BACnetAccessEvent.

* Created BINARY_PV_MAX with the same semantic meaning as one more than the last valid enumeration, and deprecated MAX_BINARY_PV usage in the examples.

* Reduced code size by using bactext_property_states_strtoul() instead of individual API for each enumations.
This commit is contained in:
Steve Karg
2026-01-24 16:11:25 -06:00
committed by GitHub
parent 81c42566a7
commit 4924a57ccc
12 changed files with 3345 additions and 425 deletions
+14 -1
View File
@@ -12,7 +12,7 @@ The git repositories are hosted at the following sites:
* https://bacnet.sourceforge.net/
* https://github.com/bacnet-stack/bacnet-stack/
## [Unreleased] - 2026-01-15
## [Unreleased] - 2026-01-22
### Security
@@ -32,6 +32,19 @@ The git repositories are hosted at the following sites:
### Added
* Added enumeration text lookup for BACnetAuthenticationStatus,
BACnetAuthorizationMode, BACnetAccessCredentialDisable,
BACnetAccessCredentialDisableReason, BACnetAccessUserType,
BACnetAccessZoneOccupancyState, BACnetWriteStatus, BACnetIPMode,
BACnetDoorValue, BACnetMaintenance, BACnetEscalatorFault,
BACnetEscalatorMode, BACnetEscalatorOperationDirection,
BACnetBackupState, BACnetSecurityLevel, BACnetLiftCarDirection,
BACnetLiftCarDoorCommand, BACnetLiftCarDriveStatus, BACnetLiftCarMode,
BACnetLiftFault, BACnetLiftGroupMode, BACnetAuditLevel, BACnetAuditOperation,
BACnetSCHubConnectorState, BACnetSCConnectionState, BACnetNodeRelationship,
BACnetAction, BACnetFileAccessMethod, BACnetLockStatus,
BACnetDoorAlarmState, BACnetDoorStatus, BACnetDoorSecuredStatus,
and BACnetAccessEvent. (#1209)
* Added a new API for writable property lists across all the basic example
object types, preparing for the introduction of a Writable_Property_List
property in every object in a future BACnet standard revision.
+143 -9
View File
@@ -2233,6 +2233,7 @@ static int bacapp_snprintf_enumerated(
break;
case PROP_PRESENT_VALUE:
case PROP_RELINQUISH_DEFAULT:
case PROP_FEEDBACK_VALUE:
switch (object_type) {
case OBJECT_BINARY_INPUT:
case OBJECT_BINARY_OUTPUT:
@@ -2246,6 +2247,10 @@ static int bacapp_snprintf_enumerated(
str, str_len, "%s",
bactext_binary_lighting_pv_name(value));
break;
case OBJECT_ACCESS_DOOR:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_door_value_name(value));
break;
default:
ret_val = bacapp_snprintf(
str, str_len, "%lu", (unsigned long)value);
@@ -2265,9 +2270,20 @@ static int bacapp_snprintf_enumerated(
str, str_len, "%s", bactext_segmentation_name(value));
break;
case PROP_NODE_TYPE:
case PROP_SUBORDINATE_NODE_TYPES:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_node_type_name(value));
break;
case PROP_SUBORDINATE_RELATIONSHIPS:
case PROP_DEFAULT_SUBORDINATE_RELATIONSHIP:
if (bactext_node_relationship_name_proprietary((unsigned)value)) {
ret_val = bacapp_snprintf(
str, str_len, "proprietary-%lu", (unsigned long)value);
} else {
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_node_relationship_name(value));
}
break;
case PROP_TRANSITION:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_lighting_transition(value));
@@ -2298,6 +2314,8 @@ static int bacapp_snprintf_enumerated(
bactext_life_safety_state_name(value));
break;
default:
ret_val = bacapp_snprintf(
str, str_len, "%lu", (unsigned long)value);
break;
}
break;
@@ -2341,6 +2359,125 @@ static int bacapp_snprintf_enumerated(
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_timer_transition_name(value));
break;
case PROP_ACTION:
ret_val =
bacapp_snprintf(str, str_len, "%s", bactext_action_name(value));
break;
case PROP_FILE_ACCESS_METHOD:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_file_access_method_name(value));
break;
case PROP_LOCK_STATUS:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_lock_status_name(value));
break;
case PROP_DOOR_ALARM_STATE:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_door_alarm_state_name(value));
break;
case PROP_DOOR_STATUS:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_door_status_name(value));
break;
case PROP_SECURED_STATUS:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_door_secured_status_name(value));
break;
case PROP_ACCESS_EVENT:
case PROP_LAST_ACCESS_EVENT:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_access_event_name(value));
break;
case PROP_AUTHENTICATION_STATUS:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_authentication_status_name(value));
break;
case PROP_AUTHORIZATION_MODE:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_authorization_mode_name(value));
break;
case PROP_CREDENTIAL_STATUS:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_binary_present_value_name(value));
break;
case PROP_CREDENTIAL_DISABLE:
ret_val = bacapp_snprintf(
str, str_len, "%s",
bactext_access_credential_disable_name(value));
break;
case PROP_REASON_FOR_DISABLE:
ret_val = bacapp_snprintf(
str, str_len, "%s",
bactext_access_credential_disable_reason_name(value));
break;
case PROP_USER_TYPE:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_access_user_type_name(value));
break;
case PROP_OCCUPANCY_STATE:
ret_val = bacapp_snprintf(
str, str_len, "%s",
bactext_access_zone_occupancy_state_name(value));
break;
case PROP_SILENCED:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_silenced_state_name(value));
break;
case PROP_WRITE_STATUS:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_write_status_name(value));
break;
case PROP_BACNET_IP_MODE:
case PROP_BACNET_IPV6_MODE:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_ip_mode_name(value));
break;
case PROP_SC_HUB_CONNECTOR_STATE:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_sc_hub_connector_state_name(value));
break;
case PROP_MAINTENANCE_REQUIRED:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_maintenance_name(value));
break;
case PROP_FAULT_SIGNALS:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_escalator_fault_name(value));
break;
case PROP_OPERATION_DIRECTION:
ret_val = bacapp_snprintf(
str, str_len, "%s",
bactext_escalator_operation_direction_name(value));
break;
case PROP_BACKUP_AND_RESTORE_STATE:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_backup_state_name(value));
break;
case PROP_BASE_DEVICE_SECURITY_POLICY:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_security_level_name(value));
break;
case PROP_GROUP_MODE:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_lift_group_mode_name(value));
break;
case PROP_CAR_MODE:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_lift_car_mode_name(value));
break;
case PROP_CAR_DRIVE_STATUS:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_lift_car_drive_status_name(value));
break;
case PROP_CAR_DOOR_COMMAND:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_lift_car_door_command_name(value));
break;
case PROP_CAR_ASSIGNED_DIRECTION:
case PROP_CAR_MOVING_DIRECTION:
ret_val = bacapp_snprintf(
str, str_len, "%s", bactext_lift_car_direction_name(value));
break;
default:
ret_val =
bacapp_snprintf(str, str_len, "%lu", (unsigned long)value);
@@ -2902,9 +3039,8 @@ static int bacapp_snprintf_channel_value(
break;
case BACNET_APPLICATION_TAG_ENUMERATED:
#if defined(CHANNEL_ENUMERATED)
ret_val = bacapp_snprintf_enumerated(
str, str_len, OBJECT_COMMAND, PROP_ACTION,
value->type.Enumerated);
ret_val = bacapp_snprintf(
str, str_len, "%lu", (unsigned long)value->type.Enumerated);
#endif
break;
case BACNET_APPLICATION_TAG_LIGHTING_COMMAND:
@@ -3385,9 +3521,8 @@ static int bacapp_snprintf_primitive_data_value(
#endif
#if defined(BACAPP_ENUMERATED)
case BACNET_APPLICATION_TAG_ENUMERATED:
ret_val = bacapp_snprintf_enumerated(
str, str_len, OBJECT_COMMAND, PROP_ACTION,
value->type.Enumerated);
ret_val = bacapp_snprintf(
str, str_len, "%lu", (unsigned long)value->type.Enumerated);
break;
#endif
case BACNET_APPLICATION_TAG_EMPTYLIST:
@@ -3527,9 +3662,8 @@ static int bacapp_snprintf_action_property_value(
#endif
#if defined(BACACTION_ENUMERATED)
case BACNET_APPLICATION_TAG_ENUMERATED:
ret_val = bacapp_snprintf_enumerated(
str, str_len, OBJECT_COMMAND, PROP_ACTION,
value->type.Enumerated);
ret_val = bacapp_snprintf(
str, str_len, "%lu", (unsigned long)value->type.Enumerated);
break;
#endif
case BACNET_APPLICATION_TAG_EMPTYLIST:
+131 -48
View File
@@ -607,14 +607,16 @@ typedef enum BACnetBinaryPV {
MIN_BINARY_PV = 0, /* for validating incoming values */
BINARY_INACTIVE = 0,
BINARY_ACTIVE = 1,
MAX_BINARY_PV = 1, /* for validating incoming values */
MAX_BINARY_PV = 1, /* deprecated */
BINARY_PV_MAX = 2, /* for validating incoming values */
BINARY_NULL = 255 /* our homemade way of storing this info */
} BACNET_BINARY_PV;
typedef enum {
ACTION_BINARY_PV,
ACTION_UNSIGNED,
ACTION_FLOAT
ACTION_BINARY_PV = 0,
ACTION_UNSIGNED = 1,
ACTION_FLOAT = 2,
ACTION_VALUE_MAX = 3
} BACNET_ACTION_VALUE_TYPE;
typedef enum BACnetEventState {
@@ -1311,13 +1313,14 @@ typedef enum BACnetEventType {
EVENT_FLOATING_LIMIT = 4,
EVENT_OUT_OF_RANGE = 5,
EVENT_COMPLEX_EVENT_TYPE = 6, /* -- see comment below */
/* event-buffer-ready (7), -- context tag 7 is deprecated */
EVENT_RESERVED_7 = 7, /* -- context tag 7 is deprecated */
EVENT_CHANGE_OF_LIFE_SAFETY = 8,
EVENT_EXTENDED = 9,
EVENT_BUFFER_READY = 10,
EVENT_UNSIGNED_RANGE = 11,
/* -- context tag 12 is reserved for future addenda
since it conflicts with event-values[12] OPTIONAL */
EVENT_RESERVED_12 = 12,
EVENT_ACCESS_EVENT = 13,
EVENT_DOUBLE_OUT_OF_RANGE = 14,
EVENT_SIGNED_OUT_OF_RANGE = 15,
@@ -1341,7 +1344,8 @@ typedef enum BACnetEventType {
typedef enum BACnetFileAccessMethod {
FILE_RECORD_ACCESS = 0,
FILE_STREAM_ACCESS = 1,
FILE_RECORD_AND_STREAM_ACCESS = 2
FILE_RECORD_AND_STREAM_ACCESS = 2,
BACNET_FILE_ACCESS_METHOD_MAX = 3
} BACNET_FILE_ACCESS_METHOD;
typedef enum BACnetLifeSafetyMode {
@@ -1388,6 +1392,8 @@ typedef enum BACnetLifeSafetyOperation {
LIFE_SAFETY_OP_UNSILENCE = 7,
LIFE_SAFETY_OP_UNSILENCE_AUDIBLE = 8,
LIFE_SAFETY_OP_UNSILENCE_VISUAL = 9,
LIFE_SAFETY_OP_RESERVED_MIN = 10,
LIFE_SAFETY_OP_RESERVED_MAX = 63,
/* 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. */
@@ -1451,6 +1457,8 @@ typedef enum BACnetSilencedState {
SILENCED_STATE_AUDIBLE_SILENCED = 1,
SILENCED_STATE_VISIBLE_SILENCED = 2,
SILENCED_STATE_ALL_SILENCED = 3,
SILENCED_STATE_RESERVED_MIN = 4,
SILENCED_STATE_RESERVED_MAX = 63,
/* 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. */
@@ -1466,6 +1474,8 @@ typedef enum BACnetMaintenance {
MAINTENANCE_PERIODIC_TEST = 1,
MAINTENANCE_NEED_SERVICE_OPERATIONAL = 2,
MAINTENANCE_NEED_SERVICE_INOPERATIVE = 3,
MAINTENANCE_RESERVED_MIN = 4,
MAINTENANCE_RESERVED_MAX = 255,
/* Enumerated values 0-255 are reserved for definition by ASHRAE. */
/* Enumerated values 256-65535 may be used by others subject to */
/* procedures and constraints described in Clause 23. */
@@ -1696,7 +1706,9 @@ typedef enum {
/* no-value - context tagged null */
BACNET_APPLICATION_TAG_NO_VALUE,
/* ABSTRACT-SYNTAX - constructed value */
BACNET_APPLICATION_TAG_ABSTRACT_SYNTAX
BACNET_APPLICATION_TAG_ABSTRACT_SYNTAX,
/* == mark the end of this list == */
BACNET_APPLICATION_TAG_EXTENDED_MAX
} BACNET_APPLICATION_TAG;
/* note: these are not the real values, */
@@ -1882,7 +1894,8 @@ typedef enum BACnetLogStatus {
typedef enum BACnetLoggingType {
LOGGING_TYPE_POLLED = 0,
LOGGING_TYPE_COV = 1,
LOGGING_TYPE_TRIGGERED = 2
LOGGING_TYPE_TRIGGERED = 2,
BACNET_LOGGING_TYPE_MAX = 3
} BACNET_LOGGING_TYPE;
typedef enum BACnetLogDatum {
@@ -2344,7 +2357,8 @@ typedef enum BACnetNodeType {
BACNET_NODE_MEMBER = 18,
BACNET_NODE_PROTOCOL = 19,
BACNET_NODE_ROOM = 20,
BACNET_NODE_ZONE = 21
BACNET_NODE_ZONE = 21,
BACNET_NODE_TYPE_MAX = 22
} BACNET_NODE_TYPE;
typedef enum BACnetRelationship {
@@ -2391,13 +2405,15 @@ typedef enum BACnetShedState {
BACNET_SHED_INACTIVE = 0,
BACNET_SHED_REQUEST_PENDING = 1,
BACNET_SHED_COMPLIANT = 2,
BACNET_SHED_NON_COMPLIANT = 3
BACNET_SHED_NON_COMPLIANT = 3,
BACNET_SHED_STATE_MAX = 4
} BACNET_SHED_STATE;
typedef enum BACnetShedLevelType {
BACNET_SHED_TYPE_PERCENT, /* Unsigned */
BACNET_SHED_TYPE_LEVEL, /* Unsigned */
BACNET_SHED_TYPE_AMOUNT /* REAL */
BACNET_SHED_TYPE_PERCENT = 0, /* Unsigned */
BACNET_SHED_TYPE_LEVEL = 1, /* Unsigned */
BACNET_SHED_TYPE_AMOUNT = 2, /* REAL */
BACNET_SHED_LEVEL_TYPE_MAX = 3
} BACNET_SHED_LEVEL_TYPE;
typedef enum BACnetLightingOperation {
@@ -2530,17 +2546,22 @@ typedef enum BACnetDoorAlarmState {
DOOR_ALARM_STATE_DOOR_FAULT = 5,
DOOR_ALARM_STATE_LOCK_DOWN = 6,
DOOR_ALARM_STATE_FREE_ACCESS = 7,
DOOR_ALARM_STATE_EGRESS_OPEN = 8
DOOR_ALARM_STATE_EGRESS_OPEN = 8,
DOOR_ALARM_STATE_RESERVED_MIN = 9,
DOOR_ALARM_STATE_RESERVED_MAX = 255,
/* 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. */
DOOR_ALARM_STATE_PROPRIETARY_MIN = 256,
DOOR_ALARM_STATE_PROPRIETARY_MAX = 65535
} BACNET_DOOR_ALARM_STATE;
/* Door Secured Status */
typedef enum BACnetDoorSecuredStatus {
DOOR_SECURED_STATUS_SECURED = 0,
DOOR_SECURED_STATUS_UNSECURED = 1,
DOOR_SECURED_STATUS_UNKNOWN = 2
DOOR_SECURED_STATUS_UNKNOWN = 2,
DOOR_SECURED_STATUS_MAX = 3
} BACNET_DOOR_SECURED_STATUS;
/* Door Status */
@@ -2554,10 +2575,14 @@ typedef enum BACnetDoorStatus {
DOOR_STATUS_CLOSING = 6,
DOOR_STATUS_OPENING = 7,
DOOR_STATUS_SAFETY_LOCKED = 8,
DOOR_STATUS_LIMITED_OPENED = 9
DOOR_STATUS_LIMITED_OPENED = 9,
DOOR_STATUS_RESERVED_MIN = 10,
DOOR_STATUS_RESERVED_MAX = 1023,
/* Enumerated values 0-1023 are reserved for definition by ASHRAE.
Enumerated values 1024-65535 may be used by others subject to
the procedures and constraints described in Clause 23. */
DOOR_STATUS_PROPRIETARY_MIN = 1024,
DOOR_STATUS_PROPRIETARY_MAX = 65535
} BACNET_DOOR_STATUS;
/* Door Value */
@@ -2565,7 +2590,8 @@ typedef enum BACnetDoorValue {
DOOR_VALUE_LOCK = 0,
DOOR_VALUE_UNLOCK = 1,
DOOR_VALUE_PULSE_UNLOCK = 2,
DOOR_VALUE_EXTENDED_PULSE_UNLOCK = 3
DOOR_VALUE_EXTENDED_PULSE_UNLOCK = 3,
DOOR_VALUE_MAX = 4
} BACNET_DOOR_VALUE;
/* Lock Status */
@@ -2574,7 +2600,8 @@ typedef enum BACnetLockStatus {
LOCK_STATUS_UNLOCKED = 1,
LOCK_STATUS_LOCK_FAULT = 2,
LOCK_STATUS_UNUSED = 3,
LOCK_STATUS_UNKNOWN = 4
LOCK_STATUS_UNKNOWN = 4,
BACNET_LOCK_STATUS_MAX = 5
} BACNET_LOCK_STATUS;
/* Access Event */
@@ -2633,6 +2660,8 @@ typedef enum BACnetAccessEvent {
ACCESS_EVENT_DENIED_VERIFICATION_FAILED = 162,
ACCESS_EVENT_DENIED_VERIFICATION_TIMEOUT = 163,
ACCESS_EVENT_DENIED_OTHER = 164,
ACCESS_EVENT_RESERVED_MIN = 165,
ACCESS_EVENT_RESERVED_MAX = 511,
/* Enumerated values 0-511 are reserved for definition by ASHRAE.
Enumerated values 512-65535 may be used by others subject to
the procedures and constraints described in Clause 23. */
@@ -2649,7 +2678,8 @@ typedef enum BACnetAuthenticationStatus {
AUTHENTICATION_STATUS_WAITING_FOR_AUTHENTICATION_FACTOR = 3,
AUTHENTICATION_STATUS_WAITING_FOR_ACCOMPANIMENT = 4,
AUTHENTICATION_STATUS_WAITING_FOR_VERIFICATION = 5,
AUTHENTICATION_STATUS_IN_PROGRESS = 6
AUTHENTICATION_STATUS_IN_PROGRESS = 6,
AUTHENTICATION_STATUS_MAX = 7
} BACNET_AUTHENTICATION_STATUS;
/* Authorization Mode */
@@ -2659,10 +2689,14 @@ typedef enum BACnetAuthorizationMode {
AUTHORIZATION_MODE_DENY_ALL = 2,
AUTHORIZATION_MODE_VERIFICATION_REQUIRED = 3,
AUTHORIZATION_MODE_AUTHORIZATION_DELAYED = 4,
AUTHORIZATION_MODE_NONE = 5
AUTHORIZATION_MODE_NONE = 5,
AUTHORIZATION_MODE_RESERVED_MIN = 6,
AUTHORIZATION_MODE_RESERVED_MAX = 63,
/* 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. */
AUTHORIZATION_MODE_PROPRIETARY_MIN = 64,
AUTHORIZATION_MODE_PROPRIETARY_MAX = 65535
} BACNET_AUTHORIZATION_MODE;
/* Access Passback Mode */
@@ -2681,6 +2715,8 @@ typedef enum BACnetAccessZoneOccupancyState {
ACCESS_ZONE_OCCUPANCY_STATE_ABOVE_UPPER_LIMIT = 4,
ACCESS_ZONE_OCCUPANCY_STATE_DISABLED = 5,
ACCESS_ZONE_OCCUPANCY_STATE_NOT_SUPPORTED = 6,
ACCESS_ZONE_OCCUPANCY_STATE_RESERVED_MIN = 7,
ACCESS_ZONE_OCCUPANCY_STATE_RESERVED_MAX = 63,
/* 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. */
@@ -2692,11 +2728,14 @@ typedef enum BACnetAccessZoneOccupancyState {
typedef enum BACnetAccessUserType {
ACCESS_USER_TYPE_ASSET = 0,
ACCESS_USER_TYPE_GROUP = 1,
ACCESS_USER_TYPE_PERSON = 2
ACCESS_USER_TYPE_PERSON = 2,
ACCESS_USER_TYPE_RESERVED_MIN = 3,
ACCESS_USER_TYPE_RESERVED_MAX = 63,
/* 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. */
the procedures and constraints described in Clause 23. */
ACCESS_USER_TYPE_PROPRIETARY_MIN = 64,
ACCESS_USER_TYPE_PROPRIETARY_MAX = 65535
} BACNET_ACCESS_USER_TYPE;
/* Access Authentication Factor Disable */
@@ -2707,10 +2746,13 @@ typedef enum BACnetAccessAuthenticationFactorDisable {
ACCESS_AUTHENTICATION_FACTOR_DISABLE_DISABLED_STOLEN = 3,
ACCESS_AUTHENTICATION_FACTOR_DISABLE_DISABLED_DAMAGED = 4,
ACCESS_AUTHENTICATION_FACTOR_DISABLE_DISABLED_DESTROYED = 5,
ACCESS_AUTHENTICATION_FACTOR_DISABLE_MAX = 6
ACCESS_AUTHENTICATION_FACTOR_DISABLE_RESERVED_MIN = 6,
ACCESS_AUTHENTICATION_FACTOR_DISABLE_RESERVED_MAX = 63,
/* 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. */
ACCESS_AUTHENTICATION_FACTOR_DISABLE_PROPRIETARY_MIN = 64,
ACCESS_AUTHENTICATION_FACTOR_DISABLE_PROPRIETARY_MAX = 65535
} BACNET_ACCESS_AUTHENTICATION_FACTOR_DISABLE;
/* Authorization Exemption */
@@ -2721,10 +2763,14 @@ typedef enum BACnetAuthorizationExemption {
AUTHORIZATION_EXEMPTION_LOCKOUT = 3,
AUTHORIZATION_EXEMPTION_DENY = 4,
AUTHORIZATION_EXEMPTION_VERIFICATION = 5,
AUTHORIZATION_EXEMPTION_AUTHORIZATION_DELAY = 6
AUTHORIZATION_EXEMPTION_AUTHORIZATION_DELAY = 6,
AUTHORIZATION_EXEMPTION_RESERVED_MIN = 7,
AUTHORIZATION_EXEMPTION_RESERVED_MAX = 63,
/* Enumerated values 0-63 are reserved for definition by ASHRAE.
Enumerated values 64-255 may be used by others subject to
the procedures and constraints described in Clause 23. */
AUTHORIZATION_EXEMPTION_PROPRIETARY_MIN = 64,
AUTHORIZATION_EXEMPTION_PROPRIETARY_MAX = 255
} BACNET_AUTHORIZATION_EXEMPTION;
/* The Network Reject Reasons for NETWORK_MESSAGE_REJECT_MESSAGE_TO_NETWORK */
@@ -2744,7 +2790,8 @@ typedef enum BACnetWriteStatus {
BACNET_WRITE_STATUS_IDLE = 0,
BACNET_WRITE_STATUS_IN_PROGRESS = 1,
BACNET_WRITE_STATUS_SUCCESSFUL = 2,
BACNET_WRITE_STATUS_FAILED = 3
BACNET_WRITE_STATUS_FAILED = 3,
BACNET_WRITE_STATUS_MAX = 4
} BACNET_WRITE_STATUS;
typedef enum BACnetNetworkType {
@@ -2785,7 +2832,8 @@ typedef enum BACnetNetworkNumberQuality {
PORT_QUALITY_UNKNOWN = 0,
PORT_QUALITY_LEARNED = 1,
PORT_QUALITY_LEARNED_CONFIGURED = 2,
PORT_QUALITY_CONFIGURED = 3
PORT_QUALITY_CONFIGURED = 3,
PORT_QUALITY_MAX = 4
} BACNET_PORT_QUALITY;
typedef enum BACnetNetworkPortCommand {
@@ -2810,30 +2858,31 @@ typedef enum BACnetNetworkPortCommand {
PORT_COMMAND_MAX = 255
} BACNET_PORT_COMMAND;
typedef enum {
typedef enum BACnetSecurityLevel {
BACNET_SECURITY_LEVEL_INCAPABLE = 0,
BACNET_SECURITY_LEVEL_PLAIN = 1,
BACNET_SECURITY_LEVEL_SIGNED = 2,
BACNET_SECURITY_LEVEL_ENCRYPTED = 3,
BACNET_SECURITY_LEVEL_SIGNED_END_TO_END = 4,
BACNET_SECURITY_LEVEL_ENCRYPTED_END_TO_END = 5
BACNET_SECURITY_LEVEL_ENCRYPTED_END_TO_END = 5,
BACNET_SECURITY_LEVEL_MAX = 6
} BACNET_SECURITY_LEVEL;
typedef enum {
typedef enum BACnetSecurityPolicy {
BACNET_SECURITY_POLICY_PLAIN_NOT_TRUSTED = 0,
BACNET_SECURITY_POLICY_PLAIN_TRUSTED = 1,
BACNET_SECURITY_POLICY_SIGNED_TRUSTED = 2,
BACNET_SECURITY_POLICY_ENCRYPTED_TRUSTED = 3
} BACNET_SECURITY_POLICY;
typedef enum {
typedef enum BACnetKeyIdentifierAlgorithm {
KIA_AES_MD5 = 0,
KIA_AES_SHA256 = 1,
/* 2-255 reserved */
KIA_MAX_KEY_IDENTIFIER_ALGORITHM = 255
} BACNET_KEY_IDENTIFIER_ALGORITHM;
typedef enum {
typedef enum BACnetKeyIdentifierKeyNumber {
KIKN_NOT_USED = 0,
KIKN_DEVICE_MASTER = 1,
KIKN_DISTRIBUTION = 2,
@@ -2846,7 +2895,7 @@ typedef enum {
KIKN_MAX_KEY_IDENTIFIER_KEY_NUMBER = 255
} BACNET_KEY_IDENTIFIER_KEY_NUMBER;
typedef enum {
typedef enum BACnetSecurityResponseCode {
SEC_RESP_SUCCESS = 0,
SEC_RESP_ACCESS_DENIED = 1,
SEC_RESP_BAD_DESTINATION_ADDRESS = 2,
@@ -2877,13 +2926,16 @@ typedef enum {
typedef enum BACnetAccessCredentialDisable {
ACCESS_CREDENTIAL_DISABLE_NONE = 0,
ACCESS_CREDENTIAL_DISABLE = 1,
ACCESS_CREDENTIAL_DISABLE_DISABLE = 1,
ACCESS_CREDENTIAL_DISABLE_MANUAL = 2,
ACCESS_CREDENTIAL_DISABLE_LOCKOUT = 3,
ACCESS_CREDENTIAL_DISABLE_MAX = 4
ACCESS_CREDENTIAL_DISABLE_RESERVED_MIN = 4,
ACCESS_CREDENTIAL_DISABLE_RESERVED_MAX = 63,
/* 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. */
ACCESS_CREDENTIAL_DISABLE_PROPRIETARY_MIN = 64,
ACCESS_CREDENTIAL_DISABLE_PROPRIETARY_MAX = 65535
} BACNET_ACCESS_CREDENTIAL_DISABLE;
typedef enum BACnetAccessCredentialDisableReason {
@@ -2897,13 +2949,16 @@ typedef enum BACnetAccessCredentialDisableReason {
CREDENTIAL_DISABLED_MAX_USES = 7,
CREDENTIAL_DISABLED_INACTIVITY = 8,
CREDENTIAL_DISABLED_MANUAL = 9,
CREDENTIAL_DISABLED_MAX = 10
CREDENTIAL_DISABLED_RESERVED_MIN = 10,
CREDENTIAL_DISABLED_RESERVED_MAX = 63,
/* 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. */
CREDENTIAL_DISABLED_PROPRIETARY_MIN = 64,
CREDENTIAL_DISABLED_PROPRIETARY_MAX = 65535
} BACNET_ACCESS_CREDENTIAL_DISABLE_REASON;
typedef enum {
typedef enum BACnetAuthenticationDisableReason {
AUTHENTICATION_NONE = 0,
AUTHENTICATION_DISABLED = 1,
AUTHENTICATION_DISABLED_LOST = 2,
@@ -2949,13 +3004,15 @@ typedef enum BACnetProtocolLevel_T {
BACNET_PROTOCOL_LEVEL_PHYSICAL = 0,
BACNET_PROTOCOL_LEVEL_PROTOCOL = 1,
BACNET_PROTOCOL_LEVEL_BACNET_APPLICATION = 2,
BACNET_PROTOCOL_LEVEL_NON_BACNET_APPLICATION = 3
BACNET_PROTOCOL_LEVEL_NON_BACNET_APPLICATION = 3,
BACNET_PROTOCOL_LEVEL_MAX = 4
} BACNET_PROTOCOL_LEVEL;
typedef enum BACnetIPMode_T {
BACNET_IP_MODE_NORMAL = 0,
BACNET_IP_MODE_FOREIGN = 1,
BACNET_IP_MODE_BBMD = 2
BACNET_IP_MODE_BBMD = 2,
BACNET_IP_MODE_MAX = 3
} BACNET_IP_MODE;
typedef enum BACnetBackupState {
@@ -2965,7 +3022,8 @@ typedef enum BACnetBackupState {
BACKUP_STATE_PERFORMING_A_BACKUP = 3,
BACKUP_STATE_PERFORMING_A_RESTORE = 4,
BACKUP_STATE_BACKUP_FAILURE = 5,
BACKUP_STATE_RESTORE_FAILURE = 6
BACKUP_STATE_RESTORE_FAILURE = 6,
BACKUP_STATE_MAX = 7
} BACNET_BACKUP_STATE;
typedef enum BACnetTimerState {
@@ -2997,6 +3055,8 @@ typedef enum BACnetEscalatorFault {
ESCALATOR_FAULT_CONTROLLER_SUPPLY_FAULT = 6,
ESCALATOR_FAULT_DRIVE_TEMPERATURE_EXCEEDED = 7,
ESCALATOR_FAULT_COMB_PLATE_FAULT = 8,
ESCALATOR_FAULT_RESERVED_MIN = 9,
ESCALATOR_FAULT_RESERVED_MAX = 1023,
/* Enumerated values 0-1023 are reserved for definition by ASHRAE.
Enumerated values 1024-65535 may be used by others subject to
the procedures and constraints described in Clause 23. */
@@ -3011,6 +3071,8 @@ typedef enum BACnetEscalatorMode {
ESCALATOR_MODE_DOWN = 3,
ESCALATOR_MODE_INSPECTION = 4,
ESCALATOR_MODE_OUT_OF_SERVICE = 5,
ESCALATOR_MODE_RESERVED_MIN = 6,
ESCALATOR_MODE_RESERVED_MAX = 1023,
/* Enumerated values 0-1023 are reserved for definition by ASHRAE.
Enumerated values 1024-65535 may be used by others subject to
the procedures and constraints described in Clause 23. */
@@ -3025,6 +3087,8 @@ typedef enum BACnetEscalatorOperationDirection {
ESCALATOR_OPERATION_DIRECTION_UP_REDUCED_SPEED = 3,
ESCALATOR_OPERATION_DIRECTION_DOWN_RATED_SPEED = 4,
ESCALATOR_OPERATION_DIRECTION_DOWN_REDUCED_SPEED = 5,
ESCALATOR_OPERATION_DIRECTION_RESERVED_MIN = 6,
ESCALATOR_OPERATION_DIRECTION_RESERVED_MAX = 1023,
/* Enumerated values 0-1023 are reserved for definition by ASHRAE.
Enumerated values 1024-65535 may be used by others subject to
the procedures and constraints described in Clause 23. */
@@ -3039,6 +3103,8 @@ typedef enum BACnetLiftCarDirection {
LIFT_CAR_DIRECTION_UP = 3,
LIFT_CAR_DIRECTION_DOWN = 4,
LIFT_CAR_DIRECTION_UP_AND_DOWN = 5,
LIFT_CAR_DIRECTION_RESERVED_MIN = 6,
LIFT_CAR_DIRECTION_RESERVED_MAX = 1023,
/* Enumerated values 0-1023 are reserved for definition by ASHRAE.
Enumerated values 1024-65535 may be used by others subject to
the procedures and constraints described in Clause 23. */
@@ -3049,7 +3115,8 @@ typedef enum BACnetLiftCarDirection {
typedef enum BACnetLiftCarDoorCommand {
LIFT_CAR_DOOR_COMMAND_NONE = 0,
LIFT_CAR_DOOR_COMMAND_OPEN = 1,
LIFT_CAR_DOOR_COMMAND_CLOSE = 2
LIFT_CAR_DOOR_COMMAND_CLOSE = 2,
LIFT_CAR_DOOR_COMMAND_MAX = 3
} BACNET_LIFT_CAR_DOOR_COMMAND;
typedef enum BACnetLiftCarDriveStatus {
@@ -3063,6 +3130,8 @@ typedef enum BACnetLiftCarDriveStatus {
LIFT_CAR_DRIVE_STATUS_TWO_FLOOR_JUMP = 7,
LIFT_CAR_DRIVE_STATUS_THREE_FLOOR_JUMP = 8,
LIFT_CAR_DRIVE_STATUS_MULTI_FLOOR_JUMP = 9,
LIFT_CAR_DRIVE_STATUS_RESERVED_MIN = 10,
LIFT_CAR_DRIVE_STATUS_RESERVED_MAX = 1023,
/* Enumerated values 0-1023 are reserved for definition by ASHRAE.
Enumerated values 1024-65535 may be used by others subject to
the procedures and constraints described in Clause 23. */
@@ -3085,6 +3154,8 @@ typedef enum BACnetLiftCarMode {
LIFT_CAR_MODE_FIRE_OPERATION = 11,
LIFT_CAR_MODE_OUT_OF_SERVICE = 12,
LIFT_CAR_MODE_OCCUPANT_EVACUATION = 13,
LIFT_CAR_MODE_RESERVED_MIN = 14,
LIFT_CAR_MODE_RESERVED_MAX = 1023,
/* Enumerated values 0-1023 are reserved for definition by ASHRAE.
Enumerated values 1024-65535 may be used by others subject to
the procedures and constraints described in Clause 23. */
@@ -3110,6 +3181,8 @@ typedef enum BACnetLiftFault {
LIFT_FAULT_POSITION_LOST = 14,
LIFT_FAULT_DRIVE_TEMPERATURE_EXCEEDED = 15,
LIFT_FAULT_LOAD_MEASUREMENT_FAULT = 16,
LIFT_FAULT_RESERVED_MIN = 17,
LIFT_FAULT_RESERVED_MAX = 1023,
/* Enumerated values 0-1023 are reserved for definition by ASHRAE.
Enumerated values 1024-65535 may be used by others subject to
the procedures and constraints described in Clause 23. */
@@ -3124,7 +3197,8 @@ typedef enum BACnetLiftGroupMode {
LIFT_GROUP_MODE_TWO_WAY = 3,
LIFT_GROUP_MODE_FOUR_WAY = 4,
LIFT_GROUP_MODE_EMERGENCY_POWER = 5,
LIFT_GROUP_MODE_UP_PEAK = 6
LIFT_GROUP_MODE_UP_PEAK = 6,
LIFT_GROUP_MODE_MAX = 7
} BACNET_LIFT_GROUP_MODE;
typedef enum BACnetAuditLevel {
@@ -3132,6 +3206,8 @@ typedef enum BACnetAuditLevel {
AUDIT_LEVEL_AUDIT_ALL = 1,
AUDIT_LEVEL_AUDIT_CONFIG = 2,
AUDIT_LEVEL_DEFAULT = 3,
AUDIT_LEVEL_RESERVED_MIN = 4,
AUDIT_LEVEL_RESERVED_MAX = 127,
/* Enumerated values 0-127 are reserved for definition by ASHRAE.
Enumerated values 128-255 may be used by others subject to
the procedures and constraints described in Clause 23. */
@@ -3156,6 +3232,8 @@ typedef enum BACnetAuditOperation {
AUDIT_OPERATION_AUDITING_FAILURE = 13,
AUDIT_OPERATION_NETWORK_CHANGES = 14,
AUDIT_OPERATION_GENERAL = 15,
AUDIT_OPERATION_RESERVED_MIN = 16,
AUDIT_OPERATION_RESERVED_MAX = 31,
/* Enumerated values 0-31 are reserved for definition by ASHRAE.
Enumerated values 32-63 may be used by others subject to
the procedures and constraints described in Clause 23.
@@ -3186,7 +3264,8 @@ typedef enum BACnetSCConnectionState {
typedef enum BACnetAuthenticationDecision {
BACNET_AUTHENTICATION_DECISION_ALLOW_MATCH = 0,
BACNET_AUTHENTICATION_DECISION_DENY_MISMATCH = 1,
BACNET_AUTHENTICATION_DECISION_DENY_NON_RELAY = 2
BACNET_AUTHENTICATION_DECISION_DENY_NON_RELAY = 2,
BACNET_AUTHENTICATION_DECISION_MAX = 3
} BACNET_AUTHENTICATION_DECISION;
typedef enum BACnetAuthorizationPosture {
@@ -3194,7 +3273,8 @@ typedef enum BACnetAuthorizationPosture {
BACNET_AUTHORIZATION_POSTURE_PROPRIETARY = 1,
BACNET_AUTHORIZATION_POSTURE_CONFIGURED = 2,
BACNET_AUTHORIZATION_POSTURE_MISCONFIGURED_PARTIAL = 3,
BACNET_AUTHORIZATION_POSTURE_MISCONFIGURED_TOTAL = 4
BACNET_AUTHORIZATION_POSTURE_MISCONFIGURED_TOTAL = 4,
BACNET_AUTHORIZATION_POSTURE_MAX = 5
} BACNET_AUTHORIZATION_POSTURE;
typedef enum BACnetFaultType {
@@ -3205,7 +3285,8 @@ typedef enum BACnetFaultType {
BACNET_FAULT_TYPE_STATE = 4,
BACNET_FAULT_TYPE_STATUS_FLAGS = 5,
BACNET_FAULT_TYPE_OUT_OF_RANGE = 6,
BACNET_FAULT_TYPE_LISTED = 7
BACNET_FAULT_TYPE_LISTED = 7,
BACNET_FAULT_TYPE_MAX = 8
} BACNET_FAULT_TYPE;
typedef enum BACnetPriorityFilter {
@@ -3225,19 +3306,21 @@ typedef enum BACnetPriorityFilter {
BACNET_PRIORITY_FILTER_PRIORITY_14 = 13,
BACNET_PRIORITY_FILTER_PRIORITY_15 = 14,
BACNET_PRIORITY_FILTER_PRIORITY_16 = 15,
BACNET_PRIORITY_FILTER_PRIORITY_MAX = 16
BACNET_PRIORITY_FILTER_MAX = 16
} BACNET_PRIORITY_FILTER;
typedef enum BACnetResultFlags {
RESULT_FLAG_FIRST_ITEM = 0,
RESULT_FLAG_LAST_ITEM = 1,
RESULT_FLAG_MORE_ITEMS = 2
RESULT_FLAG_MORE_ITEMS = 2,
BACNET_RESULT_FLAGS_MAX = 3
} BACNET_RESULT_FLAGS;
typedef enum BACnetSuccessFilter {
BACNET_SUCCESS_FILTER_ALL = 0,
BACNET_SUCCESS_FILTER_SUCCESS_ONLY = 1,
BACNET_SUCCESS_FILTER_FAILURES_ONLY = 2
BACNET_SUCCESS_FILTER_FAILURES_ONLY = 2,
BACNET_SUCCESS_FILTER_MAX = 3
} BACNET_SUCCESS_FILTER;
#endif /* end of BACENUM_H */
+1388 -303
View File
File diff suppressed because it is too large Load Diff
+224 -17
View File
@@ -30,40 +30,60 @@ BACNET_STACK_EXPORT
const char *bactext_confirmed_service_name_default(
uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_confirmed_service_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_unconfirmed_service_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_unconfirmed_service_name_default(
uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_unconfirmed_service_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_application_tag_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_application_tag_name_default(
uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_application_tag_index(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_object_type_name(uint32_t index);
BACNET_STACK_EXPORT
const char *
bactext_object_type_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_object_type_index(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
bool bactext_object_type_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_object_type_name_capitalized(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_object_type_name_capitalized_default(
uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_object_type_index(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
bool bactext_object_type_strtol(const char *search_name, uint32_t *found_index);
bool bactext_object_type_name_capitalized_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
bool bactext_property_name_proprietary(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_property_name(uint32_t index);
BACNET_STACK_EXPORT
uint32_t bactext_property_id(const char *name);
BACNET_STACK_EXPORT
const char *
bactext_property_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_property_index(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
bool bactext_property_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
bool bactext_engineering_unit_name_proprietary(uint32_t index);
BACNET_STACK_EXPORT
@@ -74,90 +94,150 @@ const char *bactext_engineering_unit_name_default(
BACNET_STACK_EXPORT
bool bactext_engineering_unit_index(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_reject_reason_name(uint32_t index);
BACNET_STACK_EXPORT
const char *
bactext_reject_reason_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_reject_reason_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_abort_reason_name(uint32_t index);
BACNET_STACK_EXPORT
const char *
bactext_abort_reason_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_abort_reason_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_error_class_name(uint32_t index);
BACNET_STACK_EXPORT
const char *
bactext_error_class_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_error_class_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_error_code_name(uint32_t index);
BACNET_STACK_EXPORT
const char *
bactext_error_code_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
uint32_t bactext_property_id(const char *name);
bool bactext_error_code_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_month_name(uint32_t index);
BACNET_STACK_EXPORT
const char *
bactext_month_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_month_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_week_of_month_name(uint32_t index);
BACNET_STACK_EXPORT
const char *
bactext_week_of_month_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_week_of_month_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_day_of_week_name(uint32_t index);
BACNET_STACK_EXPORT
const char *
bactext_day_of_week_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_day_of_week_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_days_of_week_name(uint32_t index);
BACNET_STACK_EXPORT
const char *
bactext_days_of_week_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_days_of_week_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_notify_type_name(uint32_t index);
BACNET_STACK_EXPORT
const char *
bactext_notify_type_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_notify_type_index(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
bool bactext_notify_type_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_event_state_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_event_state_index(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
bool bactext_event_state_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_event_type_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_event_type_index(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
bool bactext_event_type_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_binary_present_value_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_binary_polarity_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_binary_present_value_index(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_binary_polarity_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_reliability_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_device_status_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_segmentation_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_segmentation_index(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_node_type_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_character_string_encoding_name(uint32_t index);
const char *bactext_node_relationship_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_event_transition_name(uint32_t index);
bool bactext_node_relationship_name_proprietary(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_event_transition_index(
bool bactext_node_relationship_name_reserved(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_node_relationship_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_days_of_week_name(uint32_t index);
const char *bactext_character_string_encoding_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_days_of_week_index(const char *search_name, uint32_t *found_index);
bool bactext_character_string_encoding_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_event_transition_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_event_transition_name_default(
uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_event_transition_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_network_layer_msg_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_network_layer_msg_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_life_safety_mode_name(uint32_t index);
@@ -170,42 +250,49 @@ const char *bactext_silenced_state_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_device_communications_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_device_communications_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_lighting_operation_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_lighting_operation_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_binary_lighting_pv_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_binary_lighting_pv_names_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_lighting_in_progress(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_lighting_transition(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_color_operation_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_color_operation_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_shed_state_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_shed_level_type_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_shed_level_type_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_log_datum_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_log_datum_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_restart_reason_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_network_port_type_name(uint32_t index);
BACNET_STACK_EXPORT
@@ -217,18 +304,44 @@ const char *bactext_network_port_command_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_authentication_decision_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_authentication_decision_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_authorization_posture_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_authorization_posture_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_fault_type_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bacnet_priority_filter_name(uint32_t index);
bool bactext_fault_type_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_success_filter_name(uint32_t index);
const char *bactext_priority_filter_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_priority_filter_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_result_flags_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_result_flags_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_success_filter_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_success_filter_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_logging_type_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_logging_type_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_program_request_name(uint32_t index);
@@ -244,14 +357,108 @@ const char *bactext_timer_state_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_boolean_value_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_action_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_file_access_method_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_lock_status_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_door_alarm_state_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_door_status_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_door_secured_status_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_access_event_name(uint32_t index);
BACNET_STACK_EXPORT
const char *
bactext_access_event_name_default(uint32_t index, const char *default_string);
BACNET_STACK_EXPORT
const char *bactext_authentication_status_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_authorization_mode_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_authorization_mode_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_access_credential_disable_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_access_credential_disable_reason_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_access_user_type_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_access_user_type_strtol(
const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_access_zone_occupancy_state_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_write_status_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_ip_mode_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_ip_mode_strtol(const char *search_name, uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_door_value_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_maintenance_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_escalator_fault_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_escalator_mode_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_escalator_operation_direction_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_backup_state_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_security_level_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_lift_car_direction_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_lift_car_door_command_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_lift_car_drive_status_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_lift_car_mode_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_lift_fault_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_lift_group_mode_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_audit_level_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_audit_operation_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_sc_hub_connector_state_name(uint32_t index);
BACNET_STACK_EXPORT
const char *bactext_sc_connection_state_name(uint32_t index);
BACNET_STACK_EXPORT
bool bactext_property_states_strtoul(
BACNET_PROPERTY_STATES object_property,
const char *search_name,
uint32_t *found_index);
BACNET_STACK_EXPORT
const char *bactext_property_states_name(
BACNET_PROPERTY_STATES property_state,
uint32_t index,
const char *default_string);
BACNET_STACK_EXPORT
const char *bactext_object_property_name(
BACNET_OBJECT_TYPE object_type,
BACNET_PROPERTY_ID object_property,
uint32_t index,
const char *default_string);
BACNET_STACK_EXPORT
bool bactext_object_property_strtoul(
BACNET_OBJECT_TYPE object_type,
BACNET_PROPERTY_ID object_property,
+3 -3
View File
@@ -531,7 +531,7 @@ bool Binary_Input_Present_Value_Set(
pObject = Binary_Input_Object(object_instance);
if (pObject) {
if (value <= MAX_BINARY_PV) {
if (value < BINARY_PV_MAX) {
/* de-polarize */
if (Binary_Polarity(pObject->Polarity) != POLARITY_NORMAL) {
if (value == BINARY_INACTIVE) {
@@ -571,7 +571,7 @@ static bool Binary_Input_Present_Value_Write(
pObject = Binary_Input_Object(object_instance);
if (pObject) {
if (value <= MAX_BINARY_PV) {
if (value < BINARY_PV_MAX) {
if (pObject->Write_Enabled) {
old_value = Binary_Present_Value(pObject->Present_Value);
Binary_Input_Present_Value_COV_Detect(pObject, value);
@@ -1193,7 +1193,7 @@ bool Binary_Input_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
status = write_property_type_valid(
wp_data, &value, BACNET_APPLICATION_TAG_ENUMERATED);
if (status) {
if (value.type.Enumerated <= MAX_BINARY_PV) {
if (value.type.Enumerated < BINARY_PV_MAX) {
Binary_Input_Alarm_Value_Set(
wp_data->object_instance,
(BACNET_BINARY_PV)value.type.Enumerated);
+2 -2
View File
@@ -325,7 +325,7 @@ bool Binary_Output_Present_Value_Set(
(priority != 6 /* reserved */)) {
priority--;
old_value = Object_Present_Value(pObject);
if (binary_value <= MAX_BINARY_PV) {
if (binary_value < BINARY_PV_MAX) {
BIT_SET(pObject->Priority_Active_Bits, priority);
if (binary_value == BINARY_ACTIVE) {
BIT_SET(pObject->Priority_Array, priority);
@@ -448,7 +448,7 @@ static bool Binary_Output_Present_Value_Write(
pObject = Keylist_Data(Object_List, object_instance);
if (pObject) {
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY) &&
(value <= MAX_BINARY_PV)) {
(value < BINARY_PV_MAX)) {
if (priority != 6) {
old_value = Object_Present_Value(pObject);
Binary_Output_Present_Value_Set(
+3 -3
View File
@@ -490,7 +490,7 @@ bool Binary_Value_Present_Value_Set(
pObject = Binary_Value_Object(object_instance);
if (pObject) {
if (value <= MAX_BINARY_PV) {
if (value < BINARY_PV_MAX) {
Binary_Value_Present_Value_COV_Detect(pObject, value);
pObject->Present_Value = Binary_Present_Value_Boolean(value);
status = true;
@@ -522,7 +522,7 @@ static bool Binary_Value_Present_Value_Write(
pObject = Binary_Value_Object(object_instance);
if (pObject) {
if (value <= MAX_BINARY_PV) {
if (value < BINARY_PV_MAX) {
if (pObject->Write_Enabled) {
old_value = Binary_Present_Value(pObject->Present_Value);
Binary_Value_Present_Value_COV_Detect(pObject, value);
@@ -1096,7 +1096,7 @@ bool Binary_Value_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
status = write_property_type_valid(
wp_data, &value, BACNET_APPLICATION_TAG_ENUMERATED);
if (status) {
if (value.type.Enumerated <= MAX_BINARY_PV) {
if (value.type.Enumerated < BINARY_PV_MAX) {
Binary_Value_Alarm_Value_Set(
wp_data->object_instance,
(BACNET_BINARY_PV)value.type.Enumerated);
@@ -66,7 +66,7 @@ int bacapp_decode_credential_authentication_factor(
len = decode_context_enumerated(&apdu[apdu_len], 0, &disable);
if (len < 0) {
return -1;
} else if (disable < ACCESS_AUTHENTICATION_FACTOR_DISABLE_MAX) {
} else if (disable < UINT16_MAX) {
apdu_len += len;
factor->disable =
(BACNET_ACCESS_AUTHENTICATION_FACTOR_DISABLE)disable;
+1
View File
@@ -96,6 +96,7 @@ list(APPEND testdirs
bacnet/bacpropstates
bacnet/bacreal
bacnet/bacstr
bacnet/bactext
bacnet/bactimevalue
bacnet/channel_value
bacnet/cov
+50
View File
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
get_filename_component(basename ${CMAKE_CURRENT_SOURCE_DIR} NAME)
project(test_${basename}
VERSION 1.0.0
LANGUAGES C)
string(REGEX REPLACE
"/test/bacnet/[a-zA-Z_/-]*$"
"/src"
SRC_DIR
${CMAKE_CURRENT_SOURCE_DIR})
string(REGEX REPLACE
"/test/bacnet/[a-zA-Z_/-]*$"
"/test"
TST_DIR
${CMAKE_CURRENT_SOURCE_DIR})
set(ZTST_DIR "${TST_DIR}/ztest/src")
add_compile_definitions(
BIG_ENDIAN=0
CONFIG_ZTEST=1
BACNET_PROPERTY_LISTS=1
)
include_directories(
${SRC_DIR}
${TST_DIR}/ztest/include
)
add_executable(${PROJECT_NAME}
# File(s) under test
${SRC_DIR}/bacnet/bactext.c
# Support files and stubs (pathname alphabetical)
${SRC_DIR}/bacnet/bacdcode.c
${SRC_DIR}/bacnet/bacint.c
${SRC_DIR}/bacnet/bacreal.c
${SRC_DIR}/bacnet/bacstr.c
${SRC_DIR}/bacnet/indtext.c
${SRC_DIR}/bacnet/basic/sys/bigend.c
${SRC_DIR}/bacnet/property.c
${SRC_DIR}/bacnet/proplist.c
# Test and test library files
./src/main.c
${ZTST_DIR}/ztest_mock.c
${ZTST_DIR}/ztest.c
)
File diff suppressed because it is too large Load Diff