API Definition

APIA2LExportSettings (class)

The A2L Export Settings API Object

Properties

Name

Type

Description

EtkXetkExport bool Enables or disables the export of the ETK XETK AML
MinimumEtkXetkAmlVersion ETK_XETK_AML_VERSION Gets the minimum required ETK XETK AML Version for the configured features in the project
MaximumEtkXetkAmlVersion ETK_XETK_AML_VERSION Gets the maximal possible ETK XETK AML Version for the configured features in the project
SelectedEtkXetkAmlVersion ETK_XETK_AML_VERSION The selected ETK XETK AML Version for the export Enables the ETK XETK AML export if set
XcpExportSupported bool Is the export of the XCP AML supported for this Project
XcpExport bool Enables or disables the export of the XCP AML
MinimumXcpAmlVersion XCP_AML_VERSION Gets the minimum required XCP AML Version for the configured features in the project
MaximumXcpAmlVersion XCP_AML_VERSION Gets the maximal possible XCP AML Version for the configured features in the project
SelectedXcpAmlVersion XCP_AML_VERSION The selected XCP AML Version for the export Enables the XCP AML export if set
IncludeTdmRastersForXcp bool Enables or disables the export of TDM raster for the XCP AML export Enables the XCP AML export if enabled
IpAddress string The IP address of the device for the XCP AML export Enables the XCP AML export if set
Port uint The Port of the device for the XCP AML export Enables the XCP AML export if set
Tcp bool Enables or disables the TCP protocol for the XCP AML export Enables the XCP AML export if enabled
TransportLayerIntanceTcp string The name of the TCP transportlayer instance Enables the TCP protocol for the XCP AML export Enables the XCP AML export if set
Udp bool Enables or disables the UDP protocol for the XCP AML export Enables the XCP AML export if enabled
TransportLayerIntanceUdp string The name of the UDP transportlayer instance Enables the UDP protocol for the XCP AML export Enables the XCP AML export if set
SyncDmaStimSupported bool Is the export of Sync DMA Stim supported for this Project
SyncDmaStimExport bool Enables or disables the export of Sync DMA Stim

APIConfiguration (class)

The Configuration API Object

Properties

Name

Type

Description

Name String The name of the configuration
ModelIdentifier String The model identifier of the configuration

Methods

ClosedImportFlashConfiguration(String)

Imports a flash configuration from a given folder. This method copies the flash programming files listed in the model data to the local folder containing the project file. The source files remain untouched (they are not deleted).

Name

Type

Description

folderPath String The folder path containing the flash configuration to be imported

Boolean

True -> if the device type supports XCP flash programming

False -> if the device type does not support XCP flash programming

ClosedRemoveFlashConfiguration()

Removes an imported flash configuration, i. e. deletes the imported flash configuration files and the containing directory. The source files remain untouched (they are not deleted).

ClosedCreateXcpDeviceConfiguration(String)

Creates the files necessary for configuring a device for standard XCP usage

Name

Type

Description

outputDirectoryPath String the directory path where the created files shall be stored

APIDevice (class)

The API Device Object

Properties

Name

Type

Description

Alias String The alias of the device ATTENTION: Only supported for XETKs, returns empty String for every other device
ModelIdentifier String The modelidentifier of the device
Name String The name of the device
PortNumber int The port number of the device
SerialNumber String The serial number of the device
IpAddress String The IPv4 Address of the device

Methods

ClosedControlEcuReset(Boolean)

Controls the ECU reset driven by the X/F ETK

Name

Type

Description

reset Boolean True -> the reset is controlled by the X/F ETK False -> the reset is released by the X/F ETK

void

XCTAutomationAPIException: one of the parameters is invalid

Code Example:

# set ECU reset
connectedDevice.ControlEcuReset(True)

ClosedSetAlias(String)

Assigns a new alias to the device An empty string is a valid alias

Name

Type

Description

alias String The desired alias

void

XCTAutomationAPIException: one of the parameters is invalid

ClosedSetFixedNetworkSettings(String, String)

Writes the given network settings to the given device. Afterwards the given device is configured fixed with these network settings. Note: This functionality is currently only available for XETKs. If this function is called in combination with an FETK, the function throws an exception

