Diag Manager Module
- class mtf.diag_port.diag_manager.DiagManagerWrapper
this class is warpper to technica diagnostic toolbox for more details https://git.technica-engineering.net/te-libraries/diagnostics/diagnostictoolbox/-/blob/master/README.md
- diag_config_path
- diag_servers_
- property started
- classmethod read_config(config_path: str | None = None)
Read Diagnostic config file.
- Parameters:
config_path – Path to the diag_config file. Defaults to diag_config_path.
- get_dtc_snapshots(dtc: int, connection_name: str, memory_selection: int | None = None)
Get DTC snapshots.
- Parameters:
dtc – DTC
connection_name – The DTC ID for which we request the snapshot data. It can be a 3-byte integer.
memory_selection – A 1 byte wide identifier for the memory region. Defined by ECU manufacturer. Defaults to None.
- Returns:
Dict of each DTC mapped with its snapshots.
- diag_server(ip: str, logical_address: int, protocol: DiagProtocol, buffer_size: int = 1024, sock_opts: dict | None = None)
Get the diag server instance based on the given protocol.
- Parameters:
ip – server ip address.
logical_address – server logical address.
protocol – Diagnostic protocol. It could be HSFZ or DoIP.
buffer_size – buffer size.
sock_opts – socket options defined in a dictionary with option name as key and value as value.
- Returns:
Diag_server instance.
- classmethod shutdown_servers()
Shutdown all activated Diagnostic servers.
- classmethod clear_all_diag_servers()
stop all diag servers and clear all their instances
- classmethod reset_diag_controllers()
Stop diag connection of controllers without deleting list of controllers
- classmethod set_verbosity(level=10, sys_warning='default', log_file: str | None = None)
Set Diagnostic module’s logging verbosity.
- Parameters:
level – logging level of diag related module CRITICAL = 50 FATAL = CRITICAL ERROR = 40 WARNING = 30 WARN = WARNING INFO = 20 DEBUG = 10 NOTSET = 0
sys_warning – error”, “ignore”, “always”, “default”, “module”, “once”. Defaults to “default.
log_file – if not none , new handler will be created with the log file. Defaults to None.
- classmethod add_controller(dut: Dut)
Add a new controller, with respect to the dut properties :param dut: dut instance that contains all needed properties to establish the connection with the DUT :type dut: Dut :return: None :rtype:
- classmethod apply_external_config(force=False)
- classmethod build_value(raw_value)
- classmethod client(ecu_name: str) Client
getter for client by name :param ecu_name: diag connection name as specified in the config file or when the client was programmatically created :type ecu_name: str :return: diag controller instance :rtype: Client
- classmethod controller(ecu_name: str) DiagController
getter for controller by name :param ecu_name: diag connection name as specified in the config file or when the controller was programmatically created :type ecu_name: str :return: diag controller instance :rtype: DiagController
- controller_instances
- default_config_path
- classmethod get_properties()
- classmethod init_paths(workspace, search_path)
- is_configured
- search_path
- classmethod shutdown_controllers()
- this is a clean-up function for the diag manager, and consists of:
clean up the controllers and free the memory of loaded databases
close clients and corresponding connections
clean up the socket pool for tcp connections
- Returns:
None
- Return type:
- workspace_path