ControlUnit

class ControlUnit
DiagSettings

Access to the diagnostics settings

Returns:

diagnostics settings

Return type:

DiagSettings

Clone()

Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.

Returns:

A copy of this object

Return type:

ControlUnit

GetApplicationA2lArtifactReference()

Gets the application port *.a2l artifact reference.

Returns:

A2L file reference

Return type:

ArtifactReference

GetApplicationA2lFile()

Returns the application port *.a2l file path if a local file is referenced. Convenience method for GetApplicationA2lArtifactReference().GetPath() for local artifact references.

Returns:

A2L file

Return type:

str

GetApplicationA2lTransportLayer()

Returns the A2L Transport-Layer reference for the application port as string or None if the reference is not set.

Returns:

layer-reference string or None

Return type:

str

GetApplicationHexArtifactReference()

Gets the application port artifact reference to the hex file.

Returns:

Hex file reference

Return type:

ArtifactReference

GetApplicationHexFile()

Returns the application port hex file path if a local file is referenced. Convenience method for GetApplicationHexArtifactReference().GetPath() for local artifact references.

Returns:

hex file

Return type:

str

GetApplicationPort()

Returns the application port.

Returns:

Application port

Return type:

str

GetAvailableApplicationA2lTransportLayers()

Returns a list of available A2l Transport Layers in the selected A2l File. Returns None, if no A2l File was set beforehand using SetApplicationA2lFile() or SetApplicationA2lArtifactReference()

Returns:

Available A2l Transport Layers

Return type:

list[str]

GetConnectionSettings()

Get the connection settings that is currently listed in the TCF.

Returns:

remotePartyShortName

Return type:

str

GetDebuggingElfFile()

Returns the debugger *.elf file. Raises an error if a file list with more than one element is set. Use GetDebuggingElfFiles in this case.

Returns:

Debugger *.elf file

Return type:

str

Raises:

ApiError – If a file list with more than one element is set

GetDebuggingElfFiles()

Returns the debugger *.elf files.

Returns:

Identifier and path of configured debugger *.elf files

Return type:

dict[str, str]

GetDebuggingHexArtifactReference()

Gets the artifact reference to the debugger hex file.

Returns:

Debugger hex file reference

Return type:

ArtifactReference

GetDebuggingHexFile()

Returns the debugger hex file path if a local file is referenced. Convenience method for GetDebuggingHexArtifactReference().GetPath() for local artifact references.

Returns:

Debugger hex file

Return type:

str

GetDebuggingPort()

Returns the debugger port.

Returns:

Debugger port

Return type:

str

GetDiagnosticDb()

Returns the diagnostic database.

Returns:

Diagnostic database

Return type:

str

GetDiagnosticPort()

Returns the diagnostic port.

Returns:

Diagnostic port

Return type:

str

Returns the logical link file.

Returns:

Logical link file

Return type:

str

GetDiagnosticsPortDts()

Returns the DTS port.

Returns:

DTS port

Return type:

str

GetDiagnosticsPortEdiabas()

Returns the EDIABAS diagnostics port.

Returns:

EDIABAS port

Return type:

str

GetDiagnosticsSgbdFile()

Returns the SGBD file.

Returns:

SGBD file

Return type:

str

GetEcuVariant()

Get the ecu variant that is currently listed in the TCF.

Returns:

short name of the ecu variant

Return type:

str

GetEcuVariants()

Returns list of all ecu variants from the given Diagnostics DB. Returns an empty list if the file is invalid or if there are no ecu variants.

Returns:

List of Variants (short name)

Return type:

list[str]

GetEdiabasCertificateFile()

Returns the certificate file for Ediabas.

Returns:

Certificate file

Return type:

str

GetEdiabasNetworkProtocol()

Returns the “NetworkProtocol” configuration (SSL/TCP) for EDIABAS.

Returns:

“NetworkProtocol” configuration string

Return type:

str

GetLoggingDatabase()

Returns the logging database.

