ddl_utility  1.4.2
DDL Mapping Editor

Description

The Mapping Editor gives the opportunity to create and modify signal mappings for Signals. It enables to compose input signals from other Source Signals. In order to create such compositions, the Mapping Editor loads existing DDL types to create new signals from source signals, constants and simple functions.

The Mapping Editor is conceived to open, edit and create mapping configuration files. They usually use the file extension ".map".

Mapping Editor

To recognize the datatypes used in an existing mapping configuration, the Editor needs one or more DDL (Data Description Language) files. When a mapping is loaded, the Editor will automatically try to load the DDL file in the same directory and with the same name as the Mapping file (for example: test.map and test.description are in the same folder). It is also possible to load DDL files manually from the DDL Manager using the Toolbar functionality Manage DDL or from the menu item Mapping/Manage DDL.

DDL Manager

Usage

The terms used in this document are illustrated in the following picture. Terms description

Menubar

The menu contains all functionalities that can be applied to a complete mapping configuration. Nearly all the functionalities can also by accessed directly from the toolbar, so many functions will be detailed in the next section Toolbar

Menu/Mapping

Menu/Mapping

This menu holds additional mapping features like Metainformation, Triggers, Transformation, Manage DDL, AutoConnect and Clear Assignments.

Meta Information

The Meta Information overview is the only function that can only be accessed from the Menu. It gives access to the Meta information saved in the mapping configuration file header. Some informations like the author and creation date can be read, and the description can be modified. Meta information

Toolbar

In the Toolbar you can find the most important Mapping Features for a comfortable use of the Mapping Editor. These Items can also be accessed from the Menubar. Toolbar

New Mapping

To create a new mapping configuration you can click on the New button, the default name of a new Mapping configuration is "unnamed.map". If a mapping was modified, the Editor will ask if it must be saved before closing it.

Open Mapping

A Mapping can be opened with the Open button in the Toolbar, from the Open Item in File/Open. All signals, triggers, transformations and assignments will be loaded from the mapping configuration file. It is also possible to give the path to a mapping file as an argument to the Mapping editor. It will then directly open the configuration on start. A mapping configuration always has the filename extension ".map".

Save Mapping

The Save button can only be used if the current mapping configuration was modified. If the current File is Up-To-Date the Save button is disabled. However the Mapping can always be saved with the SaveAs function in the file menu.

The path to the currently opened file is shown in the editor title. If no path is specified, a native standard dialog opens where the user can specify where he wants to save the current mapping configuration.

In addition to the mapping file a DDL description file is created. It contains the DDL description underlying the current mapping and therefore contains both the source and target data types.

Manage DDL

The Manage DDL button opens a new dialog were the loaded DDL files can be added and removed. Manage DDL dialog

Autoconnect

Autoconnect elements Creates an automatic connection between all source and target elements with the same name. If more than one connection is possible for a target element, no connection will be added. If a target element is already assigned and can be connected, a dialog will be opened to ask if you want overwrite the assignment. If no connection is possible, the assignment will not be modified.

Warning: Use this option wisely! It will override potential assignments and could take a long time to process all assignments.

Clear Assignments

Clear all assignment Clears all assignments of the current mapping. Signals, triggers and transformations are kept unchanged.

Triggers

All available Triggers can be reviewed and modified from the Toolbar button Triggers. It opens the "Trigger Overview" dialog where you can add, remove or edit existing triggers. Triggers Overview

Triggers can be of three types: periodic (time-triggered), signal triggered or data triggered. A periodic trigger takes a numeric period and a unit (second, millisecond or microsecond). A signal trigger takes the name of the triggering signal. A data trigger takes a Signal element, a comparator and a numeric value (for example Signal1.Element1 < 2). It will be triggered when the comparison is true.

Editing a Trigger will open the Modify Trigger dialog, were some changes can be applied. It is not possible to change the type of an existing trigger. Trigger modification

Triggers can be assigned to a Target Signal by doubleclicking in the corresponding triggers field in the Targetview. It opens a new dialog were triggers can be selected by checking the checkbox on the left column. Before closing the window the Editor will ask if the new trigger selection should be applied to the current target. Triggers can also be added, removed or edited directly from this dialog. Trigger checkbox

Transformations

The Transformations button opens a new dialog, where you get an overview about all available transformations. In this dialog transformations can be added, removed or modified. Transformations_Dialog

Two types of transformations are available: polynomial and enumeration transformations. The type of an existing transformation cannot be changed. A Transformation with an empty name cannot be saved. By doubeclicking on an existing transformation the modify transformation dialog opens where additional modifications can be done.

The polynomial transformation uses the coefficients a, b, c, d and e to calculate the polynom f(x) = a + bx + cx² + dx³ + ex⁴ Transformation modification

Source and Target views

Source and Target view This area gets an overview of the mapped signals.

Signal Trees

A mapping configuration consists of signals defined by DDL Structures. Each signal contains one or more elements. Elements can be structures, arrays or basic elements such as integers, floats and booleans. The types of the Signals and Elements have to be part of one of the loaded DLL's. You get informed by the editor if any type is missing through color marking: dark red signals and elements were not found in DDL. The Source view represents the incoming Signals/Elements and the Target view represents the output Signals/Elements. The different colors symbolize the assignment status of the Signal/Element (see Colors and tool tips in Signal Views).

By using the mouse right button a context menu can be opened. In an empty space this menu allows to expand all signals and to add a new Signal by opening a new dialog. In this dialog the name and the type of the signal can be chosen. With a right click on an existing Signal it is possible to rename or delete it.

