Skip to main content

bacnet_types/enums/
access.rs

1// ===========================================================================
2// Door / access control enums (Clause 12.26, 12.33)
3// ===========================================================================
4
5bacnet_enum! {
6    /// BACnet door alarm state (Clause 12.26).
7    pub struct DoorAlarmState(u32);
8
9    const NORMAL = 0;
10    const ALARM = 1;
11    const DOOR_OPEN_TOO_LONG = 2;
12    const FORCED_OPEN = 3;
13    const TAMPER = 4;
14    const DOOR_FAULT = 5;
15    const LOCK_DOWN = 6;
16    const FREE_ACCESS = 7;
17    const EGRESS_OPEN = 8;
18}
19
20bacnet_enum! {
21    /// BACnet door status (Clause 12.26).
22    pub struct DoorStatus(u32);
23
24    const CLOSED = 0;
25    const OPENED = 1;
26    const UNKNOWN = 2;
27    const DOOR_FAULT = 3;
28    const UNUSED = 4;
29    const NONE = 5;
30    const CLOSING = 6;
31    const OPENING = 7;
32    const SAFETY_LOCKED = 8;
33    const LIMITED_OPENED = 9;
34}
35
36bacnet_enum! {
37    /// BACnet lock status (Clause 12.26).
38    pub struct LockStatus(u32);
39
40    const LOCKED = 0;
41    const UNLOCKED = 1;
42    const LOCK_FAULT = 2;
43    const UNUSED = 3;
44    const UNKNOWN = 4;
45}
46
47bacnet_enum! {
48    /// BACnet secured status for Access Door (Clause 12.26).
49    pub struct DoorSecuredStatus(u32);
50
51    const SECURED = 0;
52    const UNSECURED = 1;
53    const UNKNOWN = 2;
54}
55
56bacnet_enum! {
57    /// BACnet door command for Access Door present values (Clause 21).
58    pub struct DoorValue(u32);
59
60    const LOCK = 0;
61    const UNLOCK = 1;
62    const PULSE_UNLOCK = 2;
63    const EXTENDED_PULSE_UNLOCK = 3;
64}
65
66bacnet_enum! {
67    /// BACnet access event (Clause 12.33).
68    pub struct AccessEvent(u32);
69
70    const NONE = 0;
71    const GRANTED = 1;
72    const MUSTER = 2;
73    const PASSBACK_DETECTED = 3;
74    const DURESS = 4;
75    const TRACE = 5;
76    const LOCKOUT_MAX_ATTEMPTS = 6;
77    const LOCKOUT_OTHER = 7;
78    const LOCKOUT_RELINQUISHED = 8;
79    const LOCKED_BY_HIGHER_PRIORITY = 9;
80    const OUT_OF_SERVICE = 10;
81    const OUT_OF_SERVICE_RELINQUISHED = 11;
82    const ACCOMPANIMENT_BY = 12;
83    const AUTHENTICATION_FACTOR_READ = 13;
84    const AUTHORIZATION_DELAYED = 14;
85    const VERIFICATION_REQUIRED = 15;
86    const NO_ENTRY_AFTER_GRANTED = 16;
87    // Denied events (128+)
88    const DENIED_DENY_ALL = 128;
89    const DENIED_UNKNOWN_CREDENTIAL = 129;
90    const DENIED_AUTHENTICATION_UNAVAILABLE = 130;
91    const DENIED_AUTHENTICATION_FACTOR_TIMEOUT = 131;
92    const DENIED_INCORRECT_AUTHENTICATION_FACTOR = 132;
93    const DENIED_ZONE_NO_ACCESS_RIGHTS = 133;
94    const DENIED_POINT_NO_ACCESS_RIGHTS = 134;
95    const DENIED_NO_ACCESS_RIGHTS = 135;
96    const DENIED_OUT_OF_TIME_RANGE = 136;
97    const DENIED_THREAT_LEVEL = 137;
98    const DENIED_PASSBACK = 138;
99    const DENIED_UNEXPECTED_LOCATION_USAGE = 139;
100    const DENIED_MAX_ATTEMPTS = 140;
101    const DENIED_LOWER_OCCUPANCY_LIMIT = 141;
102    const DENIED_UPPER_OCCUPANCY_LIMIT = 142;
103    const DENIED_AUTHENTICATION_FACTOR_LOST = 143;
104    const DENIED_AUTHENTICATION_FACTOR_STOLEN = 144;
105    const DENIED_AUTHENTICATION_FACTOR_DAMAGED = 145;
106    const DENIED_AUTHENTICATION_FACTOR_DESTROYED = 146;
107    const DENIED_AUTHENTICATION_FACTOR_DISABLED = 147;
108    const DENIED_AUTHENTICATION_FACTOR_ERROR = 148;
109    const DENIED_CREDENTIAL_UNASSIGNED = 149;
110    const DENIED_CREDENTIAL_NOT_PROVISIONED = 150;
111    const DENIED_CREDENTIAL_NOT_YET_ACTIVE = 151;
112    const DENIED_CREDENTIAL_EXPIRED = 152;
113    const DENIED_CREDENTIAL_MANUAL_DISABLE = 153;
114    const DENIED_CREDENTIAL_LOCKOUT = 154;
115    const DENIED_CREDENTIAL_MAX_DAYS = 155;
116    const DENIED_CREDENTIAL_MAX_USES = 156;
117    const DENIED_CREDENTIAL_INACTIVITY = 157;
118    const DENIED_CREDENTIAL_DISABLED = 158;
119    const DENIED_NO_ACCOMPANIMENT = 159;
120    const DENIED_INCORRECT_ACCOMPANIMENT = 160;
121    const DENIED_LOCKOUT = 161;
122    const DENIED_VERIFICATION_FAILED = 162;
123    const DENIED_VERIFICATION_TIMEOUT = 163;
124    const DENIED_OTHER = 164;
125}
126
127bacnet_enum! {
128    /// BACnet access credential disable (Clause 21).
129    pub struct AccessCredentialDisable(u32);
130
131    const NONE = 0;
132    const DISABLE = 1;
133    const DISABLE_MANUAL = 2;
134    const DISABLE_LOCKOUT = 3;
135}
136
137bacnet_enum! {
138    /// BACnet access credential disable reason (Clause 21).
139    pub struct AccessCredentialDisableReason(u32);
140
141    const DISABLED = 0;
142    const DISABLED_NEEDS_PROVISIONING = 1;
143    const DISABLED_UNASSIGNED = 2;
144    const DISABLED_NOT_YET_ACTIVE = 3;
145    const DISABLED_EXPIRED = 4;
146    const DISABLED_LOCKOUT = 5;
147    const DISABLED_MAX_DAYS = 6;
148    const DISABLED_MAX_USES = 7;
149    const DISABLED_INACTIVITY = 8;
150    const DISABLED_MANUAL = 9;
151}
152
153bacnet_enum! {
154    /// Whether one authentication factor of an Access Credential may be used,
155    /// and if not why: the disable member of each Authentication_Factors
156    /// element (Table 12-40; Clause 21 production). ASHRAE owns 0 to 63 and
157    /// 64 to 65535 are open to vendors.
158    pub struct AccessAuthenticationFactorDisable(u32);
159
160    const NONE = 0;
161    const DISABLED = 1;
162    const DISABLED_LOST = 2;
163    const DISABLED_STOLEN = 3;
164    const DISABLED_DAMAGED = 4;
165    const DISABLED_DESTROYED = 5;
166}
167
168bacnet_enum! {
169    /// The format of an authentication factor's value (Clause 21 production;
170    /// Annex P describes each format). The production is closed: it has no
171    /// vendor range.
172    pub struct AuthenticationFactorType(u32);
173
174    const UNDEFINED = 0;
175    const ERROR = 1;
176    const CUSTOM = 2;
177    const SIMPLE_NUMBER16 = 3;
178    const SIMPLE_NUMBER32 = 4;
179    const SIMPLE_NUMBER56 = 5;
180    const SIMPLE_ALPHA_NUMERIC = 6;
181    const ABA_TRACK2 = 7;
182    const WIEGAND26 = 8;
183    const WIEGAND37 = 9;
184    const WIEGAND37_FACILITY = 10;
185    const FACILITY16_CARD32 = 11;
186    const FACILITY32_CARD32 = 12;
187    const FASC_N = 13;
188    const FASC_N_BCD = 14;
189    const FASC_N_LARGE = 15;
190    const FASC_N_LARGE_BCD = 16;
191    const GSA75 = 17;
192    const CHUID = 18;
193    const CHUID_FULL = 19;
194    const GUID = 20;
195    const CBEFF_A = 21;
196    const CBEFF_B = 22;
197    const CBEFF_C = 23;
198    const USER_PASSWORD = 24;
199}
200
201bacnet_enum! {
202    /// BACnet authentication status: the Access Point object's
203    /// Authentication_Status property (Table 12-36; Clause 21 production).
204    pub struct AuthenticationStatus(u32);
205
206    const NOT_READY = 0;
207    const READY = 1;
208    const DISABLED = 2;
209    const WAITING_FOR_AUTHENTICATION_FACTOR = 3;
210    const WAITING_FOR_ACCOMPANIMENT = 4;
211    const WAITING_FOR_VERIFICATION = 5;
212    const IN_PROGRESS = 6;
213}
214
215bacnet_enum! {
216    /// BACnet access user type (Clause 12.33; Clause 21.6 production).
217    pub struct AccessUserType(u32);
218
219    const ASSET = 0;
220    const GROUP = 1;
221    const PERSON = 2;
222}
223
224bacnet_enum! {
225    /// BACnet authorization mode (Clause 12.31).
226    pub struct AuthorizationMode(u32);
227
228    const AUTHORIZE = 0;
229    const GRANT_ACTIVE = 1;
230    const DENY_ALL = 2;
231    const VERIFICATION_REQUIRED = 3;
232    const AUTHORIZATION_DELAYED = 4;
233    const NONE = 5;
234}
235
236bacnet_enum! {
237    /// BACnet authorization check a credential is exempt from (Clause 21).
238    pub struct AuthorizationExemption(u32);
239
240    const PASSBACK = 0;
241    const OCCUPANCY_CHECK = 1;
242    const ACCESS_RIGHTS = 2;
243    const LOCKOUT = 3;
244    const DENY = 4;
245    const VERIFICATION = 5;
246    const AUTHORIZATION_DELAY = 6;
247}
248
249bacnet_enum! {
250    /// Whether an access rule's time range is checked: the time-range
251    /// specifier of a `BACnetAccessRule` (Clause 21; Clause 12.34.9.1). Only
252    /// these two values exist.
253    pub struct AccessRuleTimeRangeSpecifier(u32);
254
255    /// The rule names a property that decides when it applies.
256    const SPECIFIED = 0;
257    /// The rule applies at any time.
258    const ALWAYS = 1;
259}
260
261bacnet_enum! {
262    /// Whether an access rule is tied to one place: the location specifier of
263    /// a `BACnetAccessRule` (Clause 21; Clause 12.34.9.1). Only these two
264    /// values exist.
265    pub struct AccessRuleLocationSpecifier(u32);
266
267    /// The rule names an Access Point or Access Zone.
268    const SPECIFIED = 0;
269    /// The rule holds at every access point.
270    const ALL = 1;
271}
272
273bacnet_enum! {
274    /// BACnet access passback mode (Clause 12.32).
275    pub struct AccessPassbackMode(u32);
276
277    const PASSBACK_OFF = 0;
278    const HARD_PASSBACK = 1;
279    const SOFT_PASSBACK = 2;
280}
281
282bacnet_enum! {
283    /// BACnet access zone occupancy state (Clause 21).
284    pub struct AccessZoneOccupancyState(u32);
285
286    const NORMAL = 0;
287    const BELOW_LOWER_LIMIT = 1;
288    const AT_LOWER_LIMIT = 2;
289    const AT_UPPER_LIMIT = 3;
290    const ABOVE_UPPER_LIMIT = 4;
291    const DISABLED = 5;
292    const NOT_SUPPORTED = 6;
293}