forked from whitefield-framework/whitefield
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nodeinfo.h
71 lines (65 loc) · 1.35 KB
/
Nodeinfo.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
/*
* Copyright (C) 2017 Rahul Jadhav <[email protected]>
*
* This file is subject to the terms and conditions of the GNU
* General Public License v2. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup airline
* @{
*
* @file
* @brief Node specific configuration and stats
*
* @author Rahul Jadhav <[email protected]>
*
* @}
*/
#ifndef _NODEINFO_H_
#define _NODEINFO_H_
#include <common.h>
#include <mac_stats.h>
namespace wf {
class Nodeinfo : public Macstats {
private:
string nodeExec;
string capFile;
double X, Y, Z;
uint8_t pos_set;
public:
string getNodeExecutable(void)
{
return nodeExec;
};
void setNodeExecutable(const string path)
{
nodeExec = path;
};
void setNodeCaptureFile(const string path)
{
capFile = path;
};
void setNodePosition(const double x_pos, const double y_pos, const double z_pos)
{
X = x_pos;
Y = y_pos;
Z = z_pos;
pos_set = 1;
};
void getNodePosition(uint8_t &is_set, double &x_pos, double &y_pos, double &z_pos)
{
is_set = pos_set;
if (!is_set)
return;
x_pos = X;
y_pos = Y;
z_pos = Z;
};
Nodeinfo()
{
pos_set = 0;
};
};
} //namespace wf
#endif // _NODEINFO_H_