Note: Elements don't have any context menu! They don't have valid options that could be edited.

Search Area

Search area The text entered in the Searchbar will be searched in the item name by entering "Enter" or pressing the "Search" button. Setting the anchor button connects both search bars. The same string will then be searched in the two signal views. Moreover, the filter combo boxes allow to filter elements from their assignment status:

  • All (Shows all)
  • Assigned (Shows the assigned ones)
  • Unassigned (Shows the unassigned ones)
  • Errors (Shows the Signals/Elements with Errors)

Additionally the following options are available for the Target view

  • Constants (Shows the ones with a constant assignment)
  • Source selected (Shows the ones with a Source Signal/Element assignment)
  • Functions (Shows the Elements that have a function assigned)

Connect

Connect elements

To connect two elements using the Connect button, a Source signal or element must be first selected, and then one or more Target elements. If the Target element is first selected, it will be deselected when the source is clicked (selecting a source automatically selects the Target elements that are connected with it, and deselects the others). If the connection fails (for example because the two elements have incompatible types), an error will be shown on the bottom left corner ( see Mapping Errors). If it is successful, you can see the connected elements in the Detailed View ( see Detailed View). It is also possible to add a connection directly from the Detailed View ( see Detailed View).

note: complete Target signals cannot be assigned, only Target elements can be assigned. However, a Target elements can be connected with a complete Source signal.

warning: If the data types of the connected pair differ, there can possibly be a loss of data information.

A connected Signal or Element has a specific color and a status notification (as tool tip) for the user. See Colors and tool tips in Signal Views.

Disconnect

Disconnect elements To remove an assignment to one or more Target elements, simply select them and click on the Disconnect button. It is also possible to remove an assignment directly from the Detailed View ( see Detailed View).

Detailed View

Detailed view This area allows to review and modify all assignments. All selected Target elements in the Target View are shown in this table. When a Target signal is clicked, all its elements are visible in the table. This way it is possible to have an overview over all assignments for a particular Target signal.

note: because all elements will be shown, it can last a bit longer when a signal with a lot of elements is clicked.

All possible assignments can be set and removed from this area. It is possible to remove an assignment by setting an empty entry in all assignment columns (Constant, Source Element, Transformation and Function) or through the context menu Clear button.

Assignments

Connection

It is possible to set a connection by using the column Source Element. A double click in this column opens a combo box where a Source can be selected. Connection in detailed view

Transformations

A transformation can be added to a connection in order to modify the Source value before assigning it to the Target. To add a new transformation, it must first be created in the Transformations overview (see Transformations ), it will then appear in the combo box in the Transformation column. This combo box appears only if the assignment is already a connection between two signals, transformations cannot be applied on constants or functions. Transformation in detailed view

Constants

A Target element can take a constant value as input. This value can be set in the Constant column in the form of a floating point number. Constant in detailed view

Function

Three different functions are available:

  • The trigger_counter function assigns a counter that is increased each time the signal will be triggered
    • In order to prevent too big values, it is possible to give a constant that will be used as a modulo
  • The received function will return false as long as the selected Source signal was not received, and true afterwards
    • If no Source signal was selected, one signal will be selected automatically per default (the first one in the list)
  • The simulation_time function returns the simulation time
    • It doesn't need any attributes

Function in detailed view

Mapping Errors

If an error happens when trying to load or modify a mapping configuration, you get an error at the bottom of the editor. By clicking on this message it is possible to open a new dialog containing a detailed list of all errors in the current mapping. Mapping errors

Appendix

In this section the different colors and tool tips used in the Signal view of the Mapping Editor will be described.

  • White
    • Signal: No element assigned
    • Element: No assignment
  • Dark Red Dark Red
    • Signal: Type is not in DDL
    • Element: Element doesn't exist in type
  • Orange Orange
    • Element: bad assignment (connected element does not exist)
  • Green Green
    • Source signal: All elements are assigned or the whole signal is assigned
    • Target signal: All elements are assigned
    • Element: The element is connected to a Source signal or element (can also have a transformation)
  • Light Blue Light Blue
    • Element: constant assigned
  • Purple Purple
    • Element: function assigned
  • Light Green Light Green
    • Signal: Some elements are assigned, but not all
  • Light Orange Light Orange
    • Signal: Some elements have bad assignments

Example

This is an example how to create a very basic mapping.

First you need the DDL descriptions relevant for this mapping. This is done in the Manage DDL window:

Example 01

Add one or more .description files using the add button. These descriptions should contain the input and output signal types for the desired mappings. The input and output types can either be present in seperate files or reside in the same description file:

Example 02

Now add an input signal using the right-click context menu:

Example 03

Choose a name and the appropriate SignalType (the dropdown menu is populated from the loaded DDL description files):

Example 04

Also add an output signal the same way as the input signal:

Example 05

Now the input and output signals are visible. Choose the appropriate element both in the input and output signal view and press the connect button to create a signal mapping:

Example 06

If you select the connected source signal you can see the mapping in the detail view below:

Example 07

Now you can add a trigger using the Triggers button. Choose Add to create a new trigger. Choose the appropriate options:

Example 08

The trigger is now visible in the Triggers Overview:

Example 09

Now you can save your new mapping using the Save button. A .map file will be created which contains the mapping. In addition to that a .map.description file will be created which contains the underlying DDL description for this mapping.


Copyright © VW Group. All rights reserved.
Generated on Mon Sep 16 2024 by doxygen 1.9.1
GIT Commit Hash: 23c4fe0937d407e7ec8b56d3d3b7d74977f705c9