A Discrete-Event Network Simulator
API
wifi-phy-tag.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 CTTC
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: Nicola Baldo <nbaldo@cttc.es>
19  */
20 
21 #ifndef WIFI_PHY_TAG_H
22 #define WIFI_PHY_TAG_H
23 
24 #include <ns3/tag.h>
25 #include "wifi-phy.h"
26 
27 namespace ns3 {
28 
35 class WifiPhyTag : public Tag
36 {
37 public:
42  static TypeId GetTypeId (void);
43  TypeId GetInstanceTypeId (void) const;
44 
48  WifiPhyTag ();
54  WifiPhyTag (WifiTxVector txVector, MpduType mpdutype);
59  WifiTxVector GetWifiTxVector (void) const;
64  MpduType GetMpduType (void) const;
65 
66  // From class Tag
67  uint32_t GetSerializedSize (void) const;
68  void Serialize (TagBuffer i) const;
69  void Deserialize (TagBuffer i);
70  void Print (std::ostream &os) const;
71 
72 
73 private:
76 };
77 
78 } // namespace ns3
79 
80 #endif /* WIFI_PHY_TAG_H */
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: wifi-phy-tag.cc:35
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
MpduType m_mpduType
MPDU type.
Definition: wifi-phy-tag.h:75
WifiTxVector m_wifiTxVector
wifi transmit vector
Definition: wifi-phy-tag.h:74
WifiPhyTag()
Constructor.
Definition: wifi-phy-tag.cc:65
static TypeId GetTypeId(void)
Get the type ID.
Definition: wifi-phy-tag.cc:26
void Deserialize(TagBuffer i)
Definition: wifi-phy-tag.cc:54
void Print(std::ostream &os) const
Definition: wifi-phy-tag.cc:60
tag a set of bytes in a packet
Definition: tag.h:36
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetSerializedSize(void) const
Definition: wifi-phy-tag.cc:41
WifiTxVector GetWifiTxVector(void) const
Getter for WifiTxVector parameter.
Definition: wifi-phy-tag.cc:76
read and write tag data
Definition: tag-buffer.h:51
void Serialize(TagBuffer i) const
Definition: wifi-phy-tag.cc:47
Tag for WifiTxVector and WifiPreamble information to be embedded in outgoing transmissions as a Packe...
Definition: wifi-phy-tag.h:35
a unique identifier for an interface.
Definition: type-id.h:58
MpduType
This enumeration defines the type of an MPDU.
Definition: wifi-phy.h:56
MpduType GetMpduType(void) const
Getter for mpduType parameter.
Definition: wifi-phy-tag.cc:82