A Discrete-Event Network Simulator
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008 INRIA
4  * Copyright (c) 2013 Dalian University of Technology
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  * Junling Bu <linlinjavaer@gmail.com>
21  */
22 #ifndef OCB_WIFI_MAC_H
23 #define OCB_WIFI_MAC_H
25 #include "ns3/object-factory.h"
26 #include "ns3/regular-wifi-mac.h"
27 #include "ns3/wifi-mac-queue.h"
28 #include "vendor-specific-action.h"
29 #include "wave-net-device.h"
31 namespace ns3 {
33 class OrganizationIdentifier;
34 class WaveNetDevice;
49 class OcbWifiMac : public RegularWifiMac
50 {
51 public:
56  static TypeId GetTypeId (void);
57  OcbWifiMac (void);
58  virtual ~OcbWifiMac (void);
87  virtual Ssid GetSsid (void) const;
94  virtual void SetSsid (Ssid ssid);
100  virtual void SetBssid (Mac48Address bssid);
105  virtual Mac48Address GetBssid (void) const;
114  virtual void SetLinkUpCallback (Callback<void> linkUp);
118  virtual void SetLinkDownCallback (Callback<void> linkDown);
127  virtual void Enqueue (Ptr<Packet> packet, Mac48Address to);
136  void ConfigureEdca (uint32_t cwmin, uint32_t cwmax, uint32_t aifsn, enum AcIndex ac);
138  // below six public methods are used for MAC extension defined in IEEE 1609.4
145  void EnableForWave (Ptr<WaveNetDevice> device);
150  void Suspend (void);
155  void Resume (void);
162  void MakeVirtualBusy (Time duration);
169  void CancleTx (enum AcIndex ac);
174  void Reset (void);
176  // Inherited from base class
177  virtual void ConfigureStandard (enum WifiStandard standard);
178 private:
179  virtual void Receive (Ptr<WifiMacQueueItem> mpdu);
182 };
184 }
185 #endif /* OCB_WIFI_MAC_H */
virtual Ssid GetSsid(void) const
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
void ConfigureEdca(uint32_t cwmin, uint32_t cwmax, uint32_t aifsn, enum AcIndex ac)
virtual void ConfigureStandard(enum WifiStandard standard)
Callback template class.
Definition: callback.h:1278
virtual ~OcbWifiMac(void)
Definition: ocb-wifi-mac.cc:64
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to)
void CancleTx(enum AcIndex ac)
void SendVsc(Ptr< Packet > vsc, Mac48Address peer, OrganizationIdentifier oi)
Definition: ocb-wifi-mac.cc:70
virtual Mac48Address GetBssid(void) const
This method shall not be used in WAVE environment and here it will overloaded to log warn message...
VendorSpecificContentManager m_vscManager
VSC manager.
Definition: ocb-wifi-mac.h:181
void EnableForWave(Ptr< WaveNetDevice > device)
VendorSpecificContentManager class.
virtual void SetLinkUpCallback(Callback< void > linkUp)
SetLinkUpCallback and SetLinkDownCallback will be overloaded In OCB mode, stations can send packets d...
base class for all MAC-level wifi objects.
static TypeId GetTypeId(void)
Get the type ID.
Definition: ocb-wifi-mac.cc:45
the organization identifier is a public organizationally unique identifier assigned by the IEEE...
Definition: third.py:100
void Suspend(void)
To support MAC extension for multiple channel operation, Suspend the activity in current MAC entity...
void MakeVirtualBusy(Time duration)
void RemoveReceiveVscCallback(OrganizationIdentifier oi)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Identifies the allowed configurations that a Wifi device is configured to use.
an EUI-48 address
Definition: mac48-address.h:43
virtual void SetLinkDownCallback(Callback< void > linkDown)
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:35
virtual void SetSsid(Ssid ssid)
virtual void Receive(Ptr< WifiMacQueueItem > mpdu)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
virtual void SetBssid(Mac48Address bssid)
void Reset(void)
To support MAC extension for multiple channel operation, Reset current MAC entity and flush its inter...
a unique identifier for an interface.
Definition: type-id.h:58
void Resume(void)
To support MAC extension for multiple channel operation, Resume the activity of suspended MAC entity...
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition: qos-utils.h:38
void AddReceiveVscCallback(OrganizationIdentifier oi, VscCallback cb)
Definition: ocb-wifi-mac.cc:97
STAs communicate with each directly outside the context of a BSSIn OCB mac mode,synchronization, association, dis-association and authentication of normal wifi are not used for wireless access in vehicular environments.
Definition: ocb-wifi-mac.h:49