1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Tests always build with std, so feature-off test runs need no imports of
// their own.
// `format!` and `vec!` without std's prelude. Without `alloc` the crate
// links no allocator at all (#1614).
extern crate alloc;
// Its shared views are `Arc`s, which need atomic compare-and-swap (#1615).
// Matches the constructed calendar types, which need alloc.
/// BACnet MAC address — stack-allocated for typical sizes (≤6 bytes).
///
/// The data links this stack serves use 1-octet (MS/TP), 3-octet (the
/// B/IPv6 VMAC) and 6-octet (B/IP, Ethernet, the B/SC VMAC) MACs, so SmallVec
/// keeps every one of them inline. Only with `alloc`.
pub type MacAddr = SmallVec;
/// The BACnet protocol version this stack implements: the Device object's
/// Protocol_Version (Clause 12.11.12).
///
/// The Device object and the PICS generator both take it from here, so they
/// can't disagree (#2125).
pub const PROTOCOL_VERSION: u16 = 1;
/// The BACnet protocol revision this stack implements: the Device object's
/// Protocol_Revision (Clause 12.11.13).
///
/// The stack implements ASHRAE 135-2020, which the standard's History of
/// Revisions lists as version 1, revision 22. Later addenda raise the
/// revision; they are not implemented as a whole, so the stack doesn't claim
/// them.
pub const PROTOCOL_REVISION: u16 = 22;