The logging database is only used for the logging protocol ‘DLT (non-verbose)’.

Returns:

logging database

Return type:

str

GetLoggingDltFilterFile()

Returns the DLT filter file.

The DLT filter file is only used for the logging protocol ‘DLT (verbose)’.

Returns:

DLT filter file

Return type:

str

GetLoggingEcu()

Returns the logging ECU.

The logging ECU is only used for the logging protocol ‘DLT (non-verbose)’.

Returns:

logging ECU

Return type:

str

GetLoggingEthernetIp()

Returns the Ethernet IP of the logging ECU.

Returns:

Ethernet-IP of the logging ECU

Return type:

str

GetLoggingEthernetPort()

Returns the Ethernet port(s) of the logging ECU.

Returns:

Comma seperated Ethernet port(s) of the logging ECU

Return type:

str

GetLoggingEthernetProtocol()

Returns the Ethernet protocol of the logging ECU.

Returns:

Ethernet protocol of the logging ECU

Return type:

str

GetLoggingPort()

Returns the logging port.

Returns:

logging port

Return type:

str

GetLoggingProtocol()

Returns the logging protocol.

Returns:

logging protocol: ‘DLT (non-verbose)’ or ‘DLT (verbose)’

Return type:

str

GetName()

Returns the name of the control unit.

Returns:

Name of the control unit

Return type:

str

GetRemotePartys()

Returns list of remote partys from the given Diagnostics DB. Returns an empty list if the file is invalid or if there are no remote partys.

Returns:

List of Remote Partys (short name)

Return type:

list[str]

IsDebuggingUseHexFileFromApplication()

Returns the option if the hex file is used from the application.

Returns:

Option to use hex file from application

Return type:

boolean

RemoveApplicationA2lArtifactReference()

Removes the application port *.a2l file reference.

RemoveApplicationHexArtifactReference()

Removes the application port hex file reference.

RemoveDebuggingHexArtifactReference()

Removes the debugger hex file reference.

Rename(newControlUnitKey)

Renames the control unit.

Parameters:
newControlUnitKey : str

New name of the control unit

SetApplicationA2lArtifactReference(a2lReference)

Sets the application port *.a2l file reference.

Parameters:
a2lReference

A2L file reference to be set

SetApplicationA2lFile(a2lFile)

Sets the application port *.a2l file to the specified local file path. Convenience method for SetApplicationA2lArtifactReference() for local artifact references.

Parameters:
a2lFile : str

A2L file to be set

SetApplicationA2lTransportLayer(value)

Sets the A2L Transport-Layer reference for the application port if given a string as argument or unsets it if given None as argument.

Parameters:
value : str

layer-reference string or None

SetApplicationHexArtifactReference(hexReference)

Sets the application port hex file reference.

Parameters:
hexReference

Hex file reference to be set

SetApplicationHexFile(hexFile)

Sets the application port hex file to the specified local file path. Convenience method for SetApplicationHexArtifactReference() for local artifact references.

Parameters:
hexFile : str

Hex file to be set

SetApplicationPort(applicationPort)

Sets the application port.

Parameters:
applicationPort : str

Application port to be set

SetConnectionSettings(remotePartyShortName)

Set the connection settings by using the short name of a specific remote party. Use the GetRemotePartys() method to get a list of all remote partys from the diagnostics DB.

Parameters:
remotePartyShortName : str

short name of the remote party

Returns:

True if success, else False

Return type:

bool

SetDebuggingElfFile(debuggerElfFile)

Sets the debugger *.elf file. Overwrites an existing file or file list. The *.elf file will be assigned to identifier “ELF-1”

Parameters:
debuggerElfFile : str

Debugger *.elf file to be set

SetDebuggingElfFiles(debuggerElfFiles)

Sets the debugger *.elf files. Overwrites an existing file or file list.

Parameters:
debuggerElfFiles : dict[str, str]

Identifiers and pathes to debugger *.elf files

SetDebuggingHexArtifactReference(hexReference)

