Generation of REM with LTE

347 views
Skip to first unread message

Bob

unread,
Dec 12, 2014, 12:26:35 PM12/12/14
to ns-3-...@googlegroups.com
I'm trying to generate the REM map with the LTE module, with something like this (right before running the simulation):

    Ptr<RadioEnvironmentMapHelper> remHelper = CreateObject<RadioEnvironmentMapHelper> ();
    remHelper->SetAttribute("StopWhenDone", BooleanValue(false));
    if( doRem == true )
    {    
        std::cout << "Generating Radio Environment Map" << '\n';
        remHelper->SetAttribute("ChannelPath", StringValue("/ChannelList/0"));
        remHelper->SetAttribute("OutputFile", StringValue("./rem.out"));
        remHelper->SetAttribute("XMin", DoubleValue(0.0));
        remHelper->SetAttribute("XMax", DoubleValue(x_distance));
        remHelper->SetAttribute("YMin", DoubleValue(0.0));
        remHelper->SetAttribute("YMax", DoubleValue(y_distance));
        remHelper->SetAttribute("Z", DoubleValue(0.0));  // to change 
        remHelper->SetAttribute("StopWhenDone", BooleanValue(true));
        remHelper->SetAttribute ("UseDataChannel", BooleanValue (true));
        remHelper->Install();
    }

but I'm getting this error:
aborted. cond="m_channel == 0", msg="object at /ChannelList/0is not of type SpectrumChannel", file=../src/lte/helper/radio-environment-map-helper.cc, line=193
terminate called without an active exception


did I forget something?

Thanks,

Bob

unread,
Dec 12, 2014, 1:42:36 PM12/12/14
to ns-3-...@googlegroups.com
the issue is that channelpath number is not correct. If I use 1, it seems to be working. 

in general, how do I determine the correct number? Is there a macro for that?

Zoraze Ali

unread,
Dec 13, 2014, 6:14:43 AM12/13/14
to ns-3-...@googlegroups.com
Hi Bob,

If you search on the group with the same msg you got you can find the useful post. Below is the link to that and see the comments by Nicola i think they are helpful .

https://groups.google.com/forum/#!searchin/ns-3-users/msg$3D%22object$20at$20$2FChannelList$2F0is$20not$20of$20type$20SpectrumChannel%22/ns-3-users/AO2m9wIBMxY/em5GuNs7slQJ

regards,
Zoraze


Bob

unread,
Dec 15, 2014, 2:54:54 PM12/15/14
to ns-3-...@googlegroups.com
yes, I saw it after I post the message. 

Thank you

Yared Zerihun

unread,
Feb 10, 2016, 6:46:04 AM2/10/16
to ns-3-users
If the reply is not considered old,

I got the type of a channel by exploiting the number of NetworkDevices attached to that channel.
specifically,

1. get any channel from the ChannelList class
2. exploit the GetNDevices() method from the channel object obtained in 1
Reply all
Reply to author
Forward
0 new messages