Separate JBD decoding from serial transport

Move response decoding into jbd_proto and the data container into jbd_snapshot. Preserve the existing jbd_bms imports and test the transport boundary.
This commit is contained in:
tim
2026-10-08 14:09:05 +02:00
parent 3422742204
commit 5fa6000c70
5 changed files with 454 additions and 420 deletions
+4 -2
View File
@@ -1,13 +1,15 @@
import pytest
from unittest.mock import MagicMock, patch
from bmspy.jbd_bms import (
JBDBMS,
from bmspy.jbd_snapshot import JBDBMS
from bmspy.jbd_proto import (
bytes_to_digits,
bytes_to_date,
convert_to_signed,
verify_checksum,
parse_03_response,
parse_04_response,
)
from bmspy.jbd_bms import (
requestMessage,
serial_cleanup,
collect_data,