19 #include "ns3/simulator.h" 
   20 #include "ns3/socket.h" 
   21 #include "ns3/wifi-phy.h" 
   42     .SetGroupName (
"Wave")
 
   51   m_vsaReceived = MakeNullCallback<bool, Ptr<const Packet>,
const Address &, uint32_t, uint32_t> ();
 
   71   for (std::map<uint32_t, 
Ptr<OcbWifiMac> >::iterator i = macs.begin (); i != macs.end (); ++i)
 
   92       uint8_t oibytes[5] = {0x00, 0x50, 0xC2, 0x4A, 0x40};
 
  147                                interval, channel, vsc, oi, peer);
 
  157                                interval, channel, vsc, oi, peer);
 
  167   if (!scheduler->IsChannelAccessAssigned (channel))
 
  169       NS_LOG_DEBUG (
"there is no channel access assigned for channel " << channel);
 
  182   txVector.
SetMode (manager->GetManagementDataRate (channel));
 
  195   for (std::vector<VsaWork *>::iterator i = 
m_vsas.begin ();
 
  198       if (!(*i)->repeat.IsExpired ())
 
  200           (*i)->repeat.Cancel ();
 
  212   for (std::vector<VsaWork *>::iterator i = 
m_vsas.begin ();
 
  215       if ((*i)->channelNumber == channelNumber)
 
  217           if (!(*i)->repeat.IsExpired ())
 
  219               (*i)->repeat.Cancel ();
 
  237   for (std::vector<VsaWork *>::iterator i = 
m_vsas.begin ();
 
  242           if (!(*i)->repeat.IsExpired ())
 
  244               (*i)->repeat.Cancel ();
 
  273   uint32_t channelNumber = mac->GetWifiPhy ()->GetChannelNumber ();
 
  275   return m_vsaReceived (vsc, src, managementId, channelNumber);
 
Ptr< WaveNetDevice > m_device
the device 
 
Simulation virtual time values and global simulation resolution. 
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
 
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
 
static const uint32_t VSA_REPEAT_PERIOD
A number of VSA frames will be transmitted repeatedly during the period of 5s. 
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
 
void AddPacketTag(const Tag &tag) const 
Add a packet tag. 
 
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
 
void SendVsc(Ptr< Packet > vsc, Mac48Address peer, OrganizationIdentifier oi)
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit. 
 
refer to 1609.4-2010 chapter 6.4 Vendor Specific Action (VSA) frames transmission. 
 
virtual ~VsaManager(void)
 
static const uint8_t oi_bytes_1609[5]
OI bytes for use in organization identifier. 
 
void SendVsa(const VsaInfo &vsaInfo)
 
VsaTransmitInterval
indicate which interval the VSA frames will be transmitted in. 
 
void SetWaveVsaCallback(Callback< bool, Ptr< const Packet >, const Address &, uint32_t, uint32_t > vsaCallback)
set wave vsa callback function 
 
This tag will be used to support higher layer control DataRate and TxPwr_Level for transmission...
 
a polymophic address class 
 
void DoSendVsa(enum VsaTransmitInterval interval, uint32_t channel, Ptr< Packet > vsc, OrganizationIdentifier oi, Mac48Address peer)
 
static TypeId GetTypeId(void)
Get the type ID. 
 
Ptr< ChannelCoordinator > GetChannelCoordinator(void) const 
 
enum VsaTransmitInterval sentInterval
VSA transmit interval. 
 
uint8_t managementId
management ID 
 
void DoInitialize(void)
Initialize() implementation. 
 
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay. 
 
the organization identifier is a public organizationally unique identifier assigned by the IEEE...
 
void DoDispose(void)
Destructor implementation. 
 
Time NeedTimeToCchInterval(Time duration=Seconds(0.0)) const 
 
indicates whether the socket has a priority set. 
 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
 
void SetWaveNetDevice(Ptr< WaveNetDevice > device)
 
void DoRepeat(VsaWork *vsa)
 
std::vector< VsaWork * > m_vsas
VSAs. 
 
Ptr< Packet > Copy(void) const 
performs a COW copy of the packet. 
 
std::map< uint32_t, Ptr< OcbWifiMac > > GetMacs(void) const 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type. 
 
uint32_t channelNumber
channel number 
 
static const OrganizationIdentifier oi_1609
OI for IEEE standard 1609. 
 
Time repeatPeriod
repeat period 
 
Ptr< OcbWifiMac > GetMac(uint32_t channelNumber) const 
 
Time NeedTimeToSchInterval(Time duration=Seconds(0.0)) const 
 
void SetTxPowerLevel(uint8_t powerlevel)
Sets the selected transmission power level. 
 
uint8_t repeatRate
repeat rate 
 
Ptr< ChannelManager > GetChannelManager(void) const 
 
void SetMode(WifiMode mode)
Sets the selected payload transmission mode. 
 
void RemoveByChannel(uint32_t channelNumber)
 
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG. 
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
OrganizationIdentifier oi
OI. 
 
void SetChannelWidth(uint8_t channelWidth)
Sets the selected channelWidth (in MHz) 
 
OrganizationIdentifier oi
OI. 
 
uint32_t channelNumber
channel number 
 
A base class which provides memory management and object aggregation. 
 
uint8_t GetManagementId(void) const 
 
Ptr< ChannelScheduler > GetChannelScheduler(void) const 
 
void SetPriority(uint8_t priority)
Set the tag's priority. 
 
Callback< bool, Ptr< const Packet >, const Address &, uint32_t, uint32_t > m_vsaReceived
VSA received callback. 
 
a unique identifier for an interface. 
 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
 
void RemoveAll(void)
cancel all VSA transmissions 
 
bool ReceiveVsc(Ptr< WifiMac > mac, const OrganizationIdentifier &oi, Ptr< const Packet > vsc, const Address &src)
 
void RemoveByOrganizationIdentifier(const OrganizationIdentifier &oi)
 
enum VsaTransmitInterval sendInterval
send interval