-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlogiccontroller.h
47 lines (36 loc) · 1.05 KB
/
logiccontroller.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
#ifndef LOGICCONTROLLER_H
#define LOGICCONTROLLER_H
#include <iomanip>
#include <cstdlib>
// Controllers headers
#include "modules/peripheralcontroller.h"
#include "network/networkcontroller.h"
#include "config/configprocessor.h"
/*!
\brief Класс логики управления роботом
Данный класс реализует логику управления роботом.
*/
class LogicController
{
const char *configName = "amur.cfg";
ConfigProcessor *config;
PeripheralController *periphery;
NetworkController *network;
// Server settings
std::string address = "";
int bcastPort = 11111;
int arpingPort = 11112;
AMUR::AmurSensors sensors;
AMUR::AmurControls controls;
AMUR::AmurControls controlsPrev;
int printVersion();
void fillFieldsByConfig();
void worker();
bool workerStopped = false;
public:
LogicController();
~LogicController();
void connectToServer(std::string host, unsigned int port);
void connectToServer();
};
#endif // LOGICCONTROLLER_H