-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNode.h
80 lines (54 loc) · 1.29 KB
/
Node.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/// Node Class
#ifndef MESH_STAT_NODE_H
#define MESH_STAT_NODE_H
#include <map>
#include <string>
#include <wx/datetime.h>
class NodeDisplay;
class Node {
public:
Node(const std::string url_);
~Node();
void setNodeDisplay(NodeDisplay *new_display);
void readDataFromJSON(const std::string &json);
void updateDisplay();
void probe();
std::string url;
std::string name;
double latitude;
double longitude;
double chanbw;
int channel;
std::string model;
std::string firmware_mfg;
std::string firmware_version;
std::string ssid;
std::string wifi_ip;
std::string lan_ip;
std::string wan_ip;
int num_fails;
unsigned int last_response_time; // milliseconds
wxDateTime last_succesful_probe_time;
wxDateTime start_time;
protected:
NodeDisplay *display;
private:
Node() {}; // Disabled
};
typedef std::map<std::string, Node*> NodeMap;
#endif /* end of MESH_STAT_NODE_H */
// node: W6JPL-M5R-180R6
// model: Ubiquiti Rocket M
// chanbw: 20
// channel: 174
// lat: 34.200464
// lon: -118.174341
// firmware_mfg: AREDN
// firmware_version: 3.16.1.1
// ssid: AREDN-20-v3
// active_tunnel_count: 0
// api_version: 1.0
// board_id: 0xe1b5
// grid_square:
// interfaces: [CHILDREN]
// tunnel_installed: true