Install PLC Module to ns3.22

263 views
Skip to first unread message

Peter Riedemann

unread,
Jan 21, 2016, 3:57:37 AM1/21/16
to ns-3-users
Hi,
I want to install this plc module using ns3.22. Here is the corresponding Website. I know, the module is created for ns3.16 or ns3.17, but I have to use it with ns3.22. After installing boost, adding boost path to PATH, copying the plc module to the src folder and reconfiguring ns3, I've started the build process. Then suddenly, the process failed with the following messages:

...
[1296/2659] cxx: src/plc/model/plc-graph.cc -> build/src/plc/model/plc-graph.cc.1.o
[1393/2659] cxx: src/plc/model/plc-mac.cc -> build/src/plc/model/plc-mac.cc.1.o
../src/plc/model/plc-mac.cc:24:33: fatal error: ns3/random-variable.h: Datei oder Verzeichnis nicht gefunden
 #include <ns3/random-variable.h>
                                 ^
compilation terminated.
In file included from ../src/plc/model/plc-channel.cc:34:0:
../src/plc/model/plc-noise.h:25:33: fatal error: ns3/random-variable.h: Datei oder Verzeichnis nicht gefunden
 #include <ns3/random-variable.h>
                                 ^
compilation terminated.

Can you tell me where to find the file random-variable.h or what file I need to include that I can build ns3 with plc module?

Thanks,
Peter

Konstantinos

unread,
Jan 21, 2016, 4:04:49 AM1/21/16
to ns-3-users
Hi Peter,

Since NS-3.17 there has been a change in the RandomVariable API in NS-3.

Instead of using RandomVariable you need to use RandomVariableStream
This has been discussed in the list in the past for more details. 

Also I would recommend to use the latest ns-3 (ns-3.24 with ns-3.25 being released later this month).
Do not start with an old release.

Regards,
K.

Peter Riedemann

unread,
Jan 21, 2016, 4:54:29 AM1/21/16
to ns-3-users
Thank you for your answer. Ok I will try to change the RandomVariable to the RandomVariableStream. I know there is a new version of ns3 but I'm working in a project that currently use ns3.22. I'll ask to change to ns3.24.

Regards,
Peter

Thomas Burger

unread,
Jan 31, 2016, 4:57:07 AM1/31/16
to ns-3-users
Hi Peter,

in https://groups.google.com/d/msg/ns-3-users/sKuccuZjpZs/MITbavvAoYQJ the upgrade to ns-3.19 has been discussed, but I'm not aware of further upgrades to recent versions. If you succeed, it would be nice to share the necessary changes :-)

Best regards,
Thomas

Alfonso Hernandez

unread,
Mar 10, 2016, 8:25:22 AM3/10/16
to ns-3-users
I just successfully compiled the PLC module with NS3.24.1. Basically you need to add the random-variable.c and random-variable.h files to src/core/model, and modify the wscript file at src/core to build the module (you can check the wscript file inside the ns3.19 integrated solution mentioned here for comparision: https://groups.google.com/d/msg/ns-3-users/sKuccuZjpZs/MITbavvAoYQJ )

Konstantinos

unread,
Mar 10, 2016, 11:12:04 AM3/10/16
to ns-3-users
Hi,

This approach it wrong since NS-3 has moved on a new random variable API. 
Adding the old API back may cause more troubles than those it fixes in the long run.

Regards,
K.

Peter Riedemann

unread,
May 8, 2016, 6:58:21 AM5/8/16
to ns-3-users
Sorry that I only now reply. I was busy writing my master thesis.

@Alfonso Hernandez: I also think that your approach is wrong. It is possible that it still works but you don't use the current version of random variable API and you may get more troubles.

I successfully compiled the PLC-Module after changing RandomVariable to RandomVariableStream. Of course you have to use the right Types of RandomVariable for each object. Here you can find the RandomVariableStream Doxygen Documentation with the correpsponding inheritance diagram.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages