-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScrewDriver.h
57 lines (40 loc) · 823 Bytes
/
ScrewDriver.h
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
#ifndef ScrewDriver_h
#define ScrewDriver_h
#include <Arduino.h>
#include "VAR.h"
class ScrewDriver {
// Variables
public:
struct VARIABLE_PAIR {
String varName;
VAR var;
};
private:
enum COMMAND_NAMES {
NONE,
SET,
UPDATE,
LIST,
PRINT
};
struct COMMAND {
COMMAND_NAMES name;
String variable;
String value;
};
VARIABLE_PAIR* variableMap;
unsigned int variableMapSize = 0;
// Methods
private:
COMMAND_NAMES ParseCommand(String s);
COMMAND Tokenize(String s);
int VariableLookup(String variableName);
void ListVariables();
void PrintVariable(String variableName);
public:
ScrewDriver();
void AddVariableMap(VARIABLE_PAIR variableMap[], unsigned int variableMapSize);
void Run(String s);
~ScrewDriver();
};
#endif