src/devices/wifi/yans-wifi-phy.cc
changeset 5028 01f02baebba9
parent 4966 29d73c832841
parent 4470 51b5c1a272d3
child 5050 5c2002bda934
equal deleted inserted replaced
5025:fc820a3a1975 5028:01f02baebba9
   108     .AddAttribute ("Standard", "The standard chosen configures a set of transmission modes"
   108     .AddAttribute ("Standard", "The standard chosen configures a set of transmission modes"
   109                    " and some PHY-specific constants.",
   109                    " and some PHY-specific constants.",
   110                    EnumValue (WIFI_PHY_STANDARD_80211a),
   110                    EnumValue (WIFI_PHY_STANDARD_80211a),
   111                    MakeEnumAccessor (&YansWifiPhy::SetStandard),
   111                    MakeEnumAccessor (&YansWifiPhy::SetStandard),
   112                    MakeEnumChecker (WIFI_PHY_STANDARD_80211a, "802.11a",
   112                    MakeEnumChecker (WIFI_PHY_STANDARD_80211a, "802.11a",
       
   113                                     WIFI_PHY_STANDARD_80211b, "802.11b",
   113                                     WIFI_PHY_STANDARD_holland, "holland"))
   114                                     WIFI_PHY_STANDARD_holland, "holland"))
   114     .AddAttribute ("State", "The state of the PHY layer",
   115     .AddAttribute ("State", "The state of the PHY layer",
   115                    PointerValue (),
   116                    PointerValue (),
   116                    MakePointerAccessor (&YansWifiPhy::m_state),
   117                    MakePointerAccessor (&YansWifiPhy::m_state),
   117                    MakePointerChecker<WifiPhyStateHelper> ())
   118                    MakePointerChecker<WifiPhyStateHelper> ())
   155   NS_LOG_FUNCTION (this << standard);
   156   NS_LOG_FUNCTION (this << standard);
   156   m_standard = standard;
   157   m_standard = standard;
   157   switch (standard) {
   158   switch (standard) {
   158   case WIFI_PHY_STANDARD_80211a:
   159   case WIFI_PHY_STANDARD_80211a:
   159     Configure80211a ();
   160     Configure80211a ();
       
   161     break;
       
   162   case WIFI_PHY_STANDARD_80211b:
       
   163     Configure80211b ();
   160     break;
   164     break;
   161   case WIFI_PHY_STANDARD_holland:
   165   case WIFI_PHY_STANDARD_holland:
   162     ConfigureHolland ();
   166     ConfigureHolland ();
   163     break;
   167     break;
   164   default:
   168   default:
   473   m_modes.push_back (WifiPhy::Get36mba ());
   477   m_modes.push_back (WifiPhy::Get36mba ());
   474   m_modes.push_back (WifiPhy::Get48mba ());
   478   m_modes.push_back (WifiPhy::Get48mba ());
   475   m_modes.push_back (WifiPhy::Get54mba ());
   479   m_modes.push_back (WifiPhy::Get54mba ());
   476 }
   480 }
   477 
   481 
       
   482 
       
   483 void
       
   484 YansWifiPhy::Configure80211b (void)
       
   485 {
       
   486   NS_LOG_FUNCTION (this);
       
   487   m_interference.Configure80211bParameters ();
       
   488   m_modes.push_back (WifiPhy::Get1mbb ());
       
   489   m_modes.push_back (WifiPhy::Get2mbb ());
       
   490   m_modes.push_back (WifiPhy::Get5_5mbb ());
       
   491   m_modes.push_back (WifiPhy::Get11mbb ());
       
   492 }
       
   493 
   478 void
   494 void
   479 YansWifiPhy::ConfigureHolland (void)
   495 YansWifiPhy::ConfigureHolland (void)
   480 {
   496 {
   481   NS_LOG_FUNCTION (this);
   497   NS_LOG_FUNCTION (this);
   482   m_interference.Configure80211aParameters ();
   498   m_interference.Configure80211aParameters ();