hello everybody,
The attachment is my code. I want to use ns3 and python to do a joint simulation and use ns3 as a network tool for sending and receiving packets. For example, ns3 will feedback to python through socket whether a packet is sent successfully and the time it is received.
In my code, the method "PauseSimulation" is called every millisecond. In the method, some information is received from the python through Socket to control ns3, such as "space_info", and "pkg_info". These values are used to control the position and packet sending of nodes in ns3 respectively. .
How should I specifically trace the data packets?
Let the sending and receiving information correspond to the specific data packets. For example, node A sends a data packet to node B at 1ms and it is received at 2ms. My ns3 needs to feed back to python through Socket about this packet, and the feedback information needs to be related to the specific data packets Correspond.
I'd like to see some discussion and help
Thanks for everyone!