forked from matthew-t-watson/Picopter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommandLineInterface.h
66 lines (58 loc) · 1.1 KB
/
CommandLineInterface.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
58
59
60
61
62
63
64
65
/*
* File: CommandLineInterface.h
* Author: matt
*
* Created on 01 November 2012, 16:14
*/
#ifndef COMMANDLINEINTERFACE_H
#define COMMANDLINEINTERFACE_H
#include <cstdlib>
#include <iostream>
#include <map>
#include <pthread.h>
#include <string>
#include <stdio.h>
#include <sys/types.h>
#include <sstream>
#include "Logger.h"
#include "Timer.h"
#include "ConfigFile.h"
#include "Control.h"
enum lineString
{
en_stringNotDefined,
en_openlog,
en_writelog,
en_starttimer,
en_readconfig,
en_dumpsensors,
en_dumprawsensors,
en_dumprawmag,
en_dumprx,
en_resetmpu,
en_readregister,
en_setpid,
en_getpid,
en_setYawPID,
en_getYawPID,
en_zeroGyros,
en_setFilterFreq,
en_getFilterFreq,
en_getdt,
en_calibrateAccelerometers,
en_exit
};
class CLI_class
{
public:
CLI_class();
CLI_class(const CLI_class& orig);
virtual ~CLI_class();
void open();
private:
std::map<std::string, lineString> lineMap_;
void initialiseMap_();
std::string stringbuf_[6];
};
extern CLI_class CLI;
#endif /* COMMANDLINEINTERFACE_H */