Nikola Jelić implemented the Access Objects for BACnet (Access Door, Access Point, Access Credential, Access Rights, Access User, Access Zone, and Credential Data Input).

This commit is contained in:
skarg
2016-07-17 19:23:19 +00:00
parent a97bc78ade
commit 1302c1be7b
36 changed files with 5850 additions and 4 deletions
+76
View File
@@ -0,0 +1,76 @@
/**************************************************************************
*
* Copyright (C) 2015 Nikola Jelic <nikola.jelic@euroicc.com>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*********************************************************************/
#ifndef ACCESS_RULE_H
#define ACCESS_RULE_H
#include <stdbool.h>
#include <stdint.h>
#include "bacdef.h"
#include "bacapp.h"
#include "bacdevobjpropref.h"
typedef enum {
TIME_RANGE_SPECIFIER_SPECIFIED = 0,
TIME_RANGE_SPECIFIER_ALWAYS = 1
} BACNET_ACCESS_RULE_TIME_RANGE_SPECIFIER;
typedef enum {
LOCATION_SPECIFIER_SPECIFIED = 0,
LOCATION_SPECIFIER_ALL = 1
} BACNET_ACCESS_RULE_LOCATION_SPECIFIER;
typedef struct {
BACNET_ACCESS_RULE_TIME_RANGE_SPECIFIER time_range_specifier;
BACNET_DEVICE_OBJECT_PROPERTY_REFERENCE time_range;
BACNET_ACCESS_RULE_LOCATION_SPECIFIER location_specifier;
BACNET_DEVICE_OBJECT_PROPERTY_REFERENCE location;
bool enable;
} BACNET_ACCESS_RULE;
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
int bacapp_encode_access_rule(
uint8_t * apdu,
BACNET_ACCESS_RULE * rule);
int bacapp_encode_context_access_rule(
uint8_t * apdu,
uint8_t tag_number,
BACNET_ACCESS_RULE * rule);
int bacapp_decode_access_rule(
uint8_t * apdu,
BACNET_ACCESS_RULE * rule);
int bacapp_decode_context_access_rule(
uint8_t * apdu,
uint8_t tag_number,
BACNET_ACCESS_RULE * rule);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
@@ -0,0 +1,62 @@
/**************************************************************************
*
* Copyright (C) 2015 Nikola Jelic <nikola.jelic@euroicc.com>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*********************************************************************/
#ifndef BACNET_ASSIGNED_ACCESS_RIGHTS_H
#define BACNET_ASSIGNED_ACCESS_RIGHTS_H
#include <stdbool.h>
#include <stdint.h>
#include "bacdef.h"
#include "bacapp.h"
#include "bacdevobjpropref.h"
typedef struct {
BACNET_DEVICE_OBJECT_REFERENCE assigned_access_rights;
bool enable;
} BACNET_ASSIGNED_ACCESS_RIGHTS;
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
int bacapp_encode_assigned_access_rights(
uint8_t * apdu,
BACNET_ASSIGNED_ACCESS_RIGHTS * aar);
int bacapp_encode_context_assigned_access_rights(
uint8_t * apdu,
uint8_t tag,
BACNET_ASSIGNED_ACCESS_RIGHTS * aar);
int bacapp_decode_assigned_access_rights(
uint8_t * apdu,
BACNET_ASSIGNED_ACCESS_RIGHTS * aar);
int bacapp_decode_context_assigned_access_rights(
uint8_t * apdu,
uint8_t tag,
BACNET_ASSIGNED_ACCESS_RIGHTS * aar);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
@@ -0,0 +1,64 @@
/**************************************************************************
*
* Copyright (C) 2015 Nikola Jelic <nikola.jelic@euroicc.com>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*********************************************************************/
#ifndef BACNET_AUTHENTICATION_FACTOR_H
#define BACNET_AUTHENTICATION_FACTOR_H
#include <stdbool.h>
#include <stdint.h>
#include "bacdef.h"
#include "bacapp.h"
typedef struct {
BACNET_AUTHENTICATION_FACTOR_TYPE format_type;
uint32_t format_class;
BACNET_OCTET_STRING value;
} BACNET_AUTHENTICATION_FACTOR;
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
int bacapp_encode_authentication_factor(
uint8_t * apdu,
BACNET_AUTHENTICATION_FACTOR * af);
int bacapp_encode_context_authentication_factor(
uint8_t * apdu,
uint8_t tag,
BACNET_AUTHENTICATION_FACTOR * af);
int bacapp_decode_authentication_factor(
uint8_t * apdu,
BACNET_AUTHENTICATION_FACTOR * af);
int bacapp_decode_context_authentication_factor(
uint8_t * apdu,
uint8_t tag,
BACNET_AUTHENTICATION_FACTOR * af);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
@@ -0,0 +1,60 @@
/**************************************************************************
*
* Copyright (C) 2015 Nikola Jelic <nikola.jelic@euroicc.com>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*********************************************************************/
#ifndef BACNET_AUTHENTICATION_FACTOR_FORMAT_H
#define BACNET_AUTHENTICATION_FACTOR_FORMAT_H
#include <stdbool.h>
#include <stdint.h>
#include "bacdef.h"
typedef struct {
BACNET_AUTHENTICATION_FACTOR_TYPE format_type;
uint32_t vendor_id, vendor_format;
} BACNET_AUTHENTICATION_FACTOR_FORMAT;
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
int bacapp_encode_authentication_factor_format(
uint8_t * apdu,
BACNET_AUTHENTICATION_FACTOR_FORMAT * aff);
int bacapp_encode_context_authentication_factor_format(
uint8_t * apdu,
uint8_t tag_number,
BACNET_AUTHENTICATION_FACTOR_FORMAT * aff);
int bacapp_decode_authentication_factor_format(
uint8_t * apdu,
BACNET_AUTHENTICATION_FACTOR_FORMAT * aff);
int bacapp_decode_context_authentication_factor_format(
uint8_t * apdu,
uint8_t tag_number,
BACNET_AUTHENTICATION_FACTOR_FORMAT * aff);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
+235 -2
View File
@@ -290,7 +290,7 @@ typedef enum {
PROP_DAYS_REMAINING = 267,
PROP_ENTRY_POINTS = 268,
PROP_EXIT_POINTS = 269,
PROP_EXPIRY_TIME = 270,
PROP_EXPIRATION_TIME = 270,
PROP_EXTENDED_TIME_ENABLE = 271,
PROP_FAILED_ATTEMPT_EVENTS = 272,
PROP_FAILED_ATTEMPTS = 273,
@@ -876,13 +876,23 @@ typedef enum {
EVENT_EXTENDED = 9,
EVENT_BUFFER_READY = 10,
EVENT_UNSIGNED_RANGE = 11,
EVENT_ACCESS_EVENT = 13,
EVENT_DOUBLE_OUT_OF_RANGE = 14,
EVENT_SIGNED_OUT_OF_RANGE = 15,
EVENT_UNSIGNED_OUT_OF_RANGE = 16,
EVENT_CHANGE_OF_CHARACTERSTRING = 17,
EVENT_CHANGE_OF_STATUS_FLAGS = 18,
EVENT_CHANGE_OF_RELIABILITY = 19,
EVENT_NONE = 20,
EVENT_CHANGE_OF_DISCRETE_VALUE = 21,
EVENT_CHANGE_OF_TIMER = 22,
/* 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 11. */
/* The last enumeration used in this version is 22. */
/* do the max range inside of enum so that
compilers will allocate adequate sized datatype for enum
which is used to store decoding */
@@ -1783,6 +1793,229 @@ typedef enum BACnetEventTransitionMask {
TRANSITION_TO_NORMAL_MASKED = 4
} BACNET_EVENT_TRANSITION_MASK;
/* Access Enumerations */
/* Door Alarm State */
typedef enum {
DOOR_ALARM_STATE_NORMAL = 0,
DOOR_ALARM_STATE_ALARM = 1,
DOOR_ALARM_STATE_DOOR_OPEN_TOO_LONG = 2,
DOOR_ALARM_STATE_FORCED_OPEN = 3,
DOOR_ALARM_STATE_TAMPER = 4,
DOOR_ALARM_STATE_DOOR_FAULT = 5,
DOOR_ALARM_STATE_LOCK_DOWN = 6,
DOOR_ALARM_STATE_FREE_ACCESS = 7,
DOOR_ALARM_STATE_EGRESS_OPEN = 8
} BACNET_DOOR_ALARM_STATE;
/* Door Secured Status */
typedef enum {
DOOR_SECURED_STATUS_SECURED = 0,
DOOR_SECURED_STATUS_UNSECURED = 1,
DOOR_SECURED_STATUS_UNKNOWN = 2
} BACNET_DOOR_SECURED_STATUS;
/* Door Status */
typedef enum {
DOOR_STATUS_CLOSED = 0,
DOOR_STATUS_OPENED = 1,
DOOR_STATUS_UNKNOWN = 2,
DOOR_STATUS_DOOR_FAULT = 4,
DOOR_STATUS_UNUSED = 5
} BACNET_DOOR_STATUS;
/* Door Value */
typedef enum {
DOOR_VALUE_LOCK = 0,
DOOR_VALUE_UNLOCK = 1,
DOOR_VALUE_PULSE_UNLOCK = 2,
DOOR_VALUE_EXTENDED_PULSE_UNLOCK = 3
} BACNET_DOOR_VALUE;
/* Lock Status */
typedef enum {
LOCK_STATUS_LOCKED = 0,
LOCK_STATUS_UNLOCKED = 1,
LOCK_STATUS_LOCK_FAULT = 2,
LOCK_STATUS_UNUSED = 3,
LOCK_STATUS_UNKNOWN = 4
} BACNET_LOCK_STATUS;
/* Access Event */
typedef enum {
ACCESS_EVENT_NONE = 0,
ACCESS_EVENT_GRANTED = 1,
ACCESS_EVENT_MUSTER = 2,
ACCESS_EVENT_PASSBACK_DETECTED = 3,
ACCESS_EVENT_DURESS = 4,
ACCESS_EVENT_TRACE = 5,
ACCESS_EVENT_LOCKOUT_MAX_ATTEMPTS = 6,
ACCESS_EVENT_LOCKOUT_OTHER = 7,
ACCESS_EVENT_LOCKOUT_RELINQUISHED = 8,
ACCESS_EVENT_LOCKED_BY_HIGHER_AUTHORITY = 9,
ACCESS_EVENT_OUT_OF_SERVICE = 10,
ACCESS_EVENT_OUT_OF_SERVICE_RELINQUISHED = 11,
ACCESS_EVENT_ACCOMPANIMENT_BY = 12,
ACCESS_EVENT_AUTHENTICATION_FACTOR_READ = 13,
ACCESS_EVENT_AUTHORIZATION_DELAYED = 14,
ACCESS_EVENT_VERIFICATION_REQUIRED = 15,
/* values over 128 indicate that access is denied */
ACCESS_EVENT_DENIED_DENY_ALL = 128,
ACCESS_EVENT_DENIED_UNKNOWN_CREDENTIAL = 129,
ACCESS_EVENT_DENIED_AUTHENTICATION_UNAVAILABLE = 130,
ACCESS_EVENT_DENIED_AUTHENTICATION_FACTOR_TIMEOUT = 131,
ACCESS_EVENT_DENIED_INCORRECT_AUTHENTICATION_FACTOR = 132,
ACCESS_EVENT_DENIED_ZONE_NO_ACCESS_RIGHTS = 133,
ACCESS_EVENT_DENIED_POINT_NO_ACCESS_RIGHTS = 134,
ACCESS_EVENT_DENIED_NO_ACCESS_RIGHTS = 135,
ACCESS_EVENT_DENIED_OUT_OF_TIME_RANGE = 136,
ACCESS_EVENT_DENIED_THREAT_LEVEL = 137,
ACCESS_EVENT_DENIED_PASSBACK = 138,
ACCESS_EVENT_DENIED_UNEXPECTED_LOCATION_USAGE = 139,
ACCESS_EVENT_DENIED_MAX_ATTEMPTS = 140,
ACCESS_EVENT_DENIED_LOWER_OCCUPANCY_LIMIT = 141,
ACCESS_EVENT_DENIED_UPPER_OCCUPANCY_LIMIT = 142,
ACCESS_EVENT_DENIED_AUTHENTICATION_FACTOR_LOST = 143,
ACCESS_EVENT_DENIED_AUTHENTICATION_FACTOR_STOLEN = 144,
ACCESS_EVENT_DENIED_AUTHENTICATION_FACTOR_DAMAGED = 145,
ACCESS_EVENT_DENIED_AUTHENTICATION_FACTOR_DESTROYED = 146,
ACCESS_EVENT_DENIED_AUTHENTICATION_FACTOR_DISABLED = 147,
ACCESS_EVENT_DENIED_AUTHENTICATION_FACTOR_ERROR = 148,
ACCESS_EVENT_DENIED_CREDENTIAL_UNASSIGNED = 149,
ACCESS_EVENT_DENIED_CREDENTIAL_NOT_PROVISIONED = 150,
ACCESS_EVENT_DENIED_CREDENTIAL_NOT_YET_ACTIVE = 151,
ACCESS_EVENT_DENIED_CREDENTIAL_EXPIRED = 152,
ACCESS_EVENT_DENIED_CREDENTIAL_MANUAL_DISABLE = 153,
ACCESS_EVENT_DENIED_CREDENTIAL_LOCKOUT = 154,
ACCESS_EVENT_DENIED_CREDENTIAL_MAX_DAYS = 155,
ACCESS_EVENT_DENIED_CREDENTIAL_MAX_USES = 156,
ACCESS_EVENT_DENIED_CREDENTIAL_INACTIVITY = 157,
ACCESS_EVENT_DENIED_CREDENTIAL_DISABLED = 158,
ACCESS_EVENT_DENIED_NO_ACCOMPANIMENT = 159,
ACCESS_EVENT_DENIED_INCORRECT_ACCOMPANIMENT = 160,
ACCESS_EVENT_DENIED_LOCKOUT = 161,
ACCESS_EVENT_DENIED_VERIFICATION_FAILED = 162,
ACCESS_EVENT_DENIED_VERIFICATION_TIMEOUT = 163,
ACCESS_EVENT_DENIED_OTHER = 164
} BACNET_ACCESS_EVENT;
/* Authentication Status */
typedef enum {
AUTHENTICATION_STATUS_NOT_READY = 0,
AUTHENTICATION_STATUS_READY = 1,
AUTHENTICATION_STATUS_DISABLED = 2,
AUTHENTICATION_STATUS_WAITING_FOR_AUTHENTICATION_FACTOR = 3,
AUTHENTICATION_STATUS_WAITING_FOR_ACCOMPANIMENT = 4,
AUTHENTICATION_STATUS_WAITING_FOR_VERIFICATION = 5,
AUTHENTICATION_STATUS_IN_PROGRESS = 6
} BACNET_AUTHENTICATION_STATUS;
/* Authorization Mode */
typedef enum {
AUTHORIZATION_MODE_AUTHORIZE = 0,
AUTHORIZATION_MODE_GRANT_ACTIVE = 1,
AUTHORIZATION_MODE_DENY_ALL = 2,
AUTHORIZATION_MODE_VERIFICATION_REQUIRED = 3,
AUTHORIZATION_MODE_AUTHORIZATION_DELAYED = 4,
AUTHORIZATION_MODE_NONE = 5
} BACNET_AUTHORIZATION_MODE;
/* Access Passback Mode */
typedef enum {
ACCESS_PASSBACK_MODE_PASSBACK_OFF = 0,
ACCESS_PASSBACK_MODE_HARD_PASSBACK = 1,
ACCESS_PASSBACK_MODE_SOFT_PASSBACK = 2
} BACNET_ACCESS_PASSBACK_MODE;
/* Access Zone Occupancy State */
typedef enum {
ACCESS_ZONE_OCCUPANCY_STATE_NORMAL = 0,
ACCESS_ZONE_OCCUPANCY_STATE_BELOW_LOWER_LIMIT = 1,
ACCESS_ZONE_OCCUPANCY_STATE_AT_LOWER_LIMIT = 2,
ACCESS_ZONE_OCCUPANCY_STATE_AT_UPPER_LIMIT = 3,
ACCESS_ZONE_OCCUPANCY_STATE_ABOVE_UPPER_LIMIT = 4,
ACCESS_ZONE_OCCUPANCY_STATE_DISABLED = 5,
ACCESS_ZONE_OCCUPANCY_STATE_NOT_SUPPORTED = 6
} BACNET_ACCESS_ZONE_OCCUPANCY_STATE;
/* Access User Type */
typedef enum {
ACCESS_USER_TYPE_ASSET = 0,
ACCESS_USER_TYPE_GROUP = 1,
ACCESS_USER_TYPE_PERSON = 2
} BACNET_ACCESS_USER_TYPE;
/* Access Authentication Factor Disable */
typedef enum {
ACCESS_AUTHENTICATION_FACTOR_DISABLE_NONE = 0,
ACCESS_AUTHENTICATION_FACTOR_DISABLE_DISABLED = 1,
ACCESS_AUTHENTICATION_FACTOR_DISABLE_DISABLED_LOST = 2,
ACCESS_AUTHENTICATION_FACTOR_DISABLE_DISABLED_STOLEN = 3,
ACCESS_AUTHENTICATION_FACTOR_DISABLE_DISABLED_DAMAGED = 4,
ACCESS_AUTHENTICATION_FACTOR_DISABLE_DISABLED_DESTROYED = 5
} 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 */
typedef enum {
AUTHORIZATION_EXEMPTION_PASSBACK = 0,
AUTHORIZATION_EXEMPTION_OCCUPANCY_CHECK = 1,
AUTHORIZATION_EXEMPTION_ACCESS_RIGHTS = 2,
AUTHORIZATION_EXEMPTION_LOCKOUT = 3,
AUTHORIZATION_EXEMPTION_DENY = 4,
AUTHORIZATION_EXEMPTION_VERIFICATION = 5,
AUTHORIZATION_EXEMPTION_AUTHORIZATION_DELAY = 6
} BACNET_AUTHORIZATION_EXEMPTION;
/* The Network Reject Reasons for NETWORK_MESSAGE_REJECT_MESSAGE_TO_NETWORK */
typedef enum {
NETWORK_REJECT_UNKNOWN_ERROR = 0,
@@ -0,0 +1,63 @@
/**************************************************************************
*
* Copyright (C) 2015 Nikola Jelic <nikola.jelic@euroicc.com>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*********************************************************************/
#ifndef BACNET_CREDENTIAL_AUTHENTICATION_FACTOR_H
#define BACNET_CREDENTIAL_AUTHENTICATION_FACTOR_H
#include <stdbool.h>
#include <stdint.h>
#include "bacdef.h"
#include "bacapp.h"
#include "authentication_factor.h"
typedef struct {
BACNET_ACCESS_AUTHENTICATION_FACTOR_DISABLE disable;
BACNET_AUTHENTICATION_FACTOR authentication_factor;
} BACNET_CREDENTIAL_AUTHENTICATION_FACTOR;
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
int bacapp_encode_credential_authentication_factor(
uint8_t * apdu,
BACNET_CREDENTIAL_AUTHENTICATION_FACTOR * caf);
int bacapp_encode_context_credential_authentication_factor(
uint8_t * apdu,
uint8_t tag,
BACNET_CREDENTIAL_AUTHENTICATION_FACTOR * caf);
int bacapp_decode_credential_authentication_factor(
uint8_t * apdu,
BACNET_CREDENTIAL_AUTHENTICATION_FACTOR * caf);
int bacapp_decode_context_credential_authentication_factor(
uint8_t * apdu,
uint8_t tag,
BACNET_CREDENTIAL_AUTHENTICATION_FACTOR * caf);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif