[ndnSIM] ndnSIM - Producer problem

Spyridon (Spyros) Mastorakis mastorakis at cs.ucla.edu
Wed Jul 26 20:47:42 PDT 2017


this error tells you that the WifiMacHelper class has pure virtual member functions, therefore, you cannot declare a variable like that.

I would suggest you take a look at this C++ tutorial on abstract classes:

https://www.tutorialspoint.com/cplusplus/cpp_interfaces.htm <https://www.tutorialspoint.com/cplusplus/cpp_interfaces.htm>

Hope that this helps,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department

> On Jul 26, 2017, at 8:33 PM, Marzieh Babaeianjelodar <babaeim at clarkson.edu> wrote:
> I replaced the code for setting-up ad-hoc nodes in ndn-simple-wifi scenario but I get some errors about the scope. Is there any type of library required that I should include?
> my errors:
> marzieh at marzieh-VirtualBox:~/ndnSIM/ns-3$ ./waf --run=ad-hoc-marzieh --vis
> Waf: Entering directory `/home/marzieh/ndnSIM/ns-3/build'
> [2358/2949] Compiling src/ndnSIM/examples/ad-hoc-marzieh.cpp
> ../src/ndnSIM/examples/ad-hoc-marzieh.cpp: In function ‘int ns3::main(int, char**)’:
> ../src/ndnSIM/examples/ad-hoc-marzieh.cpp:44:17: error: cannot declare variable ‘wifiMac’ to be of abstract type ‘ns3::WifiMacHelper’
>    WifiMacHelper wifiMac;
>                  ^~~~~~~
> In file included from ./ns3/ht-wifi-mac-helper.h:24:0,
>                  from ./ns3/wifi-module.h:35,
>                  from ../src/ndnSIM/examples/ad-hoc-marzieh.cpp:4:
> ./ns3/wifi-helper.h:75:7: note:   because the following virtual functions are pure within ‘ns3::WifiMacHelper’:
>  class WifiMacHelper
>        ^~~~~~~~~~~~~
> ./ns3/wifi-helper.h:85:24: note:     virtual ns3::Ptr<ns3::WifiMac> ns3::WifiMacHelper::Create() const
>    virtual Ptr<WifiMac> Create (void) const = 0;
>                         ^~~~~~
> ../src/ndnSIM/examples/ad-hoc-marzieh.cpp:47:11: error: ‘class ns3::WifiMacHelper’ has no member named ‘SetType’
>    wifiMac.SetType ("ns3::AdhocWifiMac");
>            ^~~~~~~
>> On Jul 26, 2017, at 10:21 PM, Marzieh Babaeianjelodar <babaeim at clarkson.edu <mailto:babaeim at clarkson.edu>> wrote:
>> Hi Junxiao,
>> I was wondering how to configure my scenario to ad-hoc? I used the ndn-simple-wifi and added waypoints to my scenario.
>> Best Regards,
>> Marzieh
>>> On Jul 24, 2017, at 3:04 PM, Junxiao Shi <shijunxiao at email.arizona.edu <mailto:shijunxiao at email.arizona.edu>> wrote:
>>> Hi Marzieh
>>> Can you confirm the producer node and producer app has received the Interest?
>>> If the Interest isn't received, it obviously won't reply with Data.
>>> Interest forwarding requires FIB entries.
>>> Additionally, if this scenario is wireless, node 1 and node 2 either needs to have its wireless interface configured as "ad hoc wireless" rather than "broadcast" mode, or use two separate interfaces to associate with the left neighbor and the right neighbor. It is much easier to wired links.
>>> Yours, Junxiao
>>> On Jul 24, 2017 11:58, "Marzieh Babaeianjelodar" <babaeim at clarkson.edu <mailto:babaeim at clarkson.edu>> wrote:
>>> Yes, I mean it is not replying with a data when it is some hops away. Why isn't it replying with a data?
>>> I got those results by the NS_LOG command.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170726/fdcb6683/attachment-0001.html>

More information about the ndnSIM mailing list