Fixed compile errors
This commit is contained in:
@@ -90,7 +90,7 @@ void Credential_Data_Input_Init(
|
|||||||
for (i = 0; i < MAX_CREDENTIAL_DATA_INPUTS; i++) {
|
for (i = 0; i < MAX_CREDENTIAL_DATA_INPUTS; i++) {
|
||||||
/* there should be a meaningful setup for present value */
|
/* there should be a meaningful setup for present value */
|
||||||
cdi_descr[i].present_value.format_type =
|
cdi_descr[i].present_value.format_type =
|
||||||
AUTHENTICATION_FACTOR_TYPE_UNDEFINED;
|
AUTHENTICATION_FACTOR_UNDEFINED;
|
||||||
cdi_descr[i].present_value.format_class = 0;
|
cdi_descr[i].present_value.format_class = 0;
|
||||||
octetstring_init(&cdi_descr[i].present_value.value, NULL, 0);
|
octetstring_init(&cdi_descr[i].present_value.value, NULL, 0);
|
||||||
cdi_descr[i].reliability = RELIABILITY_NO_FAULT_DETECTED;
|
cdi_descr[i].reliability = RELIABILITY_NO_FAULT_DETECTED;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#include "bacdef.h"
|
#include "bacdef.h"
|
||||||
#include "bacenum.h"
|
#include "bacenum.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct BACnetDeviceObjectPropertyReference {
|
||||||
BACNET_OBJECT_ID objectIdentifier;
|
BACNET_OBJECT_ID objectIdentifier;
|
||||||
BACNET_PROPERTY_ID propertyIdentifier;
|
BACNET_PROPERTY_ID propertyIdentifier;
|
||||||
uint32_t arrayIndex;
|
uint32_t arrayIndex;
|
||||||
@@ -41,7 +41,7 @@ typedef struct {
|
|||||||
* If the optional deviceIdentifier is not provided, then this refers
|
* If the optional deviceIdentifier is not provided, then this refers
|
||||||
* to an object inside this Device.
|
* to an object inside this Device.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct BACnetDeviceObjectReference {
|
||||||
BACNET_OBJECT_ID deviceIndentifier; /**< Optional, for external device. */
|
BACNET_OBJECT_ID deviceIndentifier; /**< Optional, for external device. */
|
||||||
BACNET_OBJECT_ID objectIdentifier;
|
BACNET_OBJECT_ID objectIdentifier;
|
||||||
} BACNET_DEVICE_OBJECT_REFERENCE;
|
} BACNET_DEVICE_OBJECT_REFERENCE;
|
||||||
|
|||||||
@@ -1954,57 +1954,6 @@ typedef enum {
|
|||||||
ACCESS_AUTHENTICATION_FACTOR_DISABLE_DISABLED_DESTROYED = 5
|
ACCESS_AUTHENTICATION_FACTOR_DISABLE_DISABLED_DESTROYED = 5
|
||||||
} BACNET_ACCESS_AUTHENTICATION_FACTOR_DISABLE;
|
} BACNET_ACCESS_AUTHENTICATION_FACTOR_DISABLE;
|
||||||
|
|
||||||
/* Access Credential Disable */
|
|
||||||
typedef enum {
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_NONE = 0,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_DISABLE = 1,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_DISABLE_MANUAL = 2,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_DISABLE_LOCKOUT = 3
|
|
||||||
} BACNET_ACCESS_CREDENTIAL_DISABLE;
|
|
||||||
|
|
||||||
/* Access Credential Disable Reason */
|
|
||||||
typedef enum {
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_REASON_DISABLED = 0,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_REASON_DISABLED_NEEDS_PROVISIONING = 1,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_REASON_DISABLED_UNASSIGNED = 2,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_REASON_DISABLED_NOT_YET_ACTIVE = 3,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_REASON_DISABLED_EXPIRED = 4,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_REASON_DISABLED_LOCKOUT = 5,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_REASON_DISABLED_MAX_DAYS = 6,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_REASON_DISABLED_MAX_USES = 7,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_REASON_DISABLED_INACTIVITY = 8,
|
|
||||||
ACCESS_CREDENTIAL_DISABLE_REASON_DISABLED_MANUAL = 9
|
|
||||||
} BACNET_ACCESS_CREDENTIAL_DISABLE_REASON;
|
|
||||||
|
|
||||||
/* Authentication Factor Type */
|
|
||||||
typedef enum {
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_UNDEFINED = 0,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_ERROR = 1,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_CUSTOM = 2,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_SIMPLE_NUMBER16 = 3,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_SIMPLE_NUMBER32 = 4,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_SIMPLE_NUMBER56 = 5,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_SIMPLE_ALPHA_NUMERIC = 6,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_ABA_TRACK2 = 7,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_WIEGAND26 = 8,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_WIEGAND37 = 9,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_WIEGAND37_FACILITY = 10,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_FACILITY16_CARD32 = 11,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_FACILITY32_CARD32 = 12,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_FASC_N = 13,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_FASC_N_BCD = 14,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_FASC_N_LARGE = 15,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_FASC_N_LARGE_BCD = 16,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_GSA75 = 17,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_CHUID = 18,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_CHUID_FULL = 19,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_GUID = 20,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_CBEFF_A = 21,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_CBEFF_B = 22,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_CBEFF_C = 23,
|
|
||||||
AUTHENTICATION_FACTOR_TYPE_USER_PASSWORD = 24
|
|
||||||
} BACNET_AUTHENTICATION_FACTOR_TYPE;
|
|
||||||
|
|
||||||
/* Authorization Exemption */
|
/* Authorization Exemption */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AUTHORIZATION_EXEMPTION_PASSBACK = 0,
|
AUTHORIZATION_EXEMPTION_PASSBACK = 0,
|
||||||
@@ -2140,4 +2089,74 @@ typedef enum {
|
|||||||
SEC_RESP_UNKNOWN_SOURCE_MESSAGE = 25
|
SEC_RESP_UNKNOWN_SOURCE_MESSAGE = 25
|
||||||
} BACNET_SECURITY_RESPONSE_CODE;
|
} BACNET_SECURITY_RESPONSE_CODE;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
ACCESS_CREDENTIAL_DISABLE_NONE = 0,
|
||||||
|
ACCESS_CREDENTIAL_DISABLE = 1,
|
||||||
|
ACCESS_CREDENTIAL_DISABLE_MANUAL = 2,
|
||||||
|
ACCESS_CREDENTIAL_DISABLE_LOCKOUT = 3,
|
||||||
|
ACCESS_CREDENTIAL_DISABLE_MAX = 4
|
||||||
|
/* 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. */
|
||||||
|
} BACNET_ACCESS_CREDENTIAL_DISABLE;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
CREDENTIAL_DISABLED = 0,
|
||||||
|
CREDENTIAL_DISABLED_NEEDS_PROVISIONING = 1,
|
||||||
|
CREDENTIAL_DISABLED_UNASSIGNED = 2,
|
||||||
|
CREDENTIAL_DISABLED_NOT_YET_ACTIVE = 3,
|
||||||
|
CREDENTIAL_DISABLED_EXPIRED = 4,
|
||||||
|
CREDENTIAL_DISABLED_LOCKOUT = 5,
|
||||||
|
CREDENTIAL_DISABLED_MAX_DAYS = 6,
|
||||||
|
CREDENTIAL_DISABLED_MAX_USES = 7,
|
||||||
|
CREDENTIAL_DISABLED_INACTIVITY = 8,
|
||||||
|
CREDENTIAL_DISABLED_MANUAL = 9,
|
||||||
|
CREDENTIAL_DISABLED_MAX = 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. */
|
||||||
|
} BACNET_ACCESS_CREDENTIAL_DISABLE_REASON;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
AUTHENTICATION_NONE = 0,
|
||||||
|
AUTHENTICATION_DISABLED = 1,
|
||||||
|
AUTHENTICATION_DISABLED_LOST = 2,
|
||||||
|
AUTHENTICATION_DISABLED_STOLEN = 3,
|
||||||
|
AUTHENTICATION_DISABLED_DAMAGED = 4,
|
||||||
|
AUTHENTICATION_DISABLED_DESTROYED = 5,
|
||||||
|
AUTHENTICATION_DISABLED_MAX = 6
|
||||||
|
/* 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. */
|
||||||
|
} BACNET_AUTHENTICATION_DISABLE_REASON;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
AUTHENTICATION_FACTOR_UNDEFINED = 0,
|
||||||
|
AUTHENTICATION_FACTOR_ERROR = 1,
|
||||||
|
AUTHENTICATION_FACTOR_CUSTOM = 2,
|
||||||
|
AUTHENTICATION_FACTOR_SIMPLE_NUMBER16 = 3,
|
||||||
|
AUTHENTICATION_FACTOR_SIMPLE_NUMBER32 = 4,
|
||||||
|
AUTHENTICATION_FACTOR_SIMPLE_NUMBER56 = 5,
|
||||||
|
AUTHENTICATION_FACTOR_SIMPLE_ALPHA_NUMERIC = 6,
|
||||||
|
AUTHENTICATION_FACTOR_ABA_TRACK2 = 7,
|
||||||
|
AUTHENTICATION_FACTOR_WIEGAND26 = 8,
|
||||||
|
AUTHENTICATION_FACTOR_WIEGAND37 = 9,
|
||||||
|
AUTHENTICATION_FACTOR_WIEGAND37_FACILITY = 10,
|
||||||
|
AUTHENTICATION_FACTOR_FACILITY16_CARD32 = 11,
|
||||||
|
AUTHENTICATION_FACTOR_FACILITY32_CARD32 = 12,
|
||||||
|
AUTHENTICATION_FACTOR_FASC_N = 13,
|
||||||
|
AUTHENTICATION_FACTOR_FASC_N_BCD = 14,
|
||||||
|
AUTHENTICATION_FACTOR_FASC_N_LARGE = 15,
|
||||||
|
AUTHENTICATION_FACTOR_FASC_N_LARGE_BCD = 16,
|
||||||
|
AUTHENTICATION_FACTOR_GSA75 = 17,
|
||||||
|
AUTHENTICATION_FACTOR_CHUID = 18,
|
||||||
|
AUTHENTICATION_FACTOR_CHUID_FULL = 19,
|
||||||
|
AUTHENTICATION_FACTOR_GUID = 20,
|
||||||
|
AUTHENTICATION_FACTOR_CBEFF_A = 21,
|
||||||
|
AUTHENTICATION_FACTOR_CBEFF_B = 22,
|
||||||
|
AUTHENTICATION_FACTOR_CBEFF_C = 23,
|
||||||
|
AUTHENTICATION_FACTOR_USER_PASSWORD = 24,
|
||||||
|
AUTHENTICATION_FACTOR_MAX = 25
|
||||||
|
} BACNET_AUTHENTICATION_FACTOR_TYPE;
|
||||||
|
|
||||||
#endif /* end of BACENUM_H */
|
#endif /* end of BACENUM_H */
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ int bacapp_encode_authentication_factor_format(
|
|||||||
else
|
else
|
||||||
apdu_len += len;
|
apdu_len += len;
|
||||||
|
|
||||||
if (aff->format_type == AUTHENTICATION_FACTOR_TYPE_CUSTOM) {
|
if (aff->format_type == AUTHENTICATION_FACTOR_CUSTOM) {
|
||||||
len = encode_context_unsigned(&apdu[apdu_len], 1, aff->vendor_id);
|
len = encode_context_unsigned(&apdu[apdu_len], 1, aff->vendor_id);
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@@ -101,7 +101,7 @@ int bacapp_decode_authentication_factor_format(
|
|||||||
return -1;
|
return -1;
|
||||||
else
|
else
|
||||||
apdu_len += len;
|
apdu_len += len;
|
||||||
if ((aff->format_type != AUTHENTICATION_FACTOR_TYPE_CUSTOM)
|
if ((aff->format_type != AUTHENTICATION_FACTOR_CUSTOM)
|
||||||
&& (aff->vendor_id != 0))
|
&& (aff->vendor_id != 0))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ int bacapp_decode_authentication_factor_format(
|
|||||||
return -1;
|
return -1;
|
||||||
else
|
else
|
||||||
apdu_len += len;
|
apdu_len += len;
|
||||||
if ((aff->format_type != AUTHENTICATION_FACTOR_TYPE_CUSTOM)
|
if ((aff->format_type != AUTHENTICATION_FACTOR_CUSTOM)
|
||||||
&& (aff->vendor_format != 0))
|
&& (aff->vendor_format != 0))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user