XCP - Signal Config Filter Editor

This chapter will break down the usage of the XCP - Signal Config Filter Editor (SCFE).

After reading this article, you should have the knowledge:

General usage

In general an ECU is described with an A2L file which includes all signals, parameters, DAQ events and much more.
The SCFE window is used to select signals and parameters from an A2L file and map them to the created pins for the

So it is possible to configure the XCP Encoder Filter or the XCP Decoder Filter with the signals and parameters you need. For example you want to decode the velocity value of your car (which is measured by your connected engine control unit). So you have to select the velocity signal from your A2L and create a output pin with this signal.

Open the SCFE window

You have to open the context menu of the En-/Decode-Filter and choose 'Signal Config Filter Editor'. The dialog like the one you can see below will be displayed. If you have set the MapFilename property of the En-/Decode-Filter, the SCFE will show previously configured pins within the 'Configuration' view of the SCFE. Otherwise you won't see any pins or databases.



Create a new map file

To create a new map file for your filter, go into the SCFE and:

  1. Create a new configuration by choosing 'File' --> 'New Config' --> 'New Config'
  2. Add the A2L file corresponding to your ECU, by using the menu point 'File' --> 'Add Database ...'
  3. After the selected file is parsed, you will see all signals and parameters of your A2L file in the 'Database' view
  4. Safety first, save your config
  5. Within the 'Configuration' view you can add pins to your configuration by open the context menu and clicking 'Add Output Pin' or 'Add Input Pin'

  6. Now it's time to configure the added pins. If a pin is selected, you can see its properties in the 'Properties' view. It's important to edit the properties to enable the full functionality of the XCP communication:

    PropertyValueDescription
    cycletimeMillisecondsOld behaviour: Cyclic transmission of a buffer. Default -1.
    Note: this variable will not effect anything and will be disabled in the next releases.
    daq_eventcStringDefines the DAQ event channel
    daq_prescalertUInt32Transmission rate prescaler (=>1)
    namecStringPin name
    polling_intervaltUInt32Defines the polling interval

  7. After naming and configuring the pin you can drag and drop one or more signals from the 'Database' view to your new pin.
    So the configruation could look like this:

  8. Like before, you have to configure your used signals/parameters via the 'Properties' view:

    PropertyTypeDescription
    bitstUIntFor bit field elements
    child_indextUInt32Used as Structindex
    corrective_factortFloat64Additional factor
    corrective_offsettFloat64Additional offset
    counttIntFor array like signals, this specifies the dimension
    limitstIntCan be used to override the property setting for global limit handling
    macrocStringName of a macro that should be executed to fill the structure element
    Note: this variable will not effect anything, but will be enabled in one of the next releases.
    namecStringName of the structure element
    raw_valuetBoolSwitch if a raw value is used
    sign_signalcStringNote: The sign_signal attribute of an element node is only within the ADTF_DeviceToolbox necessary.
    Leave this proberty always empty, otherwise it is not possible to init your session.
    signalcStringThe exact notation of the SignalName as in the corresponding A2L file
    typetElementDataTypeData type of the structure element
    unit_conversiontBoolFor read-in "unit_conversion"
    valuecVariantDefault value of the signal

  9. After you have completed the configuration step save the mapping by clicking the 'OK'-Button.
    The currently opend map file will be used by the selected filter, which includes now your new configured pin.

Create an outputpin with an array struct

Using array structs for a big number of signals can help you safe configuration time and big mapfiles. You can use this functionality for signals with approximately the same signal names. The signal names can for example differ in a rising number at the end:

Counter_B0
Counter_B1
Counter_B2
Counter_B3
You have to follow these steps to add an array struct to an outputpin:
  1. Add a new pin to your configuration.
  2. Configure the pin properties (daq_event, daq_prescaler or polling_interval).
  3. You can add a struct to the pin by opening the context menu of the pin, clicking 'Add Struct...' and assign a name. These struct objects can configured by following properties:
    PropertyTypeDescription
    array_formatcStringprintf format specifier for the array index.
    array_index_namecStringA name that can be used to a placeholder for the array index in the element signal name (SignalName.Signal$array_index_name$).
    array_start_indextInt32Start index of the array.
    array_stop_indextInt32End index of the array.
    child_indextInt32Used as Structindex.
    namecStringName of the Struct.
    packtInt32Memory packing of member elements. The default is 8.
  4. To add the four counter signals to the created struct, we have to set the properties:
    • array_format: %d
    • array_index_name: idx
    • array_start_index: 0
    • array_stop_index: 3
    • name: Counter_Signals
    After appling the property changes, the mapfile will inherit a struct tag:
    <struct name="Counter_Signals" array="idx=0:3" array_format="%d">
  5. Now, you can add one of the array signals by drag and drop from the database to the struct object. Choose a generic name for the name property and replace the number of the signal property with the befor defined array_index_name:
    • name: Counter
    • signal: signal.Counter_B$idx$
    Your struct knot will know include an assigned generic signal:
    <struct name="Counter_Signals" array="idx=0:3" array_format="%d">
    <assignment>
        <to>Counter</to>
        <from>signals.Counter_B$idx$</from>
        <type>tUInt8</type>
    </assignment>
  6. The Codec will now observe all incoming / outgoing signals regarding the configured struct and pack them together. You can inspect the correct behaviour, by connecting a struct output pin to a Qt5 Media Description Display:
    An array struct displayed in the Qt5 Media Description Display

Summary

We would like to roundup the article by explaining further SCFE functionalities.

The 'File' - menu

With the help of the file menu Configuration files and database files are handled.
The following menu points are available:

The 'Mode' menu

The 'Mode' menu offers additional operations that can be executed. The following menu entries are available: