SOS 802.11p on NS-3

294 views
Skip to first unread message

patisse

unread,
Jun 16, 2011, 6:01:26 AM6/16/11
to ns-3-users
hi all,
I want to simulate a vanet network using 802.11p. I saw there is
802.11p_CCH and 802.11p_SCH on NS but what I must instantiate to use
this standard ? WifiPhy or WifiPhyHelper ????? and if I instantiate
WifiPhy , must i configure all the parameters??????
please help me I'm blocked :(

Jorge Sousa

unread,
Jun 16, 2011, 6:05:38 AM6/16/11
to ns-3-...@googlegroups.com
Hi there,

Take a look on wifi examples (.../{ns3.11}/examples/wireless) and you can check which parameters are used to a minimum working scenario. Ofcourse there are many other attributes than those presented in those scripts but it will only depend of what you want to simulate.

Regards,

JS

2011/6/16 patisse <patisse...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.


phuchong kheawchaoom

unread,
Jun 16, 2011, 6:20:25 AM6/16/11
to ns-3-...@googlegroups.com
// Setup Wifi
    m_wifiHelper = WifiHelper::Default();
    m_wifiHelper.SetStandard (WIFI_PHY_STANDARD_80211p_CCH);
    m_wifiMacHelper = NqosWifiMacHelper::Default();
    m_wifiPhyHelper = YansWifiPhyHelper::Default();
    m_wifiChannelHelper = YansWifiChannelHelper::Default ();
    m_wifiMacHelper.SetType ("ns3::AdhocWifiMac");
    m_wifiHelper.SetRemoteStationManager ("ns3::ConstantRateWifiManager","DataMode", StringValue ("OfdmRate6MbpsBW10MHz"), "ControlMode", StringValue("OfdmRate6MbpsBW10MHz"));
    m_wifiChannelHelper.AddPropagationLoss ("ns3::NakagamiPropagationLossModel");
m_wifiChannel = m_wifiChannelHelper.Create();
    m_wifiPhyHelper.SetChannel (m_wifiChannel);
    m_wifiPhyHelper.Set("TxPowerStart",DoubleValue(21.5)); // 250-300 meter transmission range 
    m_wifiPhyHelper.Set("TxPowerEnd",DoubleValue(21.5));      // 250-300 meter transmission range
    m_wifiPhyHelper.Set("TxPowerLevels",UintegerValue(1)); 
    m_wifiPhyHelper.Set("TxGain",DoubleValue(0)); 
    m_wifiPhyHelper.Set("RxGain",DoubleValue(0));  
    m_wifiPhyHelper.Set("EnergyDetectionThreshold", DoubleValue(-101.0));

patisse

unread,
Jun 17, 2011, 5:01:06 AM6/17/11
to ns-3-users
thanks all,
but by writing m_wifiPhyHelper = YansWifiPhyHelper::Default(); i will
instantiate a PHY 802.11a , but i want it to be a 802.11p PHY and the
same thing for Mac layer where i must take account the QoS.
excuse my English :)
best regards

On 16 juin, 12:20, phuchong kheawchaoom <phuchon...@gmail.com> wrote:
> // Setup Wifi
>     m_wifiHelper = WifiHelper::Default();
>     m_wifiHelper.SetStandard (WIFI_PHY_STANDARD_80211p_CCH);
>     m_wifiMacHelper = NqosWifiMacHelper::Default();
>     m_wifiPhyHelper = YansWifiPhyHelper::Default();
>     m_wifiChannelHelper = YansWifiChannelHelper::Default ();
>     m_wifiMacHelper.SetType ("ns3::AdhocWifiMac");
>     m_wifiHelper.SetRemoteStationManager
> ("ns3::ConstantRateWifiManager","DataMode", StringValue
> ("OfdmRate6MbpsBW10MHz"), "ControlMode",
> StringValue("OfdmRate6MbpsBW10MHz"));
>     m_wifiChannelHelper.AddPropagationLoss
> ("ns3::NakagamiPropagationLossModel");
> m_wifiChannel = m_wifiChannelHelper.Create();
>     m_wifiPhyHelper.SetChannel (m_wifiChannel);
>     m_wifiPhyHelper.Set("TxPowerStart",DoubleValue(21.5)); // 250-300 meter
> transmission range
>     m_wifiPhyHelper.Set("TxPowerEnd",DoubleValue(21.5));      // 250-300
> meter transmission range
>     m_wifiPhyHelper.Set("TxPowerLevels",UintegerValue(1));
>     m_wifiPhyHelper.Set("TxGain",DoubleValue(0));
>     m_wifiPhyHelper.Set("RxGain",DoubleValue(0));
>     m_wifiPhyHelper.Set("EnergyDetectionThreshold", DoubleValue(-101.0));
>
> On Thu, Jun 16, 2011 at 5:05 PM, Jorge Sousa <jose.jorge.so...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Hi there,
>
> > Take a look on wifi examples (.../{ns3.11}/examples/wireless) and you can
> > check which parameters are used to a minimum working scenario. Ofcourse
> > there are many other attributes than those presented in those scripts but it
> > will only depend of what you want to simulate.
>
> > Regards,
>
> > JS
>
> > 2011/6/16 patisse <patisse.pati...@gmail.com>