Name

Type

Description

ipAddress String the IP address for that device
subNetMask String the Sub net mask for that device. If not set, the currently configured sub net mask is used.

void

XCTAutomationAPIException: the connected device is not supported or one of the parameters is invalid

Code Example:

device = XCT.SearchForHardware()[0]
device.SetFixedNetworkSettings("192.168.40.16", "255.255.255.0")
device.SetFixedNetworkSettings("192.168.40.16");

ClosedStartCalibrationWakeup(UInt32, UInt32, UInt32)

Starts the calibration wakeup for the ECU the given device is connected to. After the ECU has been woken up, the XCT Console starts writing the CAL_TOOL_PRESENT pattern to the ECU memory at the given address periodically.

Name

Type

Description

patternAddress UInt32 the address of the CAL_TOOL_PRESENT pattern
pattern UInt32 the CAL_TOOL_PRESENT pattern
ecuTimeout UInt32 the ECU timeout

true if the ECU wake up succeeded, otherwise false

XCTAutomationAPIException: the connected device is not supported

Code Example:

device = XCT.SearchForHardware()[0]
device.StartCalibrationWakeup(0xBF0F8000, 0x12345678, 5)

ClosedStopCalibrationWakeup()

Stops writing the CAL_TOOL_PRESENT pattern periodically to the ECU connected to the given device. voidthe connected device is not supported

ClosedRebootDevice()

Reboots the connected device (not the ECU!). After that, the variable refencing the device in the control script becomes invalid. A new SearchForHardware() call has to be done to find the device again!

ClosedGetHardwareInfo(HWINFO)

This API returns the selected Hardware Info of the connected and selected ETAS device as a string value. To select the required Hardware Info please use the HWINFO enumeration types.

Name

Type

Description

hwInfoType HWINFO Hardware Info type as enumeration (32-bit signed integer).

string

Hardware Information based on selected HWINFO type.

XCTAutomationAPIException: Error during hardware access or invalid enumeration type usage.

Code Example:

device = XCT.SearchForHardware()[0]
string hwiDefaultIpAddress = device.GetHardwareInfo(HWINFO.DefaultIpAddress)
string hwiFirmwareVersion = device.GetHardwareInfo(HWINFO.FirmwareVersion)

ClosedGetHardwareState(HWSTATE)

This API returns the selected Hardware State of the connected and selelcted ETAS device as an 32-bit signed integer value. To select the required Hardware State please use the HWSTATE enumeration types.

Name

Type

Description

hwStateType HWSTATE Hardware State type as enumeration (32-bit signed integer).

int

Hardware State as 32-bit signed integer value based on the selected HWSTATE type.

XCTAutomationAPIException: Error during hardware access or invalid enumeration type usage.

Code Example:

device = XCT.SearchForHardware()[0]
hwsEcuReset = device.GetHardwareState(HWSTATE.EcuReset)
hwsEcuHandshake = device.GetHardwareState(HWSTATE.EcuHandshake)

ClosedReadStandardMonitorVariables()

Reads all Standard Mode Monitor Variables from the device. A documentation for the Standard Mode Monitor Variables can be found in the Manuals Folder of the XCT installation

Dictionary with the Monitor Variables where the key is the Name of the variable, and the value is the string value of the variable including the unit e.g. "s" or "MB/s"

This is a "Dictionary" not a Python "dict"! Be aware when iterating! See Code Example or Iron Python issue #1461

Code Example:

monVars = device.ReadStandardMonitorVariables()
for monVar in monVars:
print("Key: " + monVar.Key + " Value: " + monVar.Value + "\n")

ClosedReadExtendedMonitorVariables()

Reads all Monitor Variables, Standard and Extended, from the device. A documentation for the Standard Mode Monitor Variables can be found in the Manuals Folder of the XCT installation

Dictionary with the Monitor Variables where the key is the Name of the variable, and the value is the string value of the variable including the unit e.g. "s" or "MB/s"

This is a "Dictionary" not a Python "dict"! Be aware when iterating! See Code Example or Iron Python issue #1461

Code Example:

monVars = device.ReadExtendedMonitorVariables()
for monVar in monVars:
print("Key: " + monVar.Key + " Value: " + monVar.Value + "\n")

ClosedReadRawBytesFromECU(EcuMemoryPage, UInt64, UInt64)

Reads a certain amount of raw data (1024 bytes maximum) from the connected ECU from the specified page at a certain address.

Name

Type

Description

page EcuMemoryPage the ECU page to read from
address UInt64 the start address of the data range being read
size UInt64 the amount of bytes being read

a byte array containing the data being read

XCTAutomationAPIException: Memory access failed; 0 or more than 1024 bytes are requested

ClosedWriteRawBytesToECU(EcuMemoryPage, UInt64, Byte[])

Writes a certain amount of data (1024 bytes maximum) to the connected ECU to the specified page at a certain address.

Name

Type

Description

page EcuMemoryPage the ECU page to write to
address UInt64 the start address where to write to
data Byte[] the data that gets written to the ECU

XCTAutomationAPIException: Memory access failed; 0 or more than 1024 bytes shall be written

APIProject (class)

The API Project Object

Properties

Name

Type

Description

Configurations List(APIConfiguration) All the configurations of the project

Methods

ClosedSaveAs(String)

Saves the current project to a specified file

Name

Type

Description

filePath String the path of the file this project shall be written to.

ClosedConvertToFixedProject(Boolean)

Converts all configurations inside the project to a fixed configuration - Converts calibration handles to its fixed counterpart and assigns them as fixed - Activates fixed Distab 17, and does an automatic Distab distribution This is the same behavior as with a project config file which has automatic calibration handles and distab distribution enabled

Name

Type

Description

forceFixedDistab17Configuration Boolean OPTIONAL: defines whether the Distab 17 memory distribution shall be performed in the tool, even if the corresponding device supports the memory distribution (this parameter is only relevant for those devices). The default value for this parameter is false

ClosedCreateA2LExportSettings()

Creates a A2LExportSettings Object for this Project The defaults of this object are: - ETK_XETK and XCP export are disabled - ETK_XETK and XCP AML Versions are set to the highest possible - TCP Protocol for XCP export is enabled - IP Address is set to the default ETK Address - Port is set to the default ETK Port - All other settings are disable or empty

The A2LExportsettings Object prepared for the project

ClosedWriteA2LFile(APIA2LExportSettings, APIConfiguration, String)

Writes an A2L File according to the given settings object and default Configuration

Name

Type

Description

settings APIA2LExportSettings The settings object to configure the A2L export
defautlConfiguration APIConfiguration The default configuration, e.g. used for the Event Number generation for XCP export
filePath String The path of the A2L file that shall be written to

EcuMemoryPage (enumeration)

Memory page types used when reading/writing raw data from/to the ECU memory

Enumeration Values

Name

Description

ReferencePage Defines read/write access to the reference page of the ECU
WorkingPage Defines read/write access to the working page of the ECU
RamPage Defines read/write access to the RAM of the ECU
Code Defines read/write access to the code page of the ECU
EcuAbsolute Defines read/write access to the ECU memory page independent

EtkXetkAmlVersion (enumeration)

Possible ETK XETK AML Versions

Enumeration Values

Name

Description

ETK_XETK_AML_1_0_0 ETK XETK AML Version 1.0.0
ETK_XETK_AML_1_1_0 ETK XETK AML Version 1.1.0
ETK_XETK_AML_1_2_0 ETK XETK AML Version 1.2.0
ETK_XETK_AML_1_3_0 ETK XETK AML Version 1.3.0
ETK_XETK_AML_2_0_0 ETK XETK AML Version 2.0.0
ETK_XETK_AML_2_1_0 ETK XETK AML Version 2.1.0
ETK_XETK_AML_2_2_0 ETK XETK AML Version 2.2.0
ETK_XETK_AML_2_2_1 ETK XETK AML Version 2.2.1
ETK_XETK_AML_2_3_0 ETK XETK AML Version 2.3.0
ETK_XETK_AML_2_4_0 ETK XETK AML Version 2.4.0
ETK_XETK_AML_2_5_0 ETK XETK AML Version 2.5.0
ETK_XETK_AML_2_6_0 ETK XETK AML Version 2.6.0
ETK_XETK_AML_2_7_0 ETK XETK AML Version 2.7.0
ETK_XETK_AML_2_8_0 ETK XETK AML Version 2.8.0

