The Calibration Toolbox Filters

Within this part we will explain the usage of the different filters of the toolbox. The following filters are available:

The XCP Master Filter

Introduction

The "XCP Master" - Filter connects the BUS devices (e.g. "XCP on CAN") in the streaming graph with the "XCP-En/Decode" - filters in the filter graph. The "XCP Master" - Filter provides the functionality to read from and write to XCP frames. In order to receive only a sub set of the available XCP values it is necessary to add a Binding Proxy between the "XCP Master" - Filter and the XCP De-/Encode Filter.

Configuration

The most important property of the "XCP Master" - Filter is the "A2L or Xml Filename" property where you should specify the A2L file that corresponds to the ECU that should be handled. Keep in mind that the "XCP Master" - Filter requires to be connected to one of the XCP Transport Filters/Sinks or Sources (CAN, Ethernet, FlexRay) in order to communicate with the slave ECU.

Filter - Properties

Property Type Default Description
A2L or Xml FilenameFilename" "Path to the used A2L- or '_converted' XML file. In detail, the toolbox converts your A2L into a XML file (saved with the postfix '_converted.xml'). After you have converted the A2L file, it is possible to load the corresponding XML file (much faster).
Connected During StartupBooleantrueWhen enabled connect automatically to the slave.
Decode FramesBooleantrueWhen activated XCP frames will be decoded.
Dump Buffer LayoutBooleanfalseWhen set to true the filter will dump the buffer layout for inspection.
Ignore CAL/PAG available flagBooleanWhen enabled, the CALibration and PAGing support of the ECU will be forced.
Ignore Connection ErrorBooleanfalseWhen activated connection errors during startup will be ignored. Keep in mind that in case of errors no data will be received!
Ignore DAQ availabe flagBooleanfalseWhen enabled, the DAQ lists support of the ECU will be forced.
Ignore PGM available flagBooleanfalseWhen enabled, the ProGraMming support of the ECU will be forced.
Ignore Read Only flagBooleantrueIf true, the codec will allow writing of read-only signals.
Ignore STIM available flagBooleanfalseWhen enabled, the STIMulation support of the ECU will be forced.
Playback ModeBooleanfalseUse this property to connect your "XCP Master" - Filter to an ADTFDAT File Player
Reset FlexXCPBuffersBooleantrueThis is a special XCP_TRANSPORT_LAYER_CMD to reset the XCP-Buffers (F2FFFF00....). Normally your ECU should support this parameter, if not please set this property to false.
Separate DAQ CounterBooleantrueWhether or not to use a separate frame counter for DAQ/STIM and command frames.
Timeout [ns]Integer2000000The timeout for replies from the slave.
Timestamp Tick MultiplierBooleantrueDefines if the ECU timestamp has to be multiplied or divided by TIMESTAMP_TICKS. The ECU timestamp is used in DAQ/STIM mode.
Transport LayerEnum"TCP"Set the transport layer to use.
Use Synchronized Hardware TimestampBooleantrueWhen enabled, the system will use the synchronized hardware timestamp of the ECU.

Pin - Description

Name Type Description
slave_xcp_frames Input Incoming XCP frames from an ECU
signal_writes Input Incoming signal values that are written to the ECU (Substreams)
master_xcp_frames Output Outgoing XCP frames to an ECU
record_xcp_frames OutputCan be used for recording all of the XCP communication between the master filter and the ECU
signal_updates Output Signal values that have been read from the ECU (Substreams)
xcp_master Binding-Proxy Binding Proxy connection necessary for "XCP En-/Decode" - Filter

Jump to top

The XCP Decode Filter

Introduction

The "XCP Decode" - Filter can be used to read out signal values of electronic control units. These values can be transformed from XCP frames into data structures common to ADTF (mediadescription) that are transmitted over the configured output pins. XCP allows two different modes for reading data from the ECUs memory:

Configuration

