Skip to first unread message

Agung Arahman

unread,
May 3, 2017, 5:12:46 AM5/3/17
to ns-3-users
Hi sir can you tell me how to make 3 ltehelper in one script, and install it on one epc ??
Or i have to make also three epc to be able to run 3 ltehelper ??

I made three lte helper aiming to be able to set offset of each eNB

Tommaso Pecorella

unread,
May 3, 2017, 7:05:52 PM5/3/17
to ns-3-users
Hi,

to be honest your question is rather confused. Mind to explain your issue a in a clearer way ?
Probably I'll not be able to answer and you'll need an LTE maintainer, but clarity is the first step to have an answer.


Thanks,

T.

Agung Arahman

unread,
May 4, 2017, 6:44:58 AM5/4/17
to ns-3-users


On Wednesday, May 3, 2017 at 11:12:46 AM UTC+2, Agung Arahman wrote:
Hi sir can you tell me how to make 3 ltehelper in one script, and install it on one epc ??
Or i have to make also three epc to be able to run 3 ltehelper ??

I made three lte helper aiming to be able to set offset of each eNB
Ok sir i'm sorry if my question is confusing for you.
Let me explain again.This is my script, here i want to make three lte helper to install on one epc

 Ptr<LteHelper> lteHelper1 = CreateObject<LteHelper> ();
  lteHelper1->SetSchedulerType ("ns3::RrFfMacScheduler");
  lteHelper1->SetHandoverAlgorithmType ("ns3::A2A4RsrqHandoverAlgorithm");
  lteHelper1->SetHandoverAlgorithmAttribute ("ServingCellThreshold",
                                            UintegerValue (30));
  lteHelper->SetHandoverAlgorithmAttribute ("NeighbourCellOffset",
                                           UintegerValue (30));
                                            
   Ptr<LteHelper> lteHelper2 = CreateObject<LteHelper> ();
  lteHelper2->SetSchedulerType ("ns3::RrFfMacScheduler");
  lteHelper2->SetHandoverAlgorithmType ("ns3::A2A4RsrqHandoverAlgorithm");
  lteHelper2->SetHandoverAlgorithmAttribute ("ServingCellThreshold",
                                            UintegerValue (30));
  lteHelper->SetHandoverAlgorithmAttribute ("NeighbourCellOffset",
                                          UintegerValue (30);
                                          
   Ptr<LteHelper> lteHelper3 = CreateObject<LteHelper> ();
  lteHelper3->SetSchedulerType ("ns3::RrFfMacScheduler");
  lteHelper3->SetHandoverAlgorithmType ("ns3::A2A4RsrqHandoverAlgorithm");
  lteHelper3->SetHandoverAlgorithmAttribute ("ServingCellThreshold",
                                            UintegerValue (30));
  lteHelper->SetHandoverAlgorithmAttribute ("NeighbourCellOffset",
                                         UintegerValue (30));   
                                                                                
  Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ();
  lteHelper1, lteHelper2, lteHelper3 ->SetEpcHelper (epcHelper);

But this script can not run, there is an error like this

../scratch/nyoba.cc: In function ‘int main(int, char**)’:
../scratch/nyoba.cc:174:3: error: ‘lteHelper’ was not declared in this scope
   lteHelper->SetHandoverAlgorithmAttribute ("NeighbourCellOffset",
   ^
../scratch/nyoba.cc:183:61: error: expected ‘)’ before ‘;’ token
                                           UintegerValue (30);
                                                             ^
../scratch/nyoba.cc:194:15: error: left operand of comma operator has no effect [-Werror=unused-value]
   lteHelper1, lteHelper2, lteHelper3 ->SetEpcHelper (epcHelper);
               ^
../scratch/nyoba.cc:194:63: error: right operand of comma operator has no effect [-Werror=unused-value]
   lteHelper1, lteHelper2, lteHelper3 ->SetEpcHelper (epcHelper);
                                                               ^
../scratch/nyoba.cc:318:35: error: conversion from ‘ns3::Ptr<ns3::LteHelper>’ to non-scalar type ‘ns3::NetDeviceContainer’ requested
   NetDeviceContainer enbLteDevs = lteHelper1, lteHelper2, lteHelper3 ->InstallEnbDevice (enbNodes);
                                   ^
../scratch/nyoba.cc:318:47: error: conflicting declaration ‘ns3::NetDeviceContainer lteHelper2’
   NetDeviceContainer enbLteDevs = lteHelper1, lteHelper2, lteHelper3 ->InstallEnbDevice (enbNodes);
                                               ^
../scratch/nyoba.cc:177:19: note: previous declaration as ‘ns3::Ptr<ns3::LteHelper> lteHelper2’
    Ptr<LteHelper> lteHelper2 = CreateObject<LteHelper> ();
                   ^
../scratch/nyoba.cc:318:70: error: expected initializer before ‘->’ token
   NetDeviceContainer enbLteDevs = lteHelper1, lteHelper2, lteHelper3 ->InstallEnbDevice (enbNodes);
                                                                      ^
../scratch/nyoba.cc:319:34: error: conversion from ‘ns3::Ptr<ns3::LteHelper>’ to non-scalar type ‘ns3::NetDeviceContainer’ requested
   NetDeviceContainer ueLteDevs = lteHelper1, lteHelper2, lteHelper3 ->InstallUeDevice (ueNodes);
                                  ^
../scratch/nyoba.cc:319:46: error: conflicting declaration ‘ns3::NetDeviceContainer lteHelper2’
   NetDeviceContainer ueLteDevs = lteHelper1, lteHelper2, lteHelper3 ->InstallUeDevice (ueNodes);
                                              ^
../scratch/nyoba.cc:177:19: note: previous declaration as ‘ns3::Ptr<ns3::LteHelper> lteHelper2’
    Ptr<LteHelper> lteHelper2 = CreateObject<LteHelper> ();
                   ^
../scratch/nyoba.cc:319:69: error: expected initializer before ‘->’ token
   NetDeviceContainer ueLteDevs = lteHelper1, lteHelper2, lteHelper3 ->InstallUeDevice (ueNodes);
                                                                     ^
../scratch/nyoba.cc:387:23: error: left operand of comma operator has no effect [-Werror=unused-value]
           lteHelper1, lteHelper2, lteHelper3 ->ActivateDedicatedEpsBearer (ueLteDevs.Get (u), bearer, tft);
                       ^
../scratch/nyoba.cc:387:106: error: right operand of comma operator has no effect [-Werror=unused-value]
           lteHelper1, lteHelper2, lteHelper3 ->ActivateDedicatedEpsBearer (ueLteDevs.Get (u), bearer, tft);
                                                                                                          ^
../scratch/nyoba.cc:400:15: error: left operand of comma operator has no effect [-Werror=unused-value]
   lteHelper1, lteHelper2, lteHelper3 ->AddX2Interface (enbNodes);
               ^
../scratch/nyoba.cc:400:64: error: right operand of comma operator has no effect [-Werror=unused-value]
   lteHelper1, lteHelper2, lteHelper3 ->AddX2Interface (enbNodes);
                                                                ^
../scratch/nyoba.cc:420:13: error: left operand of comma operator has no effect [-Werror=unused-value]
 lteHelper1, lteHelper2, lteHelper3 ->EnablePhyTraces ();
             ^
../scratch/nyoba.cc:420:55: error: right operand of comma operator has no effect [-Werror=unused-value]
 lteHelper1, lteHelper2, lteHelper3 ->EnablePhyTraces ();
                                                       ^
../scratch/nyoba.cc:421:15: error: left operand of comma operator has no effect [-Werror=unused-value]
   lteHelper1, lteHelper2, lteHelper3 ->EnableMacTraces ();
               ^
../scratch/nyoba.cc:421:57: error: right operand of comma operator has no effect [-Werror=unused-value]
   lteHelper1, lteHelper2, lteHelper3 ->EnableMacTraces ();
                                                         ^
../scratch/nyoba.cc:422:15: error: left operand of comma operator has no effect [-Werror=unused-value]
   lteHelper1, lteHelper2, lteHelper3 ->EnableRlcTraces ();
               ^
../scratch/nyoba.cc:422:57: error: right operand of comma operator has no effect [-Werror=unused-value]
   lteHelper1, lteHelper2, lteHelper3 ->EnableRlcTraces ();
                                                         ^
../scratch/nyoba.cc:423:15: error: left operand of comma operator has no effect [-Werror=unused-value]
   lteHelper1, lteHelper2, lteHelper3 ->EnablePdcpTraces ();
               ^
../scratch/nyoba.cc:423:58: error: right operand of comma operator has no effect [-Werror=unused-value]
   lteHelper1, lteHelper2, lteHelper3 ->EnablePdcpTraces ();
                                                          ^
../scratch/nyoba.cc:424:58: error: conflicting declaration ‘ns3::Ptr<ns3::RadioBearerStatsCalculator> lteHelper2’
   Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper1, lteHelper2, lteHelper3 ->GetRlcStats ();
                                                          ^
../scratch/nyoba.cc:177:19: note: previous declaration as ‘ns3::Ptr<ns3::LteHelper> lteHelper2’
    Ptr<LteHelper> lteHelper2 = CreateObject<LteHelper> ();
                   ^
../scratch/nyoba.cc:424:81: error: expected initializer before ‘->’ token
   Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper1, lteHelper2, lteHelper3 ->GetRlcStats ();
                                                                                 ^
../scratch/nyoba.cc:426:59: error: conflicting declaration ‘ns3::Ptr<ns3::RadioBearerStatsCalculator> lteHelper2’
   Ptr<RadioBearerStatsCalculator> pdcpStats = lteHelper1, lteHelper2, lteHelper3 ->GetPdcpStats ();
                                                           ^
../scratch/nyoba.cc:177:19: note: previous declaration as ‘ns3::Ptr<ns3::LteHelper> lteHelper2’
    Ptr<LteHelper> lteHelper2 = CreateObject<LteHelper> ();
                   ^
../scratch/nyoba.cc:426:82: error: expected initializer before ‘->’ token
   Ptr<RadioBearerStatsCalculator> pdcpStats = lteHelper1, lteHelper2, lteHelper3 ->GetPdcpStats ();
                                                                                  ^
In file included from ./ns3/animation-interface.h:30:0,
                 from ./ns3/netanim-module.h:10,
                 from ../scratch/nyoba.cc:20:
./ns3/ptr.h: In instantiation of ‘ns3::Ptr<T>::Ptr(const ns3::Ptr<U>&) [with U = ns3::LteHelper; T = ns3::RadioBearerStatsCalculator]’:
../scratch/nyoba.cc:424:46:   required from here
./ns3/ptr.h:746:27: error: cannot convert ‘ns3::LteHelper*’ to ‘ns3::RadioBearerStatsCalculator*’ in initialization
   : m_ptr (PeekPointer (o))
                           ^
cc1plus: all warnings being treated as errors


Konstantinos

unread,
May 4, 2017, 6:54:03 AM5/4/17
to ns-3-users
Hi,

The error is simply a typo error. You are using lteHelper1,2,3 and in the Handover Algorithm you use lteHelper (without a number).
I do not understand why there is a need to create 3 helpers in the first place. The configuration of the three are the same.
Also this command "  lteHelper1, lteHelper2, lteHelper3 ->SetEpcHelper (epcHelper);"  is in principle wrong. 
It looks like you do not have the basic understanding of programming.

Regards,
Message has been deleted

Agung Arahman

unread,
May 4, 2017, 7:40:49 AM5/4/17
to ns-3-users
Ok sir thanks,
Yes i was just studying this ns3 about a week ago,
I was asked by my teacher to make three lte helper for each enb to have different offset configuration
Can show you the correct writing of the script?

"  lteHelper1, lteHelper2, lteHelper3 ->SetEpcHelper (epcHelper);"

Reply all
Reply to author
Forward
0 new messages