达到“研究级技术报告”水准

This commit is contained in:
sinlatansen
2026-02-25 19:40:42 +08:00
parent d357a25076
commit 8537331c6f
3 changed files with 387 additions and 24 deletions

View File

@@ -273,6 +273,10 @@ class MetricsCollector:
"""Record hop count for a packet."""
self.metrics.hop_counts.append(hops)
def record_packet_received(self, src: int, seq: int):
"""Record a packet received at sink (for PDR calculation)."""
self.metrics.received_packet_ids.add((src, seq))
# =========================================================================
# Channel Utilization Tracking
# =========================================================================