The property "MapFilename" specifies a configuration file which defines, what signals are acquired and/or written and how the data structures are made up that are sent over the filters output pins. For creating such a configuration file please see the Signal Config Filter Editor chapter.

Filter - Properties

Property Type Default Description
AutoCalcUnitToSIBooleanfalse Every signal with known unit is automatically converted to its SI unit. This behavior is signal-specifically overridden by the configuration file. This property defines the default behavior.
DumpSignalUpdatesBooleantrueWhen true, then the filter will dump the value of each signal update.
FilenameIsConfigStringBooleanfalseInternal undocumented property to set a XML string as configuration instead of a file name.
LimitHandlingPolicyInteger0Handling of signal limits from database.
MapFilenameFilename" "Path to the used configuration file of the decoder.
ShowStructInfoBooleantrueDump buffer layout.

Pin - Description

Name Type Description
signal_updates Input Incoming XCP frames from the "XCP Master" - Filter
various Output Output Pin for the (SCFE) decoded signals. How to create this, have a look at the SCFE section
xcp_master Binding-Proxy Necessary connection to the "XCP Master" - Filter

Jump to top

The XCP Encode Filter

Introduction

The "XCP Encode" - Filter can be used to change signal values of the connected electronic control unit. The generated DDL values will be transformed into XCP frames and transmitted via your BUS filter to the ECU.
XCP allows two different modes for writing data to the ECUs memory:

Configuration

The property "MapFilename" specifies a configuration file which defines what signals are acquired and/or written and how the data structures are made up that are sent over the filters output pins. For creating such a configuration file please see the Signal Config Filter Editor chapter.

Filter - Properties

Property Type Default Description
AutoCalcUnitToSIBooleanfalse Every signal with known unit is automatically converted to its SI unit. This behavior is signal-specifically overridden by the configuration file. This property defines the default behavior.
DumpSignalUpdatesBooleantrueWhen true, then the filter dumps the value of each signal update.
FilenameIsConfigStringBooleanfalseInternal undocumented property to set a XML string as configuration instead of a file name.
LimitHandlingPolicyInteger0Handling of signal limits from database.
MapFilenameFilename" "Path to the used configuration file of your encoder.
ShowStructInfoBooleantrueDump buffer layout.

Pin - Description

Name Type Description
various Input Input Pin for the (SCFE) encoded signals. How to create this, have a look at the SCFE section
signal_writes Output Outgoing XCP frames to the "XCP Master" - Filter
xcp_master Binding-Proxy Necessary connection to the "XCP Master" - Filter

Jump to top

The XCP Emulator Filter

Introduction

The XCP Emulation Filter allows you to simulate any given ECU for which an A2L description file is available.

Configuration

To do so you specify the A2L file within the "A2L or Xml Filename" property and connect the filter with the XCP Transport Filter/Sink or Source (CAN, Ethernet, etc.) of your liking. Please make sure that you enable the "Slave Mode" property of your transport filter. The behaviour of the emulated ECU is described via a mandatory configuration file that specifies several so called ECU Processors. ECU Processors are plugins that can write to and read from ECU memory locations and react upon trigger events in the ECU. Please see following section for details.

ECU Processor Configuration

The XML configuration file format is best described with the help of the following example:

  
  <?xml version="1.0" encoding="utf-8" standalone="no"?>
  <settings>
    <ecu_processors>
        <processor oid="adtf.ecu_processor.cyclic" event_name="100ms" interval="100000" />
        <processor oid="adtf.ecu_processor.constants" count="2" signal0="byteConstant1" value0="123" signal1="byteConstant2" value1="321" />
        <processor oid="adtf.ecu_processor.counter" signal_name="wordCounter" interval="50000" />
        <processor oid="adtf.ecu_processor.adtf_signal" signal_name="sawtooth" adtf_signal_name="Demo_Sawtooth_Provider/Demo Sawtooth Signal 0" />    
    </ecu_processors>
  </settings>
  
    
You can specify as many ECU Processors as you like (even multiple of the same kind) and you can configure your own ECU Processors. You can find a description of the already available ECU Processors in the following section.

