Hi

42 views
Skip to first unread message

Yasameen Khudhayer

unread,
Jan 23, 2022, 2:03:14 PM1/23/22
to ns-3-...@googlegroups.com
I am a beginner in NS3 and I need to learning it very well.
My research about Routing Protocols in WSN, I need to learn how to implement the simulation in it and what is the librarys I need in C++.

Can any one help me with that?
I really need help with NS3.
You could recommend me a book or website or anything else.

Thank you.

Saurabh Maurya

unread,
Jan 23, 2022, 2:42:31 PM1/23/22
to ns-3-...@googlegroups.com
Which protocol you are working??

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAAvzKnEhqbqgiw0eCR2f1ZEA2eR80gt2%3Dd6QDnSfV54N%2B27LLQ%40mail.gmail.com.

Soulimane Mammar

unread,
Jan 23, 2022, 2:50:11 PM1/23/22
to ns-3-users
Hi,
Start by reading the tutorials and viewing the videos from the official web site 
https://www.nsnam.org/documentation/

Yasameen Khudhayer

unread,
Jan 23, 2022, 2:57:23 PM1/23/22
to ns-3-...@googlegroups.com
Thanks for reply.

I am working with DCBRP, LEACH and PEGASIS.
And using the mechanisms BCM, CHS, Greedy algorithm.  

Abid Syed

unread,
Jan 24, 2022, 12:51:01 AM1/24/22
to ns-3-...@googlegroups.com
You can visit engg clinic as well

Yasameen Khudhayer

unread,
Feb 2, 2022, 10:40:46 AM2/2/22
to ns-3-...@googlegroups.com
Hi, 
I have this problem in execute DCBRP.cc 

How can I fix it? 

Yasameen Kh. Abbas:
./scratch/DCBRP.cc: In function ‘int main(int, char**)’:
../scratch/DCBRP.cc:501:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
  501 |   { if ((live[n]==0) && (live[n+10]==0) && (live[n+20]==0))
      |     ^~
../scratch/DCBRP.cc:503:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  503 |    if (((EreNode[n]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n))))) >= (EreNode[n+10]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n+10)))))) && ((EreNode[n]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n))))) >= (EreNode[n+20]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n+20)))))))
      |    ^~
../scratch/DCBRP.cc:537:4: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
  537 |   {if ((live[n]==0) && (live[n+10]==0) && (live[n+20]==0))
      |    ^~
../scratch/DCBRP.cc:539:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  539 |    if (((EreNode[n]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n))))) >= (EreNode[n+10]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n+10)))))) && ((EreNode[n]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n))))) >= (EreNode[n+20]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n+20)))))))
      |    ^~
../scratch/DCBRP.cc:568:6: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
  568 |     {if ((live[n]==0) && (live[n+10]==0) && (live[n+20]==0))
      |      ^~
../scratch/DCBRP.cc:570:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  570 |      if (((EreNode[n]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n))))) >= (EreNode[n+10]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n+10)))))) && ((EreNode[n]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n))))) >= (EreNode[n+20]/(sqrt(mobility.GetDistanceSquaredBetween(SN.Get(nhc),SN.Get(n+20)))))))
      |      ^~
../scratch/DCBRP.cc:1113:26: error: ‘Default’ is not a member of ‘ns3::WifiHelper’
 1113 | wifiBS[w1] = WifiHelper::Default ();
      |                          ^~~~~
../scratch/DCBRP.cc:1125:24: error: ‘Default’ is not a member of ‘ns3::WifiHelper’
 1125 | wifi[w2] = WifiHelper::Default ();
      |                        ^~~
../scratch/DCBRP.cc:1132:3: error: ‘NqosWifiMacHelper’ was not declared in this scope
 1132 |   NqosWifiMacHelper* macBS = new NqosWifiMacHelper[3];
      |   ^~~~~~~~~~~~~
../scratch/DCBRP.cc:1132:22: error: ‘macBS’ was not declared in this scope
 1132 |   NqosWifiMacHelper* macBS = new NqosWifiMacHelper[3];
      |                      ^
../scratch/DCBRP.cc:1132:34: error: ‘NqosWifiMacHelper’ does not name a type
 1132 |   NqosWifiMacHelper* macBS = new NqosWifiMacHelper[3];
      |                                  ^~~~~~~~~~~~~
../scratch/DCBRP.cc:1134:16: error: ‘NqosWifiMacHelper’ is not a class, namespace, or enumeration
 1134 |     macBS[m] = NqosWifiMacHelper::Default ();
      |                ^~~~~~~~~~~~~
../scratch/DCBRP.cc:1139:20: error: ‘mac’ was not declared in this scope; did you mean ‘ac’?
 1139 | NqosWifiMacHelper* mac = new NqosWifiMacHelper[87];
      |                    ^
      |                    ac
../scratch/DCBRP.cc:1139:30: error: ‘NqosWifiMacHelper’ does not name a type
 1139 | NqosWifiMacHelper* mac = new NqosWifiMacHelper[87];
      |                              ^~~~~~~~~~~~~~~
../scratch/DCBRP.cc:1142:17: error: ‘NqosWifiMacHelper’ is not a class, namespace, or enumeration
 1142 |       mac[m2] = NqosWifiMacHelper::Default ();
      |                 ^~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Waf: Leaving directory `/home/ubuntu/ns-allinone-3.31/ns-3.31/build'
Build failed
 -> task in 'DCBRP' failed with exit status 1 (run with -v to display more information)
Traceback (most recent call last):
  File "./build.py", line 175, in <module>
    sys.exit(main(sys.argv))
  File "./build.py", line 166, in main
    build_ns3(config, build_examples, build_tests, args, build_options)
  File "./build.py", line 86, in build_ns3
    run_command([sys.executable, "waf", "build"] + build_options)
  File "/home/ubuntu/ns-allinone-3.31/util.py", line 25, in run_command
    raise CommandError("Command %r exited with code %i" % (argv, retval))
util.CommandError: Command ['/usr/bin/python3', 'waf', 'build'] exited with code 1
Reply all
Reply to author
Forward
0 new messages