HWINFO (enumeration)

Hardware Info enumeration types. Use this enumeration types for the API GetHardwareInfo to select the supported and required hardware information. The enumeration data type is 32-bit signed integer.

Enumeration Values

Name

Description

Begin Hardware Info begin enumeration which is reserved and not functional.
HardwareRevision Hardware Info enumeration HardwareRevision.
Using this type with the API GetHardwareInfo the hardware revision of the ETAS device is returned as string.
Example string "A010/01".
DefaultIpAddress Hardware Info enumeration DefaultIpAddress.
Using this type with the API GetHardwareInfo the configured default IP address from the ETAS device is returned as string.
The default IP address is part of the device manufacturing data set and must not match the active IP address.
Example string "192.168.40.1".
DefaultSubnetMask Hardware Info enumeration DefaultSubnetMask.
Using this type with the API GetHardwareInfo the configured default sub-net mask from the ETAS device is returned as string.
The default sub-net mask is part of the device manufacturing data set and must not match the active sub-net mask.
Example string "255.255.255.0".
FirmwareVersion Hardware Info enumeration FirmwareVersion.
Using this type with the API GetHardwareInfo the FW component version of the ETAS device is returned as string.
Returns the string value "-1" if FW component is not existing.
Example string "1.0.0".
EpldVersion Hardware Info enumeration EpldVersion.
Using this type with the API GetHardwareInfo the EPLD component version of the ETAS device is returned as string.
Returns the string value "-1" if EPLD component is not existing.
Example string "1.0.0".
HdcVersion Hardware Info enumeration HdcVersion (HDC: Hardware Development Code).
Using this type with the API GetHardwareInfo the HDC component version of the ETAS device is returned as string.
Returns the string value "-1" if FPGA component is not existing.
Example string "1.0.0".
ManufactoringId Hardware Info enumeration ManufactoringId.
Using this type with the API GetHardwareInfo the manufacturer identification of the ETAS device is returned as string.
Example string "25".
EcuResetBehavior Hardware Info enumeration EcuResetBehavior.
Using this type with the API GetHardwareInfo the ECU reset state during ETAS device boot phase is returned as string.
Returns the string value "0" in case the ECU reset is disabled during the ETAS device boot phase.
Returns the string value "1" in case the ECU reset is enabled during the ETAS device boot phase.
Returns the string value "-1" in case feature is not supported by the ETAS device.
A2LFileName Hardware Info enumeraton A2LFileName.
Returns the used A2L file name without path and exetension.
A2LFilePath Hardware Info enumeraton A2LFilePath.
Returns the full file path of the used A2L file.
A2LEPK Hardware Info enumeraton A2LEPK.
Returns the EPK identifier stored in the used A2L file
End Hardware Info end enumeration which is reserved and not functional.

HWSTATE (enumeration)

Hardware State enumeration types. Use this types for the API GetHardwareState to select the supported and required hardare state. The enumeration data type is 32-bit signed integer.

Enumeration Values

Name

Description

