feat(usb-can): add isolated adapter runtime and confirmed CAN transactions

Package the adapter SDK boundary and runtime lifecycle. Confirm admitted CAN transactions, bound retained data and test failure paths with synthetic hardware.
This commit is contained in:
DCCONSTRUCTIONS
2026-10-29 09:09:59 +03:00
parent f32c7b400b
commit 8b210258ca
30 changed files with 3336 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
"""Checks loadability and exact ABI; does not enumerate or open USB."""
import hashlib
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent))
from runtime.sdk import library
path = Path("/usr/lib/mission-core-usb-can/sdk/libcontrolcanfd.so")
if (
hashlib.sha256(path.read_bytes()).hexdigest()
!= "3f4681c64b086ecd4bf538908e09ed5203a05286632c0d99485b88f9b069285c"
):
raise RuntimeError("Pinned USB-CAN SDK hash changed")
library(str(path))
print("USB-CAN SDK load and packed ABI verified; no hardware opened")