A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
wifi
model
wifi-mac-trailer.cc
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2006 INRIA
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
21
#include "
wifi-mac-trailer.h
"
22
23
namespace
ns3
{
24
25
NS_OBJECT_ENSURE_REGISTERED
(WifiMacTrailer);
26
27
WifiMacTrailer::WifiMacTrailer
()
28
{
29
}
30
31
WifiMacTrailer::~WifiMacTrailer
()
32
{
33
}
34
35
TypeId
36
WifiMacTrailer::GetTypeId
(
void
)
37
{
38
static
TypeId
tid =
TypeId
(
"ns3::WifiMacTrailer"
)
39
.
SetParent
<
Trailer
> ()
40
.SetGroupName (
"Wifi"
)
41
.AddConstructor<
WifiMacTrailer
> ()
42
;
43
return
tid;
44
}
45
46
TypeId
47
WifiMacTrailer::GetInstanceTypeId
(
void
)
const
48
{
49
return
GetTypeId
();
50
}
51
52
void
53
WifiMacTrailer::Print
(std::ostream &os)
const
54
{
55
}
56
57
uint32_t
58
WifiMacTrailer::GetSerializedSize
(
void
)
const
59
{
60
return
WIFI_MAC_FCS_LENGTH
;
61
}
62
63
void
64
WifiMacTrailer::Serialize
(
Buffer::Iterator
start
)
const
65
{
66
start
.Prev (
WIFI_MAC_FCS_LENGTH
);
67
start
.WriteU32 (0);
68
}
69
70
uint32_t
71
WifiMacTrailer::Deserialize
(
Buffer::Iterator
start
)
72
{
73
return
WIFI_MAC_FCS_LENGTH
;
74
}
75
76
}
//namespace ns3
ns3::WifiMacTrailer::Serialize
void Serialize(Buffer::Iterator start) const
Definition:
wifi-mac-trailer.cc:64
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:45
visualizer.core.start
def start()
Definition:
core.py:1844
ns3::WIFI_MAC_FCS_LENGTH
static const uint16_t WIFI_MAC_FCS_LENGTH
The length in octects of the IEEE 802.11 MAC FCS field.
Definition:
wifi-mac-trailer.h:31
ns3::WifiMacTrailer::~WifiMacTrailer
virtual ~WifiMacTrailer()
Definition:
wifi-mac-trailer.cc:31
ns3::WifiMacTrailer::WifiMacTrailer
WifiMacTrailer()
Definition:
wifi-mac-trailer.cc:27
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::WifiMacTrailer::Print
void Print(std::ostream &os) const
Definition:
wifi-mac-trailer.cc:53
ns3::WifiMacTrailer::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
wifi-mac-trailer.cc:58
ns3::WifiMacTrailer::GetInstanceTypeId
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
wifi-mac-trailer.cc:47
ns3::Trailer
Protocol trailer serialization and deserialization.
Definition:
trailer.h:40
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiMacTrailer::Deserialize
uint32_t Deserialize(Buffer::Iterator start)
Definition:
wifi-mac-trailer.cc:71
ns3::WifiMacTrailer::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
wifi-mac-trailer.cc:36
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition:
type-id.cc:915
wifi-mac-trailer.h
ns3::WifiMacTrailer
Implements the IEEE 802.11 MAC trailer.
Definition:
wifi-mac-trailer.h:38
Generated on Wed Nov 7 2018 10:02:15 for ns-3 by
1.8.14