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
54
55
56
57
58
use proc_macro_error;
use Model;
use codegen;
/// # Warning
/// - When applied to an enum (which does not contain values)
/// that enum must be Copy.
/// - Any derives should be applied **after** the `abstract_bits` macro.
///
/// # Example:
///
/// ```
/// #[derive(Debug, Eq, PartialEq, TryFromPrimitive, Clone, Copy)]
/// #[abstract_bits(bits=2)]
/// #[repr(u8)]
/// pub enum NwkRouteRequestManyToOne {
/// NotManyToOne = 0,
/// ManyToOneSenderSupportsRouteRecordTable = 1,
/// ManyToOneSenderDoesntSupportRouteRecordTable = 2,
/// Reserved = 3,
/// }
///
/// #[abstract_bits]
/// #[derive(Debug, Clone, PartialEq)]
/// pub struct NwkRouteRequestCommand {
/// reserved: u3,
/// pub many_to_one: NwkRouteRequestManyToOne,
/// #[abstract_bits(presence_of = destination_eui64)]
/// reserved: bool,
/// reserved: u2,
/// pub route_request_identifier: u8,
/// pub destination_address: Nwk,
/// pub path_cost: u8,
/// pub destination_eui64: Option<Eui64>,
/// pub tlvs: Vec<u8>,
/// }
/// ```