A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
#include "ns3/assert.h"
23
24
namespace
ns3
{
25
26
NS_OBJECT_ENSURE_REGISTERED
(WifiMacTrailer);
27
28
WifiMacTrailer::WifiMacTrailer
()
29
{
30
}
31
32
WifiMacTrailer::~WifiMacTrailer
()
33
{
34
}
35
36
TypeId
37
WifiMacTrailer::GetTypeId
(
void
)
38
{
39
static
TypeId
tid =
TypeId
(
"ns3::WifiMacTrailer"
)
40
.
SetParent
<
Trailer
> ()
41
.SetGroupName (
"Wifi"
)
42
.AddConstructor<
WifiMacTrailer
> ()
43
;
44
return
tid;
45
}
46
47
TypeId
48
WifiMacTrailer::GetInstanceTypeId
(
void
)
const
49
{
50
return
GetTypeId
();
51
}
52
53
void
54
WifiMacTrailer::Print
(std::ostream &os)
const
55
{
56
}
57
58
uint32_t
59
WifiMacTrailer::GetSerializedSize
(
void
)
const
60
{
61
return
WIFI_MAC_FCS_LENGTH
;
62
}
63
64
void
65
WifiMacTrailer::Serialize
(
Buffer::Iterator
start
)
const
66
{
67
start.
Prev
(
WIFI_MAC_FCS_LENGTH
);
68
start.
WriteU32
(0);
69
}
70
71
uint32_t
72
WifiMacTrailer::Deserialize
(
Buffer::Iterator
start
)
73
{
74
return
WIFI_MAC_FCS_LENGTH
;
75
}
76
77
}
//namespace ns3
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:44
visualizer.core.start
def start()
Definition:
core.py:1482
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:32
ns3::WifiMacTrailer::~WifiMacTrailer
~WifiMacTrailer()
Definition:
wifi-mac-trailer.cc:32
ns3::WifiMacTrailer::WifiMacTrailer
WifiMacTrailer()
Definition:
wifi-mac-trailer.cc:28
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::WifiMacTrailer::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
wifi-mac-trailer.cc:48
ns3::Buffer::Iterator::Prev
void Prev(void)
go backward by one byte
Definition:
buffer.h:845
ns3::WifiMacTrailer::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
wifi-mac-trailer.cc:65
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
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition:
wifi-mac-trailer.cc:72
ns3::WifiMacTrailer::Print
virtual void Print(std::ostream &os) const
Definition:
wifi-mac-trailer.cc:54
ns3::WifiMacTrailer::GetTypeId
static TypeId GetTypeId(void)
Definition:
wifi-mac-trailer.cc:37
ns3::Buffer::Iterator::WriteU32
void WriteU32(uint32_t data)
Definition:
buffer.cc:878
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:826
wifi-mac-trailer.h
ns3::WifiMacTrailer
Implements the IEEE 802.11 MAC trailer.
Definition:
wifi-mac-trailer.h:39
ns3::WifiMacTrailer::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
wifi-mac-trailer.cc:59
src
wifi
model
wifi-mac-trailer.cc
Generated on Thu Jan 28 2016 11:05:40 for ns-3 by
1.8.9.1