nixnet.database.ecu

class nixnet.database._ecu.Ecu(**kwargs: int)[source]

Bases: DatabaseObject

Database ECU

check_config_status() None[source]

Check this ECU’s configuration status.

By default, incorrectly configured ECUs in the database are not returned from Cluster.ecus because they cannot be used in the bus communication. You can change this behavior by setting Database.show_invalid_from_open to True. When an ECU configuration status becomes invalid after the database is opened, the ECU still is returned from Cluster.ecus even if Database.show_invalid_from_open is False.

Raises:

XnetError – The ECU is incorrectly configured.

property clst: Cluster

Returns the parent cluster to which the ECU is connected.

The parent cluster is determined when the ECU object is created. You cannot change it afterwards.

Type:

Cluster

property comment: str

Get or set a comment describing the ECU object.

A comment is a string containing up to 65535 characters.

Type:

str

property dbc_attributes: DbcAttributeCollection

Access the ECU’s DBC attributes.

Type:

DbcAttributeCollection

property j1939_node_name: int

Get or set the preferred J1939 node address to be used when simulating this ECU.

If you assign this ECU to an XNET session (j1939.set_ecu), XNET will start address claiming for this address using this node name and Ecu.j1939_preferred_address.

Type:

int

property j1939_preferred_address: int

Get or set the preferred J1939 node address to be used when simulating this ECU.

If you assign this ECU to an XNET session (j1939.set_ecu), XNET will start address claiming for this address using Ecu.j1939_node_name and use the address for the session when the address is granted.

Type:

int

property lin_config_nad: int

Get or set the configured NAD of a LIN slave node.

NAD is the address of a slave node and is used in diagnostic services. Initial NAD is replaced by configured NAD with node configuration services.

Warning

This property is not saved in the FIBEX database. You can import it only from an LDF file.

Type:

int

property lin_function_id: int

Get or set the function ID.

Function ID is a 16-bit value identifying the function of the LIN node (ECU).

Warning

This property is not saved in the FIBEX database. You can import it only from an LDF file.

Type:

int

property lin_initial_nad: int

Get or set the initial NAD of a LIN slave node.

NAD is the address of a slave node and is used in diagnostic services. Initial NAD is replaced by configured NAD with node configuration services.

Warning

This property is not saved in the FIBEX database. You can import it only from an LDF file.

Type:

int

property lin_master: bool

Get or set whether the ECU is a LIN master (True) or LIN slave (False).

Type:

bool

property lin_p2_min: float

Get or set the minimum time in seconds between frame reception and node response.

This is the minimum time between reception of the last frame of the diagnostic request and the response sent by the node.

Warning

This property is not saved in the FIBEX database. You can import it only from an LDF file.

Type:

float

property lin_protocol_ver: LinProtocolVer

Get or set the version of the LIN standard this ECU uses.

Type:

LinProtocolVer

property lin_st_min: float

Get or set the minimum time in seconds for node preparation.

This is the minimum time the node requires to prepare for the next frame of the diagnostic service.

Warning

This property is not saved in the FIBEX database. You can import it only from an LDF file.

Type:

float

property lin_supplier_id: int

Get or set the supplier ID.

Supplier ID is a 16-bit value identifying the supplier of the LIN node (ECU).

Warning

This property is not saved in the FIBEX database. You can import it only from an LDF file.

Type:

int

property name: str

Get or set the name of the ECU object.

Lowercase letters, uppercase letters, numbers, and the underscore (_) are valid characters for the short name. The space ( ), period (.), and other special characters are not supported within the name. The short name must begin with a letter (uppercase or lowercase) or underscore, and not a number. The short name is limited to 128 characters.

An ECU name must be unique for all ECUs in a cluster.

This short name does not include qualifiers to ensure that it is unique, such as the database and cluster name. It is for display purposes.

Type:

str

property rx_frms: Iterable[Frame]

Get or set a list of frames the ECU receives.

This property defines all frames the ECU receives. All frames an ECU receives in a given cluster must be defined in the same cluster.

Type:

list of Frame

property tx_frms: Iterable[Frame]

Get or set a list of frames the ECU transmits.

This property defines all frames the ECU transmits. All frames an ECU transmits in a given cluster must be defined in the same cluster.

Type:

list of Frame