Jorge Sousa

unread,
Jun 17, 2011, 5:28:31 AM6/17/11
to ns-3-...@googlegroups.com
Hi,

Take a look on these lines that Phuchong posted:

   m_wifiHelper = WifiHelper::Default();
   m_wifiHelper.SetStandard (WIFI_PHY_STANDARD_80211p_CCH);

This sequential declaration has a big role in C++ scripts. It's not like in Java, where code can be mixed and the sequence isn't really a big issue; In these network scripts i imagine things like "stacks of properties" which the last declaration made to an object, is that one that will make the final effect so when you set a specific standard (p_CCH), you're changing the initial standard (a), initiated by Default() method.

About QoS, i suggest you to use m_wifiMacHelper = QosWifiMacHelper::Default(); instead of m_wifiMacHelper = NqosWifiMacHelper::Default(); which, as it says in its description, enables QoS Support and for a complement to this declaration, use methods SetMsduAggregatorForAc( AC, <Value>), SetBlockAckThresholdForAc ( AC, <Value>) and SetBlockAckInactivityTimeoutForAc ( AC, <Value>). You go to the class declaration and get more detail about these functions because you will use them according to what traffic optimization you want to setup which obviously i do not know ;). 

Regards,

Jorge Sousa  

2011/6/17 patisse <patisse...@gmail.com>

patisse

unread,
Jun 19, 2011, 8:14:33 AM6/19/11
to ns-3-users
Thanks a lot, I will tray to do this.
Regards,


On 17 juin, 11:28, Jorge Sousa <jose.jorge.so...@gmail.com> wrote:
> Hi,
>
> Take a look on these lines that Phuchong posted:
>
>    m_wifiHelper = WifiHelper::Default();
>    m_wifiHelper.SetStandard (WIFI_PHY_STANDARD_80211p_CCH);
>
> This sequential declaration has a big role in C++ scripts. It's not like in
> Java, where code can be mixed and the sequence isn't really a big issue; In
> these network scripts i imagine things like "stacks of properties" which the
> last declaration made to an object, is that one that will make the final
> effect so when you set a specific standard (p_CCH), you're changing the
> initial standard (a), initiated by Default() method.
>
> About QoS, i suggest you to use m_wifiMacHelper =
> QosWifiMacHelper::Default(); instead of m_wifiMacHelper =
> NqosWifiMacHelper::Default(); which, as it says in its description, enables
> QoS Support and for a complement to this declaration, use methods
> SetMsduAggregatorForAc(
> AC, <Value>), SetBlockAckThresholdForAc ( AC, <Value>) and
> SetBlockAckInactivityTimeoutForAc
> ( AC, <Value>). You go to the class declaration and get more detail about
> these functions<http://www.nsnam.org/doxygen/classns3_1_1_qos_wifi_mac_helper.html#ad...>because
> you will use them according to what traffic optimization you want to
> setup which obviously i do not know ;).
>
> Regards,
>
> Jorge Sousa
>
> 2011/6/17 patisse <patisse.pati...@gmail.com>
Reply all
Reply to author
Forward
0 new messages