Begin Hardware State begin enumeration which is reserved and not functional.
EcuPage Hardware State enumeration EcuPage.
Using this type with the API GetHardwareState the detected ECU page from the ETAS device is returned.
Returns the integer value 0 in case of detected ECU page is Reference Page.
Returns the integer value 1 in case of detected ECU page is Working Page.
Returns the integer value 2 in case of detected ECU page is Code Page.
Returns the integer value 3 in case of detected ECU page is Measurement Page.
Returns the integer value 4 in case of detected ECU pages are Reference and Working Page (both pages).
Returns the integer value 255 in caes the ECU page could not be deteced and is therefore unknown.
PageInitialization Hardware State enumeration PageInitialization.
Using this type with the API GetHardwareState the detected page initialization from the ETAS device is returned.
Returns the integer value 0 in case of the page is write accessed after initialization from backup flash.
Returns the integer value 1 in case of the page is initialized from backup flash.
Returns the integer value 2 in case of the page is not initialized from backup flash.
Returns the integer value -1 in case of the page initialization could not be detected and is unknown.
Ignition Hardware State enumeration Ignition.
Using this type with the API GetHardwareState the detected ignition state from the ETAS device is returned.
Returns the integer value 0 in case the ignition state OFF is detected.
Returns the integer value 1 in case the ignition state ON is detecetd.
Returns the integer value -1 in case the ignition state could not be detected and is therefore unknown.
StandbyPower Hardware State enumeration StandbyPower.
Using this type with the API GetHardwareState the detected standby power state from the ETAS device is returned.
Returns the integer value 0 in case the standby power state OFF is detected.
Returns the integer value 1 in case the standby power state ON is detecetd.
Returns the integer value -1 in case the standby power state could not be detected and is therefore unknown.
PowerFail Hardware State enumeration PowerFail.
Using this type with the API GetHardwareState the detected power fail or calibration data state from the ETAS device is returned.
Returns the integer value 0 in case no power fail is detected.
For "serial interface" based ETAS devices the calibration data state is valid.
For "parallel interface" based ETAS devices the calibration data state is modified.
Returns the integer value 1 in case power fail is detecetd.
For "serial interface" based ETAS devices the calibration data state is invalid.
For "parallel interface" based ETAS devices the calibration data state is initialized form backup flash.
Returns the integer value -1 in case the power fail state could not be detected and is therefore unknown.
EcuReset Hardware State enumeration EcuReset.
Using this type with the API GetHardwareState the detected ECU reset state from the ETAS device is returned.
Returns the integer value 0 in case the no active ECU reset is detected and the ECU is running.
Returns the integer value 1 in case the the ETAS device drives the ECU reset and the ECU is not running.
Returns the integer value 2 in case the ECU reset is driven by an external source and the ECU is not running.
Returns the integer value 3 in case the ECU is halted and not running.
Returns the integer value -1 in case the ECU reset state could not be detected and is therefore unknown.
Reserved Hardware State enumeration is reserved and not functional.
EcuHandshake Hardware State enumeration EcuHandshake.
Using this type with the API GetHardwareState the detected hardware handshake state from the ETAS device.
Returns the integer value 0 in case no hardware handshake was performed.
Returns the integer value 1 in case the hardware handshake was performed by the ECU software.
Returns the integer value 2 in case the hardware handshake was set to performed because of timeout condition.
Returns the integer value -1 in case the hardware handshake state could not be detected and is therefore unknown.
TraceInterface Hardware State enumeration TraceInterface.
Using this type with the API GetHardwareState the detected trace interface state from the ETAS device is returned.
Returns the integer value 0 in case no trace interface is supported.
Returns the integer value 1 in case of link is in reset.
Returns the integer value 2 in case of signal on link received.
Returns the integer value 3 in case of the physical layer was established.
Returns the integer value 4 in case of the link is up.
Returns the integer value 5 in case of a link communication error.
Returns the integer value 6 in case of the link is shared with an external debugger.
Returns the integer value -1 in case the trace interface state could not be detected and is therefore unknown.
SerialInterface Hardware State enumeration SerialInterface.
Using this type with the API GetHardwareState the detected serial interface state from the ETAS device is returned.
Returns the integer value 0 in case the serial interface state could not be detected and is therefore unknown.
Returns the integer value 1 in case the serial interface is in active JTAG operation mode.
Returns the integer value 2 in case the serial interface operation mode could not be switched from JTAG to LFAST.
Returns the integer value 3 in case the serial interface is in active LFAST operation mode.
End Hardware State end enumeration which is reserved and not functional.

XcpAmlVersion (enumeration)

Possible XCP AML Versions

Enumeration Values

Name

Description

XCP_AML_1_0 XCP AML Version 1.0
XCP_AML_1_1 XCP AML Version 1.1
XCP_AML_1_2 XCP AML Version 1.2
XCP_AML_1_3 XCP AML Version 1.3
XCP_AML_1_4 XCP AML Version 1.4
XCP_AML_1_5 XCP AML Version 1.5

XCTAutomationAPI (class)

The XCT Automation API These are the exposed methods for use in a Python Script

Properties

Name

Type

Description

Version String Returns the version of the currently installed ETK Tools (including "Beta" label, if a beta version is installed). This version string is the same as displayed in the about dialog of the XCT UI application

