bacnet_types/enums/lighting.rs
1// ===========================================================================
2// Lighting enums (Clause 12.54, 12.55)
3// ===========================================================================
4
5bacnet_enum! {
6 /// BACnet binary lighting present value (Clause 21).
7 pub struct BinaryLightingPV(u32);
8
9 const OFF = 0;
10 const ON = 1;
11 const WARN = 2;
12 const WARN_OFF = 3;
13 const WARN_RELINQUISH = 4;
14 const STOP = 5;
15}
16
17bacnet_enum! {
18 /// BACnet lighting operation (Clause 12.54).
19 pub struct LightingOperation(u32);
20
21 const NONE = 0;
22 const FADE_TO = 1;
23 const RAMP_TO = 2;
24 const STEP_UP = 3;
25 const STEP_DOWN = 4;
26 const STEP_ON = 5;
27 const STEP_OFF = 6;
28 const WARN = 7;
29 const WARN_OFF = 8;
30 const WARN_RELINQUISH = 9;
31 const STOP = 10;
32}
33
34bacnet_enum! {
35 /// BACnet lighting in-progress state (Clause 12.54).
36 pub struct LightingInProgress(u32);
37
38 const IDLE = 0;
39 const FADE_ACTIVE = 1;
40 const RAMP_ACTIVE = 2;
41 const NOT_CONTROLLED = 3;
42 const OTHER = 4;
43}
44
45bacnet_enum! {
46 /// BACnet lighting transition kind (Clause 21).
47 pub struct LightingTransition(u32);
48
49 const NONE = 0;
50 const FADE = 1;
51 const RAMP = 2;
52}
53
54// ===========================================================================
55// Color enums (Addendum 135-2020ca)
56// ===========================================================================
57
58bacnet_enum! {
59 /// BACnet colour operation: the `operation` of a `BACnetColorCommand`
60 /// (Addendum 135-2020ca, Clause 21).
61 ///
62 /// A Color object takes FADE_TO_COLOR and STOP; a Color Temperature
63 /// object takes the four CCT operations and STOP. The addendum doesn't
64 /// open the enumeration to vendors, so neither object takes any other
65 /// value.
66 pub struct ColorOperation(u32);
67
68 const NONE = 0;
69 const FADE_TO_COLOR = 1;
70 const FADE_TO_CCT = 2;
71 const RAMP_TO_CCT = 3;
72 const STEP_UP_CCT = 4;
73 const STEP_DOWN_CCT = 5;
74 const STOP = 6;
75}