-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimpleBroadcastHeader.h
46 lines (37 loc) · 1.02 KB
/
SimpleBroadcastHeader.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
/*
* SimpleBroadcastHeader.h
*
* Created on: 04.05.2020
* Author: Kevin Küchler
*/
#ifndef BROADCAST_SIMPLEBROADCASTHEADER_H_
#define BROADCAST_SIMPLEBROADCASTHEADER_H_
#include "ns3/header.h"
#include "ns3/mac48-address.h"
namespace ns3
{
class SimpleBroadcastHeader : public Header
{
public:
SimpleBroadcastHeader(uint8_t hopCount = 1);
virtual ~SimpleBroadcastHeader();
static TypeId GetTypeId();
virtual TypeId GetInstanceTypeId() const;
virtual void Print(std::ostream &os) const;
virtual void Serialize(Buffer::Iterator start) const;
virtual uint32_t Deserialize(Buffer::Iterator start);
virtual uint32_t GetSerializedSize() const;
void SetOriginator(Mac48Address address);
Mac48Address GetOriginator();
uint8_t GetHopCount();
void SetHopCount(uint8_t hopCount);
void DecrementHopCount();
uint32_t GetSequenceNumber();
void SetSequenceNumber(uint32_t seqNo);
private:
uint32_t seqNo;
uint8_t hopCount;
Mac48Address originator;
};
}
#endif /* BROADCAST_SIMPLEBROADCASTHEADER_H_ */