On 9/30/20 3:08 AM, ROCIO MARTINEZ MARTINEZ wrote:
>
> Hi everyone,
>
> When I run the following code, I get the next fail: assert failed.
> cond="uid <= m_information.size () && uid != 0",
> file=../src/core/model/type-id.cc, line=458
> terminate called without an active exception
>
> The thing is that when I run the same code but using the Yans Module
> instead of the Spectrum one I get the program is runing okey. I only
> change the YansWifiPhyHelper for the SpectrumWifiPhyHelper, and the
> YansWifiChannelHelper for the SpectrumChannelHelper
The above error message is typically due to trying to create an object
from an object factory that hasn't been set with a TypeId yet.
For instance, if you forgot to do this:
SpectrumChannelHelper SpChannel1 = SpectrumChannelHelper::Default();
and instead did this:
SpectrumChannelHelper SpChannel1;
Ptr<SpectrumChannel> SpChannelsm1 = SpChannel1.Create();
you may get this error.
Note, if you had this line of code:
YansWifiChannelHelper wifiChannel;
and just changed it to
SpectrumChannelHelper wifiChannel;
and tried to use it that way, you would get such an error. The
SpectrumChannelHelper requires calling Default() or otherwise setting
the channel type ID explicitly.
Regarding your other error with global routing, I do not know offhand,
but please note that Ipv4GlobalRouting is designed to work with wired
and not wireless links. If you need IP routing over Wi-Fi networks, you
should consider to use OLSR.
- Tom
> --
> 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
> <mailto:
ns-3-users+...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/ns-3-users/e3965e6e-4ef0-486c-a9b6-a4686cb81047n%40googlegroups.com
> <
https://groups.google.com/d/msgid/ns-3-users/e3965e6e-4ef0-486c-a9b6-a4686cb81047n%40googlegroups.com?utm_medium=email&utm_source=footer>.