Error while using tracing for laa-wifi-simple

89 views
Skip to first unread message

m.alh...@gmail.com

unread,
Sep 21, 2017, 7:29:15 PM9/21/17
to ns-3-users
Hello,

I am using a tracing for the simple-Laa-Wifi example such that i need to monitor the state of the Wifi Nodes only.

Operator (A): LTE (1 BS AND 1 UE)
Operator (B) WIFI (1 AP AND 1 STA)

i built an object and everything is okay but i got an error. My code and the error are attached.
aa.cc
Screenshot from 2017-09-22 00-24-30.png

Konstantinos

unread,
Sep 22, 2017, 4:06:41 AM9/22/17
to ns-3-users
Hi

This is basic C++ programming error, not related to ns-3
You should create the instance before using it.

PS: Read the posting guidelines before asking a question in the list

Regards
K

m.alh...@gmail.com

unread,
Sep 22, 2017, 5:59:03 AM9/22/17
to ns-3-users
Hi,

Thank you for your reply. Thus, the following line of the code is correct to install the devices in this laa-wifi-simple scenario?. Is the "WifiPhy" device suitable to be used here in such scenario since we have LTE and WiFi over this channel?. 

NetDeviceContainer devices;
devices = WifiPhy.Install (allWirelessNodes);
  

Konstantinos

unread,
Sep 22, 2017, 7:11:26 AM9/22/17
to ns-3-users
First you need to specify/instantiate WifiPhy. 
Once this is done, it will install Wifi devices to the nodes, not LTE. 
If you want to have both, you will need to install LTE as well. 

Study the examples in LAA branch

Regards
K

Tom Henderson

unread,
Sep 24, 2017, 3:14:24 PM9/24/17
to ns-3-...@googlegroups.com
On 09/22/2017 02:59 AM, m.alh...@gmail.com wrote:
Hi,

Thank you for your reply. Thus, the following line of the code is correct to install the devices in this laa-wifi-simple scenario?. Is the "WifiPhy" device suitable to be used here in such scenario since we have LTE and WiFi over this channel?. 

NetDeviceContainer devices;

devices = WifiPhy.Install (allWirelessNodes);

  

No, that line is not correct, because as Konstantinos stated, you have not declared the WifiPhy object and the compiler is reporting this in its error message.  If you search on the compiler error message, you may find this StackOverflow answer which is the same issue that you have here:
https://stackoverflow.com/questions/18942205/c-error-expected-primary-expression-before-token

Regarding laa-wifi-simple and the LAA code, please understand that the code is structured to make heavy use of the ScenarioHelper class that is designed to construct specific topologies, and the function you are trying to accomplish with the lines you inserted:


 NetDeviceContainer devices;
devices = WifiPhy.Install (allWirelessNodes);

are instead being done already in the ConfigureAndRunScenario () method later in your program.

- Tom

Reply all
Reply to author
Forward
0 new messages