Hi.. I am getting a termination error while trying to add the X2 interface with signal SIGSEGV. Below is the code:#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/lte-module.h"
#include "ns3/config-store.h"
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/lte-module.h"
#include "ns3/config-store.h"
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/lte-phy.h>
#include <ns3/ff-mac-common.h>
#include <ns3/lte-control-messages.h>
#include <ns3/lte-amc.h>
#include <ns3/lte-ue-phy-sap.h>
#include <ns3/lte-ue-cphy-sap.h>
#include <ns3/ptr.h>
#include <ns3/lte-amc.h>
#include <ns3/lte-ue-phy.h>
#include <ns3/phy-stats-calculator.h>
#include <ns3/mobility-building-info.h>
#include <ns3/buildings-propagation-loss-model.h>
#include <ns3/building.h>
#include <ns3/lte-enb-rrc.h>
#include <iomanip>
#include <string>
#include<ns3/epc-x2-header.h>
#include<ns3/epc-x2-sap.h>
#include </usr/include/c++/4.6/bits/stl_vector.h>
using namespace ns3;
int main (int argc, char * argv[])
{
//CommandLine cmd;
//cmd.Parse (argc, argv);
//ConfigStore inputConfig;
//inputConfig.ConfigureDefaults ();
//parse again so you can override default values from the command line
//cmd.Parse (argc, argv);
// Create a LteHelper Object
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
// Create Node Objects for eNB(s) and UEs
NodeContainer enbNodes;
enbNodes.Create (2);
NodeContainer ueNodes1,ueNodes2;
ueNodes1.Create(1);
ueNodes2.Create(1);
// Configure the Mobility model for the eNB(s)
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
positionAlloc->Add (Vector(0.0,0.0,0.0));
positionAlloc->Add (Vector(100.0,0.0,0.0));
MobilityHelper mobility;
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.SetPositionAllocator(positionAlloc);
mobility.Install(enbNodes);
//Position of Ue attached to eNB1
MobilityHelper ue1mobility;
ue1mobility.SetPositionAllocator("ns3::UniformDiscPositionAllocator", "X", DoubleValue(0.0), "Y", DoubleValue(0.0), "rho", DoubleValue(50.0));
ue1mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
ue1mobility.Install(ueNodes1);
MobilityHelper ue2mobility;
ue2mobility.SetPositionAllocator("ns3::UniformDiscPositionAllocator", "X", DoubleValue(100.0), "Y", DoubleValue(0.0), "rho", DoubleValue(50.0));
ue2mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
ue2mobility.Install(ueNodes2);
// Install an LTE protocol stack on the eNB(s)
NetDeviceContainer enbDevs;
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
// Install an LTE protocol stack on the UEs
NetDeviceContainer ueDevs1, ueDevs2;
ueDevs1 = lteHelper->InstallUeDevice (ueNodes1);
ueDevs2 = lteHelper->InstallUeDevice (ueNodes2);
// Attach the Ues to an eNB.This will configure each UE according to the eNB configuration, and create an RRC connection between them
lteHelper->Attach (ueDevs1, enbDevs.Get(0));
lteHelper->Attach (ueDevs2, enbDevs.Get(1));
//Activate an EPS Bearer including te setup of the Radio Bearer between an eNB and its attached UE
enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
EpsBearer bearer (q);
lteHelper->ActivateDataRadioBearer (ueDevs1, bearer);
lteHelper->ActivateDataRadioBearer (ueDevs2, bearer);
//Add X2 interface between two eNBs
lteHelper->AddX2Interface (enbNodes);
// Set the stop time
Simulator::Stop (Seconds (0.05));
lteHelper->EnablePhyTraces();
lteHelper->EnableMacTraces();
lteHelper->EnableRlcTraces();
lteHelper->EnablePdcpTraces();
// Run the simulation
Simulator::Run();
// Cleanup and exit
Simulator::Destroy ();
return 0;
}
Actual Error : Waf: Entering directory `/home/mimoon/workspace/ns-allinone-3.18/ns-3.18/build'
Waf: Leaving directory `/home/mimoon/workspace/ns-allinone-3.18/ns-3.18/build'
'build' finished successfully (2.248s)
Command ['/home/mimoon/workspace/ns-allinone-3.18/ns-3.18/build/scratch/example'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
Please kindly help .