|
|
@ -11,9 +11,8 @@ AddrType = Tuple[int, Optional[int]] |
|
|
|
EcuAddrBusType = Tuple[int, Optional[int], int] |
|
|
|
EcuAddrBusType = Tuple[int, Optional[int], int] |
|
|
|
EcuAddrSubAddr = Tuple[int, int, Optional[int]] |
|
|
|
EcuAddrSubAddr = Tuple[int, int, Optional[int]] |
|
|
|
|
|
|
|
|
|
|
|
LIVE_FW_VERSIONS = Dict[AddrType, Set[bytes]] |
|
|
|
LiveFwVersions = Dict[AddrType, Set[bytes]] |
|
|
|
OFFLINE_FW_VERSIONS = Dict[str, Dict[EcuAddrSubAddr, List[bytes]]] |
|
|
|
OfflineFwVersions = Dict[str, Dict[EcuAddrSubAddr, List[bytes]]] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def p16(val): |
|
|
|
def p16(val): |
|
|
|
return struct.pack("!H", val) |
|
|
|
return struct.pack("!H", val) |
|
|
@ -83,7 +82,7 @@ class FwQueryConfig: |
|
|
|
extra_ecus: List[Tuple[capnp.lib.capnp._EnumModule, int, Optional[int]]] = field(default_factory=list) |
|
|
|
extra_ecus: List[Tuple[capnp.lib.capnp._EnumModule, int, Optional[int]]] = field(default_factory=list) |
|
|
|
# Function a brand can implement to provide better fuzzy matching. Takes in FW versions, |
|
|
|
# Function a brand can implement to provide better fuzzy matching. Takes in FW versions, |
|
|
|
# returns set of candidates. Only will match if one candidate is returned |
|
|
|
# returns set of candidates. Only will match if one candidate is returned |
|
|
|
match_fw_to_car_fuzzy: Optional[Callable[[LIVE_FW_VERSIONS, OFFLINE_FW_VERSIONS], Set[str]]] = None |
|
|
|
match_fw_to_car_fuzzy: Optional[Callable[[LiveFwVersions, OfflineFwVersions], Set[str]]] = None |
|
|
|
|
|
|
|
|
|
|
|
def __post_init__(self): |
|
|
|
def __post_init__(self): |
|
|
|
for i in range(len(self.requests)): |
|
|
|
for i in range(len(self.requests)): |
|
|
|