blob: 331b09df041b869a3df779ed7ac2a93a8565c017 [file] [log] [blame]
Nicolas Palpacuer3cad49d2018-07-02 14:03:24 -04001#ifndef OPENOLT_STATE_H_
2#define OPENOLT_STATE_H_
3
Shad Ansariedef2132018-08-10 22:14:50 +00004class State {
5 public:
Nicolas Palpacuer3cad49d2018-07-02 14:03:24 -04006
Shad Ansariedef2132018-08-10 22:14:50 +00007 bool is_connected() {
8 return connected_to_voltha;
9 }
10
11 bool is_activated() {
12 return activated;
13 }
14
15 void connect() {
16 connected_to_voltha = true;
17 }
18
19 void disconnect() {
20 connected_to_voltha = false;
21 }
22
23 void activate() {
24 activated = true;
25 }
26
27 void deactivate() {
28 activated = false;
29 }
30
31 private:
32 bool connected_to_voltha = false;
33 bool activated = false;
34};
Nicolas Palpacuer3cad49d2018-07-02 14:03:24 -040035#endif