Sets the debugger hex file reference.

Parameters:
hexReference

Hex file reference to be set

SetDebuggingHexFile(debuggerHexFile)

Sets the debugger hex file to the specified local file path. Convenience method for SetDebuggingHexArtifactReference() for local artifact references.

Parameters:
debuggerHexFile : str

Debugger hex file to be set

SetDebuggingPort(debuggerPort)

Sets the debugger port.

Parameters:
debuggerPort : str

Debugger port to be set

SetDebuggingUseHexFileFromApplication(value)

Sets the option to use the hex file from the application.

Parameters:
value : boolean

Option to use hex file from application

SetDiagnosticDb(diagnosticDb)

Sets the diagnostic database.

Parameters:
diagnosticDb : str

Diagnostic database to be set

SetDiagnosticPort(diagnosticPort)

Sets the diagnostic port.

Parameters:
diagnosticPort : str

Diagnostic port to be set

Sets the logical link file.

Parameters:
logicalLinkFile : str

Logical link file to be set

SetDiagnosticsPortDts(diagnosticsPortDts)

Sets the DTS port.

Parameters:
diagnosticsPortDts : str

DTS port to be set

SetDiagnosticsPortEdiabas(diagnosticsPort)

Sets the EDIABAS diagnostics port.

Parameters:
diagnosticsPort : str

Diagnostics port to be set

SetDiagnosticsSgbdFile(sgbdFile)

Sets the SGBD file.

Parameters:
sgbdFile : str

SGBD file to be set

SetEcuVariant(ecuVariant)

Set the ecu variant by using the short name of a specific ecu variant. Use the GetEcuVariants() method to get a list of all ecu variants from the diagnostics DB.

Parameters:
ecuVariant : str

short name of the ecu variant

Returns:

True if success, else False

Return type:

bool

SetEdiabasCertificateFile(certificate)

Sets the certificate file for Ediabs.

Parameters:
certificate : str

Certificate file to be set. This must be the file name without the suffix.

SetEdiabasNetworkProtocol(ediabasNetworkProtocol)

Sets the “NetworkProtocol” configuration (SSL/TCP) for EDIABAS.

Parameters:
ediabasNetworkProtocol : str

The configured value for “NetworkProtocol” selection

SetLoggingDatabase(loggingDatabase)

Sets the logging database.

The logging database is only used for the logging protocol ‘DLT (non-verbose)’.

Parameters:
loggingDatabase : str

logging database

SetLoggingDltFilterFile(loggingDltFilterFile)

Sets the DLT filter file.

The DLT filter file is only used for the logging protocol ‘DLT (verbose)’.

Parameters:
loggingDltFilterFile : str

DLT filter file

SetLoggingEcu(loggingEcu)

Sets the logging ECU.

The logging ECU is only used for the logging protocol ‘DLT (non-verbose)’.

Parameters:
loggingEcu : str

logging ECU

SetLoggingEthernetIp(loggingEthernetIp)

Sets the Ethernet IP of the logging ECU.

Parameters:
loggingEthernetIp : str

Ethernet-IP of the logging ECU

SetLoggingEthernetPort(loggingEthernetPort)

Sets the Ethernet port(s) of the logging ECU.

Parameters:
loggingEthernetPort : str

Ethernet port(s) of the logging ECU. Multiple ports have to to be comma seperated.

SetLoggingEthernetProtocol(loggingEthernetProtocol)

Sets the Ethernet protocol of the logging ECU.

Parameters:
loggingEthernetProtocol : str

Ethernet protocol of the logging ECU

SetLoggingPort(loggingPort)

Sets the logging port.

Parameters:
loggingPort : str

logging port

SetLoggingProtocol(loggingProtocol)

Sets the logging protocol.

Note: A change of the logging protocol will automatically set the logging database, logging ecu and dlt filter file to its default values.

Parameters:
loggingProtocol : str

logging protocol: ‘DLT (non-verbose)’ or ‘DLT (verbose)’