src/devices/wifi/wifi-channel.h
changeset 2524 db72c0e7743e
parent 2171 ac7f5126fd7e
child 2549 fe90cf0b2c63
equal deleted inserted replaced
2523:58182a1561cc 2524:db72c0e7743e
    24 #include <stdint.h>
    24 #include <stdint.h>
    25 #include "ns3/packet.h"
    25 #include "ns3/packet.h"
    26 #include "ns3/channel.h"
    26 #include "ns3/channel.h"
    27 #include "wifi-mode.h"
    27 #include "wifi-mode.h"
    28 #include "wifi-preamble.h"
    28 #include "wifi-preamble.h"
       
    29 #include "wifi-phy.h"
    29 
    30 
    30 namespace ns3 {
    31 namespace ns3 {
    31 
    32 
    32 class NetDevice;
    33 class NetDevice;
    33 class PropagationLossModel;
    34 class PropagationLossModel;
    81    *        be received.
    82    *        be received.
    82    *
    83    *
    83    * This method should not be invoked by normal users. It is 
    84    * This method should not be invoked by normal users. It is 
    84    * currently invoked only from WifiPhy::SetChannel.
    85    * currently invoked only from WifiPhy::SetChannel.
    85    */
    86    */
    86   void Add (Ptr<NetDevice> device,  ReceiveCallback callback);
    87   void Add (Ptr<NetDevice> device,  Ptr<WifiPhy> phy);
    87   /**
    88   /**
    88    * \param sender the device from which the packet is originating.
    89    * \param sender the device from which the packet is originating.
    89    * \param packet the packet to send
    90    * \param packet the packet to send
    90    * \param txPowerDbm the tx power associated to the packet
    91    * \param txPowerDbm the tx power associated to the packet
    91    * \param wifiMode the tx mode associated to the packet
    92    * \param wifiMode the tx mode associated to the packet
    92    * \param preamble the preamble associated to the packet
    93    * \param preamble the preamble associated to the packet
    93    *
    94    *
    94    * This method should not be invoked by normal users. It is 
    95    * This method should not be invoked by normal users. It is 
    95    * currently invoked only from WifiPhy::Send.
    96    * currently invoked only from WifiPhy::Send.
    96    */
    97    */
    97   void Send (Ptr<NetDevice> sender, Ptr<const Packet> packet, double txPowerDbm,
    98   void Send (Ptr<WifiPhy> sender, Ptr<const Packet> packet, double txPowerDbm,
    98              WifiMode wifiMode, WifiPreamble preamble) const;
    99              WifiMode wifiMode, WifiPreamble preamble) const;
    99 
   100 
   100 private:
   101 private:
   101   typedef std::vector<std::pair<Ptr<NetDevice>, ReceiveCallback> > DeviceList;
   102   typedef std::vector<std::pair<Ptr<NetDevice>, Ptr<WifiPhy> > > DeviceList;
   102   void Receive (uint32_t i, Ptr<Packet> packet, double rxPowerDbm,
   103   void Receive (uint32_t i, Ptr<Packet> packet, double rxPowerDbm,
   103                 WifiMode txMode, WifiPreamble preamble) const;
   104                 WifiMode txMode, WifiPreamble preamble) const;
   104   /**
   105   /**
   105    * \param i index of the requested network interface.
   106    * \param i index of the requested network interface.
   106    * \returns the requested network interfaces connected to 
   107    * \returns the requested network interfaces connected to