Methods

ClosedCompareConfigurations(APIConfiguration, APIDevice)

Compares a configuration with the configuration stored in a device

Name

Type

Description

configuration APIConfiguration The configuration to compare
device APIDevice The device to which the configuration should be compared

Boolean

True -> if the configuration in the device matches the given configuration

False -> if the two configurations differ

XCTAutomationAPIException: one of the parameters is invalid

Code Example:

if XCT.CompareConfigurations( desiredConfiguration, connectedDevice ) == False:
# the configurations don't match
XCT.DownloadToDevice( desiredConfiguration, connectedDevice )

ClosedControlEcuReset(APIDevice, Boolean)

ControlECUReset is deprecated. Use the method from the APIDevice class instead.

Controls the ECU reset driven by the X/F ETK

Name

Type

Description

device APIDevice The device for which the ECU reset should be controlled
reset Boolean True -> the reset is controlled by the X/F ETK False -> the reset is released by the X/F ETK

void

XCTAutomationAPIException: one of the parameters is invalid

Code Example:

# set ECU reset
XCT.ControlEcuReset(connectedDevice, True)

ClosedDownloadToDevice(APIConfiguration, APIDevice, Boolean)

Downloads the configuration to the device

Name

Type

Description

configuration APIConfiguration The configuration which should be downloaded
device APIDevice The device which should be configured, to which the configuration should be downloaded
downloadPhysicalConfiguration Boolean OPTIONAL: defines whether the physical configuration shall be downloaded before the logical configuration (only necessary for ML_ECU devices). The default value for this parameter is 'logical only'. If the physical configuration is downloaded to the device the XCT Console disconnects all other logical devices and all other logical configurations get deleted!

void

XCTAutomationAPIException: - one of the parameters is invalid - the configuration and the device do not match (e.g. other device type)

Code Example:

if XCT.CompareConfigurations( desiredConfiguration, connectedDevice ) == False:
# the configurations don't match
XCT.DownloadToDevice( desiredConfiguration, connectedDevice )

ClosedSetAlias(APIDevice, String)

SetAlias is deprecated. Use the method from the APIDevice class instead.

Assigns a new alias to the device An empty string is a valid alias

Name

Type

Description

device APIDevice The device
alias String The desired alias

void

XCTAutomationAPIException: one of the parameters is invalid

ClosedLoadProject(String)

Loads the given xct file

Name

Type

Description

filepath String The path to the xct file, absolute or relative

The project stored in the xct file, with all the configurations

XCTAutomationAPIException: filepath is invalid (e.g. empty or not a file)

Code Example:

# get an APIProject object
project = XCT.LoadProject( "C:\Example.xct" )
# get the first configuration (APIConfiguration) of the APIProject
configuration = project.Configurations[0]

ClosedLoadA2LFileAndProjectConfigFile(String, String, IList{System.Int32})

Loads the project data contained in the specified A2L file and completes the project with adding the information contained in the specified Project Configuration File.

Name

Type

Description

a2lFilePath String the path of the A2L file
projectConfigFilePath String the path of the Project Configuration File
deviceIds IList{System.Int32} OPTIONAL: the device IDs from the A2L file of the devices which should be imported

The Project generated from the A2L and the Configuration File

ClosedLoadA2LFile(String, IList{System.Int32})

Loads the project data contained in the specified A2L file. If that A2L file contains embedded Project Configuration definitions they will be applied.

Name

Type

Description

a2lFilePath String the path of the A2L file
deviceIds IList{System.Int32} OPTIONAL: the device IDs from the A2L file of the devices which should be imported

The Project generated from the A2L file

ClosedSearchForHardware()

Searches for connected X/F ETKs This may take a few seconds

List(APIDevice)

A list of the found devices. If no device was found the list is empty

Code Example:

# get List of all connected devices
deviceList = XCT.SearchForHardware()
# get the first connected device
connectedDevice = deviceList[ 0 ]

XCTAutomationAPIException (class)

The exception that gets thrown by the API functions when errors occur

Properties

Name

Type

Description

ApiFunction String The API function throwing the exception
Message String The message describing what went wrong

Methods

Closed#ctor(String)

The constructor.

Name

Type

Description

message String the error message