A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
wifi-mac-trailer.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7
*/
8
9
#include "
wifi-mac-trailer.h
"
10
11
namespace
ns3
12
{
13
14
NS_OBJECT_ENSURE_REGISTERED
(WifiMacTrailer);
15
16
WifiMacTrailer::WifiMacTrailer
()
17
{
18
}
19
20
WifiMacTrailer::~WifiMacTrailer
()
21
{
22
}
23
24
TypeId
25
WifiMacTrailer::GetTypeId
()
26
{
27
static
TypeId
tid =
TypeId
(
"ns3::WifiMacTrailer"
)
28
.
SetParent
<
Trailer
>()
29
.SetGroupName(
"Wifi"
)
30
.AddConstructor<
WifiMacTrailer
>();
31
return
tid;
32
}
33
34
TypeId
35
WifiMacTrailer::GetInstanceTypeId
()
const
36
{
37
return
GetTypeId
();
38
}
39
40
void
41
WifiMacTrailer::Print
(std::ostream& os)
const
42
{
43
}
44
45
uint32_t
46
WifiMacTrailer::GetSerializedSize
()
const
47
{
48
return
WIFI_MAC_FCS_LENGTH
;
49
}
50
51
void
52
WifiMacTrailer::Serialize
(
Buffer::Iterator
start)
const
53
{
54
start.Prev(
WIFI_MAC_FCS_LENGTH
);
55
start.WriteU32(0);
56
}
57
58
uint32_t
59
WifiMacTrailer::Deserialize
(
Buffer::Iterator
start)
60
{
61
return
WIFI_MAC_FCS_LENGTH
;
62
}
63
64
}
// namespace ns3
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::Trailer
Protocol trailer serialization and deserialization.
Definition
trailer.h:30
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
ns3::WifiMacTrailer
Implements the IEEE 802.11 MAC trailer.
Definition
wifi-mac-trailer.h:28
ns3::WifiMacTrailer::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
wifi-mac-trailer.cc:35
ns3::WifiMacTrailer::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition
wifi-mac-trailer.cc:59
ns3::WifiMacTrailer::~WifiMacTrailer
~WifiMacTrailer() override
Definition
wifi-mac-trailer.cc:20
ns3::WifiMacTrailer::WifiMacTrailer
WifiMacTrailer()
Definition
wifi-mac-trailer.cc:16
ns3::WifiMacTrailer::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
wifi-mac-trailer.cc:46
ns3::WifiMacTrailer::Serialize
void Serialize(Buffer::Iterator start) const override
Definition
wifi-mac-trailer.cc:52
ns3::WifiMacTrailer::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
wifi-mac-trailer.cc:25
ns3::WifiMacTrailer::Print
void Print(std::ostream &os) const override
Definition
wifi-mac-trailer.cc:41
uint32_t
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WIFI_MAC_FCS_LENGTH
static const uint16_t WIFI_MAC_FCS_LENGTH
The length in octets of the IEEE 802.11 MAC FCS field.
Definition
wifi-mac-trailer.h:20
wifi-mac-trailer.h
src
wifi
model
wifi-mac-trailer.cc
Generated on Fri Nov 8 2024 13:59:08 for ns-3 by
1.11.0