refactor: implement packet parsing heuristics and introduce device-level state caching to throttle database writes and vitals updates

This commit is contained in:
2026-07-11 14:24:14 +05:30
parent a4972b3251
commit 84b8acc904
32 changed files with 3499 additions and 180 deletions
+11
View File
@@ -0,0 +1,11 @@
import re
from collections import Counter
with open("/home/prathiyuman/Prathiyuman/ContecMonitor/fiveparaminte-main/hl7_forwarder.log", "r") as f:
content = f.read()
warnings = re.findall(r"unrecognized. Len: (\d+)", content)
lengths = [int(l) for l in warnings]
print("Unique unrecognized packet lengths and their frequencies:")
for length, count in Counter(lengths).most_common():
print(f" Length {length}: {count} times")