Thanks for the suggestions. I am very sure I have not changed the source code. I tried doing with NS 3.23. It started giving me a new error. I would show the error below. And one more thing which I wanted to mention is if I again change back to ConstantRandomVariable it keeps giving me the previous error which I posted. I am pretty new to NS3 and C++. So the way I have understood is if I use ConstantRandomVariable[Constant = 4] for ON time, it sends packets for a time equal to 4. Is this right? Thank You.
The error which I am getting now is this one: I am sure I did not change anything there,
../scratch/nin.cc: In function ‘void BuildAppsTest(uint32_t)’:
../scratch/nin.cc:120:31: error: ‘sink_start_time’ was not declared in this scope
sinkApp.Start (Seconds (sink_start_time));
^
../scratch/nin.cc: In function ‘int main(int, char**)’:
../scratch/nin.cc:186:3: error: ‘sink_start_time’ was not declared in this scope
sink_start_time = global_start_time;
^
Waf: Leaving directory `/home/niranjan/Old ns-allinone-3.21/ns-3.21/build'
Build failed
-> task in 'nin' failed (exit status 1):
{task 140166818254736: cxx nin.cc -> nin.cc.6.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-I.', '-I..', '-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_IF_TUN_H=1', '../scratch/nin.cc', '-c', '-o', 'scratch/nin.cc.6.o']
I tried doing with NS 3.23 it gives me the same error. Thank you.