A Discrete-Event Network Simulator
API
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 
28 {
29 }
30 
32 {
33 }
34 
35 TypeId
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
48 {
49  return GetTypeId ();
50 }
51 
52 void
53 WifiMacTrailer::Print (std::ostream &os) const
54 {
55 }
56 
57 uint32_t
59 {
60  return WIFI_MAC_FCS_LENGTH;
61 }
62 
63 void
65 {
67  start.WriteU32 (0);
68 }
69 
70 uint32_t
72 {
73  return WIFI_MAC_FCS_LENGTH;
74 }
75 
76 } //namespace ns3
void Serialize(Buffer::Iterator start) const
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
def start()
Definition: core.py:1844
static const uint16_t WIFI_MAC_FCS_LENGTH
The length in octects of the IEEE 802.11 MAC FCS field.
iterator in a Buffer instance
Definition: buffer.h:98
void Print(std::ostream &os) const
uint32_t GetSerializedSize(void) const
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Protocol trailer serialization and deserialization.
Definition: trailer.h:40
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t Deserialize(Buffer::Iterator start)
static TypeId GetTypeId(void)
Get the type ID.
a unique identifier for an interface.
Definition: type-id.h:58
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:915
Implements the IEEE 802.11 MAC trailer.