-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.h
More file actions
38 lines (30 loc) · 833 Bytes
/
common.h
File metadata and controls
38 lines (30 loc) · 833 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
#ifndef ROBOTS_GUI_COMMON_H
#define ROBOTS_GUI_COMMON_H
#include <iostream>
#include "json.hpp"
#include "spdlog/spdlog.h"
#include "spdlog/fmt/ostr.h"
using namespace std;
using json = nlohmann::json;
#define DATA_INVALID "DATA_INVALID"
#define DATA_UNPARSABLE "DATA_UNPARSABLE"
#define RESPONSE_OK "OK"
#define RESPONSE_ERROR "ERROR"
#define ACTION_EXIT "EXIT"
#define ACTION_ECHO "ECHO"
#define ACTION_SET_PARAMS "SET_PARAMS"
#define ACTION_GET_CONFIG "GET_CONFIG"
#define ACTION_UPDATE_STATE "UPDATE_STATE"
#define ACTION_UPDATE_MATCH "UPDATE_MATCH"
#define ACTION_UPDATE_PHOTO "UPDATE_PHOTO"
struct JsonResult {
string status;
string action;
string errorMessage;
json data;
};
struct JsonQuery {
string action;
json data;
};
#endif //ROBOTS_GUI_COMMON_H