Hi Tommasso,
I have tried your suggestion.........StopApplication() gets called but flow is not stopped.See run logs highlighted below and small script attached --
sourav@sourav-MacBookPro:~/Desktop/research/ns-allinone-3.26/ns-3.26$ ./waf --run "scratch/tempII --numberOfNodes=6"
Waf: Entering directory `/home/sourav/Desktop/research/ns-allinone-3.26/ns-3.26/build'
[1767/1926] Compiling scratch/tempII.cc
[1874/1926] Linking build/scratch/tempII
Waf: Leaving directory `/home/sourav/Desktop/research/ns-allinone-3.26/ns-3.26/build'
Build commands will be stored in build/compile_commands.json
'build' finished successfully (5.712s)
StartApplication() called
0xd5f590
Number of apps in sinkApps_lte_data is 2
Number of apps in onOffApp_lte_data is 2
ueNodeNumberData value is 4
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 1153
Rx Packets = 1127
Throughput: 11702.8 Kbps
Number of apps in sinkApps_lte_data is 3
Number of apps in onOffApp_lte_data is 3
ueNodeNumberData value is 5
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 2307
Rx Packets = 2281
Throughput: 11837.8 Kbps
StartApplication() called
0xe347e0
Can't add more Data flows
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 3461
Rx Packets = 3433
Throughput: 11879.9 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 1153
Rx Packets = 1138
Throughput: 11817 Kbps
Can't add more Data flows
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 4615
Rx Packets = 4588
Throughput: 11905.7 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 2307
Rx Packets = 2292
Throughput: 11894.9 Kbps
StartApplication() called
0xe596a0
Can't add more Data flows
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 5769
Rx Packets = 5679
Throughput: 11790.7 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 3461
Rx Packets = 3415
Throughput: 11813.6 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 1153
Rx Packets = 1065
Throughput: 11070 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 6923
Rx Packets = 6778
Throughput: 11722 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 4615
Rx Packets = 4543
Throughput: 11788.9 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 2307
Rx Packets = 2137
Throughput: 11101.6 Kbps
:
:
StopApplication() called
0xd5f590
closing socket
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 10384
Rx Packets = 10210
Throughput: 11772.3 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 8076
Rx Packets = 7580
Throughput: 11236 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11365
Throughput: 11792.2 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 9230
Rx Packets = 8732
Throughput: 11329.8 Kbps
StopApplication() called
0xe347e0
closing socket
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 10384
Rx Packets = 9889
Throughput: 11400.9 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11043
Throughput: 11458.1 Kbps
StopApplication() called
0xe596a0
closing socket
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11058
Throughput: 11458.8 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11058
Throughput: 11458.8 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11058
Throughput: 11458.8 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11058
Throughput: 11458.8 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11058
Throughput: 11458.8 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11058
Throughput: 11458.8 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11058
Throughput: 11458.8 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11058
Throughput: 11458.8 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11058
Throughput: 11458.8 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11058
Throughput: 11458.8 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380
Throughput: 11792.4 Kbps
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.7
Tx Packets = 11538
Rx Packets = 11058
Throughput: 11458.8 Kbps
Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.5
Tx Packets = 11538
Rx Packets = 11195
Throughput: 11598.4 Kbps
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.6
Tx Packets = 11538
Rx Packets = 11380