-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCLI.h
More file actions
42 lines (33 loc) · 757 Bytes
/
CLI.h
File metadata and controls
42 lines (33 loc) · 757 Bytes
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
//CLI.h
#include "string"
#include "list"
#include "Valve.h"
#include "Networking/client.h"
#include "Networking/server.h"
#ifndef CLI_H
#define CLI_H
using namespace std;
class CLI
{
public:
CLI();
void loop();
list<string> parse(string input);
void route(list<string> message);
void parse_payload(string s);
//built in commands
void status(list<string> message);
//valve.h wrappers
void open_valve(list<string> message);
void close_valve(list<string> message);
void actuate();
void deactaute();
void is_actuated();
void is_open();
list<string> split(string str, char delim);
private:
list<Valve *> m_valves;
Client mclient;
Server mserver;
};
#endif