Cyclic Event Processor

The Cyclic Event processor can be used to trigger a DAQ Event at a specific time interval.

Property Type Description
event_nameString The name of the event that should be triggered. Must be defined in the A2L file.
intervalInteger The interval in micro seconds at which the event should be triggered.

Constants Processor

The Constants processor can be used to set constant signal values at startup.

Property Type Description
countInteger The number of constants that should be set.
signalNString The signal name for constant N (with N starting at 0). Must be defined in the A2L file.
valueNInteger/Float The signal value for constant N (with N starting at 0).

Counter Processor

The Counter processor can be used to simulate a signal that represents a counter.

Property Type Description
signal_nameString The name of the signal that should be provided. Must be defined in the A2L file.
intervalInteger The interval in mirco seconds at which the counter should be incremented.

ADTF Signal Processor

The ADTF Signal processor can be used to forward a signal available through the ADTF Signal Registry on XCP.

Property Type Description
signal_nameString The name of the XCP signal that should be provided. Must be defined in the A2L file.
adtf_signal_nameString The name of the ADTF signal that should be forwarded.
scaleFloat An optional scale factor that is applied to the signal.
offsetFloat An optional offset that is added to the signal.

Filter - Properties

Property Type Default Description
A2L or Xml FilenameFilename" "Path to the used A2L- or '_converted' XML file. In detail, the toolbox converts your A2L into a XML file (saved with the postfix '_converted.xml'). After you have converted the A2L file, its possible to load the corresponding XML file (much faster).
Configuration FileFilename" "Path to the used emulator configuration file.
Don't reply invalid commandsBooleanfalseWhether or not to ignore invalid commands.
Dump XCP FramesBooleanfalseIf true, then raw XCP frames will be dumped.
Enable CALBooleantrueWhether or not to support the CAL/PAG group of XCP commands.
Enable DAQ CommandsBooleantrueWhether or not to support the DAQ group of XCP commands.
Enable PGM CommandsBooleanfalseWhether or not to support the PGM commands.
Enable STIM CommandsBooleantrueWhether or not to support the STIM commands.
Enable Slave Block ModeBooleantrueWhether or not to enable Slave Block Mode.
Enable Transport Layer CommandsBooleanfalseWhether or not to support the Transport Layer commands.
Include invalid addressesBooleanfalseWhether or not to ignore invalid addresses.
Reply DelayInteger0Additional delay before sending replys to commands (microseconds).
Separate DAQ CounterBooleanfalseWhether or not to use a separate frame counter for DAQ/STIM and command frames.
Timestamp Tick MultiplierBooleanfalseDefines if the ECU timestamp has to be multiplied or divided by TIMESTAMP_TICKS. The ECU timestamp is used in DAQ/STIM mode.
Transport LayerListTCPDefine the used transport layer.

Pin - Description

Name Type Description
input_xcp_frames Input Incoming XCP frames from the connected XCP Transport Filter/Sink or Srouce
output_xcp_frames Output Outgoing XCP frames to the connected XCP Transport Filter/Sink or Srouce

Jump to top

The XCP on CAN Filter

Introduction

The "XCP On CAN" - Filter can be used to communicate with ECUs that support XCP via CAN.

Configuration

To use it connect:

You will also find a example configuration within the delivered 'calibrationtoolbox.adtfproject'.

Filter - Properties

Property Type Default Description
CAN Channel ID Integer 1 The CAN channel use for sending and receiving messages.
CAN Extended Boolean falseFor extended CAN-ID frames the length for the arbitration part is 50 bits, otherwise the length would be 30 bits.
Max DLC Required Boolean true With Max DLC Required, the slave can inform the master that it has to use CAN frames with data length 8 bits when sending to the slave.
Slave Mode Boolean false Enables slave mode, for use with the "XCP Emulator" - Filter.
XCP Master CAN Message ID Integer -1 If specified, XCP frames from master to slave will be transmitted via CAN messages with the given ID. Otherwise the settings from the A2L file will be used.
XCP Slave CAN Message ID Integer -1 If specified, XCP frames from slave to master will be transmitted via CAN messages with the given ID. Otherwise the settings from the A2L file will be used.

