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 #ifndef WIFI_PHY_TAG_H
21 #define WIFI_PHY_TAG_H
22 
23 #include <ns3/tag.h>
24 #include <ns3/wifi-tx-vector.h>
25 #include <ns3/wifi-preamble.h>
26 #include <ns3/wifi-phy.h>
27 
28 namespace ns3 {
29 
36 class WifiPhyTag : public Tag
37 {
38 public:
39  static TypeId GetTypeId (void);
40  virtual TypeId GetInstanceTypeId (void) const;
41 
45  WifiPhyTag ();
52  WifiPhyTag (WifiTxVector txVector, WifiPreamble preamble, enum mpduType mpdutype);
57  WifiTxVector GetWifiTxVector (void) const;
62  WifiPreamble GetWifiPreamble (void) const;
67  enum mpduType GetMpduType (void) const;
68 
69  // From class Tag
70  virtual uint32_t GetSerializedSize (void) const;
71  virtual void Serialize (TagBuffer i) const;
72  virtual void Deserialize (TagBuffer i);
73  virtual void Print (std::ostream &os) const;
74 
75 private:
77  int32_t m_wifiPreamble;
79 };
80 
81 } // namespace ns3
82 
83 #endif /* WIFI_PHY_TAG_H */
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: wifi-phy-tag.cc:34
int32_t m_wifiPreamble
Definition: wifi-phy-tag.h:77
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiTxVector m_wifiTxVector
Definition: wifi-phy-tag.h:76
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:30
WifiPhyTag()
Constructor.
Definition: wifi-phy-tag.cc:78
static TypeId GetTypeId(void)
Definition: wifi-phy-tag.cc:25
virtual void Deserialize(TagBuffer i)
Definition: wifi-phy-tag.cc:60
virtual void Print(std::ostream &os) const
Definition: wifi-phy-tag.cc:73
enum mpduType m_mpduType
Definition: wifi-phy-tag.h:78
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.
virtual uint32_t GetSerializedSize(void) const
Definition: wifi-phy-tag.cc:40
WifiPreamble GetWifiPreamble(void) const
Getter for WifiPreamble parameter.
Definition: wifi-phy-tag.cc:96
WifiTxVector GetWifiTxVector(void) const
Getter for WifiTxVector parameter.
Definition: wifi-phy-tag.cc:90
read and write tag data
Definition: tag-buffer.h:51
virtual void Serialize(TagBuffer i) const
Definition: wifi-phy-tag.cc:46
enum mpduType GetMpduType(void) const
Getter for mpduType parameter.
Tag for WifiTxVector and WifiPreamble information to be embedded in outgoing transmissions as a Packe...
Definition: wifi-phy-tag.h:36
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