Referring to the ns3 manual section 9.4.1 Pcap Tracing Device Helper, I tried to look at other possible ways and I added the following lines of codes to the lena-x2-handover-measures.cc script:
PcapHelperForDevice helper;
helper.EnablePcap ("enb", enbLteDevs, true);
helper.EnablePcap ("ue", ueLteDevs, true);
However, the following output error message is produced:
ubuntu@ubuntu-Lenovo-G500s:~/ns3-lte-new/lena$ ./waf
Waf: Entering directory `/home/ubuntu/ns3-lte-new/lena/build'
[ 803/2067] cxx: scratch/trial-x2-handover-measures.cc -> build/scratch/trial-x2-handover-measures.cc.2.o
../scratch/trial-x2-handover-measures.cc: In function ‘int main(int, char**)’:
../scratch/trial-x2-handover-measures.cc:348:23: error: cannot declare variable ‘helper’ to be of abstract type ‘ns3::PcapHelperForDevice’
In file included from ./ns3/network-module.h:70:0,
from ../scratch/trial-x2-handover-measures.cc:22:
./ns3/trace-helper.h:323:7: note: because the following virtual functions are pure within ‘ns3::PcapHelperForDevice’:
./ns3/trace-helper.h:345:16: note: virtual void ns3::PcapHelperForDevice::EnablePcapInternal(std::string, ns3::Ptr<ns3::NetDevice>, bool, bool)
Waf: Leaving directory `/home/ubuntu/ns3-lte-new/lena/build'
Build failed
-> task in 'trial-x2-handover-measures' failed (exit status 1):
{task 48456208: cxx trial-x2-handover-measures.cc -> trial-x2-handover-measures.cc.2.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-I.', '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/pango-1.0', '-I/usr/include/gio-unix-2.0', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/pixman-1', '-I/usr/include/freetype2', '-I/usr/include/libpng12', '-I/usr/include/harfbuzz', '-I/usr/include/libxml2', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_SQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_GSL=1', '../scratch/trial-x2-handover-measures.cc', '-c', '-o', 'scratch/trial-x2-handover-measures.cc.2.o']
Can someone help.