Pin - Description

Name Type Description
can_msg_in Input Incomming CAN frames from the connected ECU.
xcp_frames_in Input Incoming XCP frames from the connected "XCP Master".
can_msg_out Output Outgoing CAN frames to the connected ECU.
xcp_frames_out Output Outgoing XCP frames to the connected "XCP Master".
xcp_master Binding-Proxy Necessary connection to the "XCP Master" - Filter

Jump to top

The XCP On FlexRay Filter

Introduction

The "XCP On FlexRay" - Filter can be used to communicate with ECUs that support XCP via FlexRay.

Configuration

To use it connect:

Filter - Properties

Property Type Default Description
Alignment Enum -1 This property indicates the alignment a slave uses for its XCP packets. If there should be used the settings from the corresponding A2L file, use the default '-1' setting.
Concatenation Boolean false Defines if multiple XCP Frames can be concatenated into one buffer.
FlexRay Channel Enum -1 The FlexRay Channel which should be used to sent and receive FlexRay-messages. If not specified, the settings from the current A2L file will be used.
Ignore FlexRay Channel Boolean true If true it is ignored if a signals is sent at ChannelA or ChannelB.
Message Counter Boolean false If sequence correcting should be possible, the slave has to use a header type that contains the CTR field. The 1-byte field CTR allows to detect missing packets and to correct sequencing errors.
NAX Integer -1 If multiple XCP slaves want to use the same LPDU_ID in the direction from master to slave, the slaves are distinguished by their Node Address for XCP (NAX). If specified, the configuration uses this integer as NAX. Otherwise the settings from the A2L file will be used.
Slave Mode Boolean false Enables slave mode, for use with the "XCP Emulator" - Filter.
XCP FlexRay Header Type Enum -1 Header types for first XCP message of a FlexRay frame. If no Header type is specified, the system will use the XCP FlexRay Header Type from the current A2L file

Pin - Description

Name Type Description
flx_msg_in Input Incomming FlexRay frames from the connected ECU.
xcp_frames_in Input Incoming XCP frames from the connected "XCP Master".
flx_msg_out Output Outgoing FlexRay frames to the connected ECU.
xcp_frames_out Output Outgoing XCP frames to the connected "XCP Master".
xcp_master Binding-Proxy Necessary connection to the "XCP Master" - Filter

Jump to top

XCP On Ethernet Streaming Source

Introduction

The "XCP On Ethernet" - Source can be used to communicate with ECUs that support XCP via Ethernet.

Configuration

To use it connect:

With the delivered XCP on Ethernet - Master Session we are providing you a small example how to build up a running XCP On Ethernet Connection.

Source - Properties

Property Type Default Description
Enable Frame Header Counter Boolean true In case where XcpFrameHeaderCounterBytes and XcpFrameHeaderCounterBytes are both 1 or 2, this defines whether the counter field actually contains a counter or is just padding
Frame Header Counter Bytes Integer 2 The size of the counter field in the ethernet XCP frame header
Frame Header Length Bytes Integer 2 The size of the length field in the ethernet XCP frame header
Slave Host String " " The hostname, IPv4 or IPv6 address of the slave ECU
Slave Mode Boolean false Enables slave mode, for use with the XCP Emulator Filter
Slave Port Integer 0 The TCP or UDP port used by the slave ECU
TCP Boolean true Whether to use TCP or UDP for communication
Wakeup Boolean false Enabled 'wakeup' of ECU

Pin - Description

Name Type Description
flx_msg_out Output Outgoing FlexRay frames to the connected ECU.
xcp_frames_out Output Outgoing XCP frames to the connected "XCP Master".
xcp_master Binding-Proxy Necessary connection to the "XCP Master" - Filter

Jump to top