-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMutex_SendEvent.h
50 lines (38 loc) · 990 Bytes
/
Mutex_SendEvent.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
/*
* SendEvent.h
*
* Created on: 25.06.2020
* Author: Kevin Küchler
*/
#ifndef BROADCAST_MUTEX_SENDEVENT_H_
#define BROADCAST_MUTEX_SENDEVENT_H_
#include "ns3/event-impl.h"
#include "GameState.h"
#include "EEBTProtocol_Mutex.h"
namespace ns3
{
class GameState;
class EEBTProtocolMutex;
class MutexSendEvent : public EventImpl
{
public:
MutexSendEvent(Ptr<GameState> gs, Ptr<EEBTProtocolMutex> prot, Ptr<EEBTPNode> recipient, Mac48Address originator, Mac48Address newOriginator, Mac48Address unused, double txPower, uint16_t seqNo);
~MutexSendEvent();
void Notify();
uint32_t getNTimes();
void updateTxPower(double txPower);
uint16_t getSeqNo();
void setSeqNo(uint16_t seqNo);
private:
Ptr<GameState> gs;
Ptr<EEBTProtocolMutex> prot;
uint16_t seqNo;
uint32_t counter;
Ptr<EEBTPNode> recipient;
Mac48Address originator;
Mac48Address newOriginator;
Mac48Address unused;
double txPower;
};
}
#endif /* BROADCAST_CC_SENDEVENT_H_ */