scapy.contrib.automotive.obd.scanner
- class scapy.contrib.automotive.obd.scanner.OBD_Enumerator[源代码]
-
- property filtered_results: List[_AutomotiveTestCaseFilteredScanResult]
- class scapy.contrib.automotive.obd.scanner.OBD_Scanner(socket: SuperSocket | SingleConversationSocket, reset_handler: Callable[[], None] | None = None, reconnect_handler: Callable[[], SuperSocket | SingleConversationSocket] | None = None, test_cases: List[AutomotiveTestCaseABC | Type[AutomotiveTestCaseABC]] | None = None, **kwargs: Dict[str, Any] | None)[源代码]
-
- property default_test_case_clss: List[Type[AutomotiveTestCaseABC]]
- property enumerators: List[AutomotiveTestCaseABC]
- class scapy.contrib.automotive.obd.scanner.OBD_Service_Enumerator[源代码]
-
Base class for OBD_Service_Enumerators
- execute(socket: SuperSocket | SingleConversationSocket, state: EcuState, **kwargs: Any) None [源代码]
- 参数:
timeout (integer or float) -- Timeout until a response will arrive after a request
count (integer) -- Number of request to be sent in one execution
execution_time (int) -- Time in seconds until the execution of this enumerator is stopped.
state_allow_list (EcuState or list) -- List of EcuState objects or EcuState object in which the the execution of this enumerator is allowed. If provided, other states will not be executed.
state_block_list (EcuState or list) -- List of EcuState objects or EcuState object in which the the execution of this enumerator is blocked.
retry_if_none_received (bool) -- Specifies if a request will be send again, if None was received (usually because of a timeout).
exit_if_no_answer_received (bool) -- Specifies to finish the execution of this enumerator once None is received.
exit_if_service_not_supported (bool) -- Specifies to finish the execution of this enumerator, once the negative return code 'serviceNotSupported' is received.
exit_scan_on_first_negative_response (bool) -- Specifies to finish the execution once a negative response is received.
retry_if_busy_returncode (bool) -- Specifies to retry a request, if the 'busyRepeatRequest' negative response code is received.
debug (bool) -- Enables debug functions during execute.
stop_event (Event) -- Signals immediate stop of the execution.
scan_range (list or tuple or range or iterable) -- Specifies the identifiers to be scanned.
full_scan (bool) -- Specifies if the entire scan range is tested, or if the bitmask with supported identifiers is queried and only supported identifiers are scanned.
- get_supported(socket: SuperSocket | SingleConversationSocket, state: EcuState, **kwargs: Any) List[int] [源代码]