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
@@ -0,0 +1,18 @@
import sqlite3
def main():
conn = sqlite3.connect("hl7_forwarder.db")
cursor = conn.cursor()
try:
cursor.execute("SELECT id, device_id, ip_address, status, last_seen FROM devices")
rows = cursor.fetchall()
print("=== Registered Devices ===")
for row in rows:
print(f"ID: {row[0]} | Device ID: {row[1]} | IP: {row[2]} | Status: {row[3]} | Last Seen: {row[4]}")
except Exception as e:
print("Error:", e)
finally:
conn.close()
if __name__ == "__main__":
main()