Hello, I'm new to ns-3 and currently working on the
first.cc file. From the logging module that is from lines 41,42, I am able to print the time and details as well. Now my objective is to get the RTT from the code. I've now changed the number of packets to 5, still, the RTT is the same so I was wondering is there a way to print that value only (eg 0.512) and not the rest of the statement.
To elaborate; This is a sample output from the code.
At time +2s client sent 1024 bytes to 10.1.1.2 port 9
At time +2.25732s server received 1024 bytes from 10.1.1.1 port 49153
At time +2.25732s server sent 1024 bytes to 10.1.1.1 port 49153
At time +2.51465s client received 1024 bytes from 10.1.1.2 port 9
I only want the difference between 2.51465 and 2 as output. Is there a way to do this? My initial intuition was to apply to slice but since I can't individually get the messages I am not able to do it. Any help is appreciated.
Thanks and regards,
Anandakrishnan