Please how do I declare nqoswifimachelper on ns3.29

640 views
Skip to first unread message

Sound Nwankwo

unread,
Dec 25, 2019, 11:42:48 PM12/25/19
to ns-3-...@googlegroups.com
I get this error when I try to run the file 

 

[1919/1972] Compiling scratch/blackholewmn.cc

../scratch/blackholewmn.cc: In function ‘int main(int, char**)’:

../scratch/blackholewmn.cc:165:5: error: ‘NqosWifiMacHelper’ was not declared in this scope

     NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();

     ^~~~~~~~~~~~~~~~~

../scratch/blackholewmn.cc:165:5: note: suggested alternative: ‘_ZTIN3ns313WifiMacHelperE’

     NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();

     ^~~~~~~~~~~~~~~~~

     _ZTIN3ns313WifiMacHelperE

../scratch/blackholewmn.cc:168:42: error: ‘wifiMac’ was not declared in this scope

     meshDevices = wifi.Install (wifiPhy, wifiMac, nc_meshNodes);

                                          ^~~~~~~

../scratch/blackholewmn.cc:168:42: note: suggested alternative: ‘wifiPhy’

     meshDevices = wifi.Install (wifiPhy, wifiMac, nc_meshNodes);

                                          ^~~~~~~

                                          wifiPhy

../scratch/blackholewmn.cc:170:36: error: ‘Default’ is not a member of ‘ns3::WifiHelper’

     WifiHelper wifi1 = WifiHelper::Default();

                                    ^~~~~~~

../scratch/blackholewmn.cc:174:23: error: expected ‘;’ before ‘mac1’

     NqosWifiMacHelper mac1 = NqosWifiMacHelper::Default();

                       ^~~~

../scratch/blackholewmn.cc:177:5: error: ‘mac1’ was not declared in this scope

     mac1.SetType("ns3::StaWifiMac",

     ^~~~

../scratch/blackholewmn.cc:177:5: note: suggested alternative: ‘main’

     mac1.SetType("ns3::StaWifiMac",

     ^~~~

     main

../scratch/blackholewmn.cc:193:36: error: ‘Default’ is not a member of ‘ns3::WifiHelper’

     WifiHelper wifi2 = WifiHelper::Default();

                                    ^~~~~~~

../scratch/blackholewmn.cc:197:23: error: expected ‘;’ before ‘mac2’

     NqosWifiMacHelper mac2 = NqosWifiMacHelper::Default();

                       ^~~~

../scratch/blackholewmn.cc:200:5: error: ‘mac2’ was not declared in this scope

     mac2.SetType("ns3::StaWifiMac",

     ^~~~

../scratch/blackholewmn.cc:200:5: note: suggested alternative: ‘main’

     mac2.SetType("ns3::StaWifiMac",

     ^~~~

     main

William Jones

unread,
Mar 27, 2020, 5:21:27 AM3/27/20
to ns-3-users

I don't know which version of NS-3 you are using. If you use NS-3.28, the Qos/Nqos version has been removed from Wifi codebase.  if your version is higher, you can read the corresponding version of documents like ns-3-model-library.pdf.

The following sentences are quoted from ns-3-model-library.pdf (version NS-3.28): 
From the above diagram, there are two Mac helper classes that both inherit from the WifiMacHelper; when the WAVE module was originally written, there were specialized versions (QoS and Nqos) of WifiMacHelper that have since been removed from the Wifi codebase, but the distinction remains in the WAVE helpers. 

Hope this can help you. 
Reply all
Reply to author
Forward
0 new messages