Xcp Controller Module

mtf.measurement.xcp.xcp_controller.convert_to_mtf_values(property_value: array)
mtf.measurement.xcp.xcp_controller.convert_from_mtf_values(property_value: array) array
class mtf.measurement.xcp.xcp_controller.XcpController

class for interacting with an ECU using XCP communication protocol.

Args:

ecu_name (str): The name of the ECU. channel_name (str): The name of the communication channel. connection (xcp_eth_connection): The XCP connection object. a2l_file_path (str): The file path to the A2L file for the ECU.

Attributes:

ecu_name (str): The name of the ECU. channel_name (str): The name of the communication channel. connection (xcp_eth_connection): The XCP connection object. a2l_file_path (str): The file path to the A2L file for the ECU.

__init__(ecu_name: str, channel_name: str, connection: xcp_eth_connection, a2l_file_path: str)

Initialize the XcpControllerWrapper instance.

Args:

ecu_name (str): The name of the ECU. channel_name (str): The name of the communication channel. connection (xcp_eth_connection): The XCP connection object. a2l_file_path (str): The file path to the A2L file for the ECU.

connect()

Connect to the ECU.

Returns:

bool: True if connection is successful, False otherwise.

disconnect()

Disconnect from the ECU.

write_raw_value(property_name: str, property_value: array)

Write a raw value to the ECU.

Args:

property_name (str): The name of the property. property_value (XcpValueType): The value to write.

Returns:

bool: True if write is successful, False otherwise.

read_raw_value(property_name: str)

Read a raw value from the ECU.

Args:

property_name (str): The name of the property.

Returns:

XcpValueType: The read value.

read_physical_value(property_name: str)

Read a physical value from the ECU.

Args:

property_name (str): The name of the property.

Returns:

XcpValueType: The read value.

write_physical_value(property_name: str, property_value: array)

Write a physical value to the ECU.

Args:

property_name (str): The name of the property. property_value (XcpValueType): The value to write.

Returns:

bool: True if write is successful, False otherwise.