forked from Project-GrADyS/gradys-simulations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MobileSensorNode.h
56 lines (43 loc) · 1.32 KB
/
MobileSensorNode.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
#include "inet/common/INETDefs.h"
#ifndef __MOBILESENSORNODE_H_
#define __MOBILESENSORNODE_H_
#include <omnetpp.h>
//#include <cModule.h>
#include "inet/common/ModuleAccess.h"
#include "inet/common/packet/Packet.h"
#include "inet/networklayer/common/L3AddressResolver.h"
#include "inet/transportlayer/contract/udp/UdpControlInfo_m.h"
#include "inet/applications/base/ApplicationBase.h"
#include "inet/transportlayer/contract/udp/UdpSocket.h"
#include "inet/applications/base/ApplicationBase.h"
#include "inet/transportlayer/contract/udp/UdpSocket.h"
#include <iostream>
#include <algorithm>
#include <iterator>
using std::cout; using std::endl;
using std::string; using std::reverse;
using namespace omnetpp;
using namespace inet;
namespace projeto {
class WayPoint {
public:
double x;
double y;
double z;
};
//enum mobileNodeType { sensor = 1, uav = 2, baseStation = 3, missing = 171 };
class MobileSensorNode : public cModule {
protected:
virtual void initialize() override;//(int stage) override;
virtual void handleMessage(cMessage *msg);
public:
int processMessage(inet::Packet *msg);
string generateNextPacketToSend();
// WayPoint waypoints[4];
int internalMobNodeId;
long sentMsgs = -1;
bool shouldSendAMsg = false;
// mobileNodeType myType = missing;
};
} //namespace
#endif