The buffer is no longer a logical entity, but a virtual buffer containing different "Notification" packets.
Therefore, when a new packet is generated, a corresponding Notification must be put in the buffer with the corresponding timestamp and packet id.
The current code strongly relies on counters like packet_id and num_packets_in_buffer . Fix it accordingly.
The buffer is no longer a logical entity, but a virtual buffer containing different "Notification" packets. Therefore, when a new packet is generated, a corresponding Notification must be put in the buffer with the corresponding timestamp and packet id.
The current code strongly relies on counters like
packet_id
andnum_packets_in_buffer
. Fix it accordingly.