DevNode.h
Go to the documentation of this file.
1 
20 #pragma once
21 
22 #include <Data/BitSet.h>
23 #include <vector>
24 
25 namespace IO
26 {
30 struct DevNode {
31  using List = std::vector<DevNode>;
32  using ID = uint16_t;
33  ID id{};
34 
35  // For a normal on/off output node
36  enum class State {
37  off,
38  on,
39  someon,
40  unknown,
41  MAX,
42  };
43 
45 
46  bool operator==(const DevNode& other) const
47  {
48  return id == other.id;
49  }
50 };
51 
52 // Special value to indicate all nodes
53 static constexpr DevNode DevNode_ALL{0xFFFF};
54 
56 
57 } // namespace IO
static constexpr DevNode DevNode_ALL
Definition: DevNode.h:53
std::vector< DevNode > List
Definition: DevNode.h:31
Identifies a device node.
Definition: DevNode.h:30
Definition: IOControl/include/IO/Controller.h:25
Manage a set of bit values using enumeration.
Definition: BitSet.h:44
BitSet< uint8_t, State, size_t(State::MAX)> States
Definition: DevNode.h:44
bool operator==(const DevNode &other) const
Definition: DevNode.h:46
State
Definition: DevNode.h:36
ID id
Definition: DevNode.h:33
DevNode::State getState(DevNode::States states)