ADTF_CALIBRATION_TOOLBOX  3.6.1 (ADTF 3.14.3)
Codec Mapping

Map-files are nearly identical to the old buffer configuration files.

The difference between is, that they are now easier to use and the xml tags are now more selfexplained. In general, a map-file can be edited in two ways: \ol

  • First they can be edited by use of the "Signal Configuration Filter Editor". (For an better explanation have a look at the Calibrationtoolbox Guides Page: XCP - Signal Config Filter Editor).
  • The second way is to edit them manually by a text editor which meets the customers choice.

Mapping structure

The internal structure of a map-file consists of several xml tags which are explained in the next section. See the examples below for a minimum version of a map-file which maps a CAN message to a specified signal set and vice versa.

Mapping comparison to buffer.xml

Old vs. new buffer xml nodes overview:

old buffer xml node new buffer xml node comment
<output> <inputs> input pins
<input> <outputs> output pins
<buffer> <input> or <output> pin description
<struct> - pin description
<element> <assignment> signal element
<trigger> <trigger> (optional) trigger element

Examples of existing map-files can be found within your installation: "CALIBTB_INSTALL_DIR"/src/examples/projects/Calibrationtoolbox_Project/adtfsessions/xcp_on_can_session/external_files/DecoderMapfile.map

Example map-file for decoding

The following code snippet displays a map-file for decoding an incoming a XCP stream with three signals to a ddl-streamtype

<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<mapping codec="XCP" version="2.00">
<outputs>
<output name="MeasData" polling_interval="100000">
<assignment>
<to>testudword1</to>
<from>signals.testudword1</from>
<type>tUInt32</type>
<unit_conversion>false</unit_conversion>
</assignment>
<assignment>
<to>period</to>
<from>parameters.period</from>
<type>tFloat32</type>
<unit_conversion>false</unit_conversion>
</assignment>
<assignment>
<to>period_d</to>
<from>parameters.period_d</from>
<type>tFloat64</type>
<unit_conversion>false</unit_conversion>
</assignment>
</output>
</outputs>
</mapping>

Example map-file for encoding

Regarding to the decoding, this code snippet shows an encoding map-file for converting a ddl-streamtype to a XCP stream messagetype

<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<mapping codec="XCP" version="2.00">
<inputs>
<input name="CalibData">
<assignment>
<to>testudword1</to>
<from>signals.testudword1</from>
<type>tUInt32</type>
<unit_conversion>false</unit_conversion>
</assignment>
<assignment>
<to>period</to>
<from>parameters.period</from>
<type>tFloat32</type>
<unit_conversion>false</unit_conversion>
</assignment>
<assignment>
<to>period_d</to>
<from>parameters.period_d</from>
<type>tFloat64</type>
<unit_conversion>false</unit_conversion>
</assignment>
</input>
</inputs>
</mapping>