ADTF
|
Plugin Filename | adtf_ddl_mapping_filter.adtfplugin |
---|---|
Plugin Description | adtf_ddl_mapping_filter.plugindescription |
Plugin Name | DDL Mapping Filter Plugin |
License | ADTF |
Support Mail | support@digitalwerk.net |
Homepage URL | support.digitalwerk.net |
Plugin Version | 3.99.99 |
---|---|
Plugin File Version | 1.0 |
adtf | 3.99.99 |
adtf::ucom | 3.1.0 |
Name | DDL Mapping Filter |
---|---|
CID | ddl_mapping.filter.adtf.cid |
Description | Use this Filter to convert the content of DDL based samples from one or more incoming structured memory or plain type values to one or more outgoing structured memory or plain type value. |
Type | Filter |
Name | Value | Type | Description | Subproperties |
---|---|---|---|---|
default_trigger_time | 0 | tUInt32 | Minimal default trigger time in ms (for targets with no trigger) | |
description_files | cFilenameList | (Legacy mapping 1.0) List of filenames for description files to use. | Filename Extension Filter: Description files (*.description) | |
mapping_file | cFilename | Filename for a *.map file that contains source and targets which can than be mapped to dynamic input/output pin.s | Filename Extension Filter: Map files (*.map) | |
output_sample_time | 0 | tUInt8 | Option to use whether the current timestamp of the trigger or the current clock timestamp for the output sample time. | Value List: While writing the output use the time of the sources sample time. = 0 While writing the output use the current trigger time. = 1 |
Name | Activation Type | Data Triggered | Data Input | Thread Triggered | Thread Cyclic | Timer Triggered | Timer Interval | Description |
---|---|---|---|---|---|---|---|---|
periodic_trigger | 1 | 0 | 0 | 0 | 1 | 100 | Runner to periodically trigger the function which generates the output data for periodic triggers within mapping file. |
Dynamic Input Pins | true |
---|---|
Dynamic Output Pins | true |
Dynamic Input Binding Pins | false |
Dynamic Output Binding Pins | false |
The DDL Mapping Filter is to convert the content of DDL based samples from one or more incoming structured memory or plain type values to one or more outgoing structured memory or plain type value.
To do so, the filter reads and interprets a DDL mapping file. The mapping file will describe a mapping prescription what content to read and where to write it. For a detailed description of the content please see https://digitalwerk.gitlab.io/solutions/adtf_content/adtf_base/adtf_core/dev_essential/doc/html/md_doc_html_ddl_mapping_specification.html.
The file contains so called sources with a name and a set DDL type or plain type. Also, it contains targets with a name and a set DDL type or plain type. Targets will transcribed into outpin, sources are corresponding input pins. Within targets it is possible to assign from source values to target values.
Following names and types are possible for targets and sources:
example of mapping file content | resulting input pin | possible assignment |
---|---|---|
<source name="NestedStruct" type="tNestedStruct" />
| Pin:
tNestedStruct must be described in one of the given description_files or the Media Description Service. | On the targets mapping assignment, you can access the content with following statement: <assignment to="my_new_x" from="NestedStruct.sSimpleStruct.ui8Val"/>
|
<source name="x" type="INT64" />
| Pin:
BOOL, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT32, FLOAT64 . | <assignment to="my_new_x" from="x.value"/>
|
<source name="my_source_pin/NestedStruct" type="tNestedStruct" />
| Pin:
tNestedStruct must be described in one of the given description_files or the Media Description Service, otherwise initialisation will fail. Additionally, the NestedStruct substream name must exists within the connected sample stream, the filter will request and strongly expect it. | <assignment to="my_new_x" from="my_source_pin/NestedStruct.sSimpleStruct.ui8Val"/>
|
<source name="my_source_pin/x" type="INT64" />
| Pin:
BOOL, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT32, FLOAT64 | <assignment to="my_new_x" from="my_source_pin/x.value"/>
|
example of mapping file content | resulting output pin | possible assignment |
---|---|---|
<target name="NestedStruct" type="tNestedStruct" />
| Pin:
tNestedStruct must be described in one of the given description_files or the Media Description Service. | On the targets mapping assignment, you can access the content with following statement if the source is a substream: <assignment to="NestedStruct.sSimpleStruct.ui8Val" from="my_source_pin/x.value"/>
, or if the source is a ddl type: <assignment to="NestedStruct.sSimpleStruct.ui8Val" from="my_source_pin.sSimpleStruct.ui8Val"/>
, or if the source is a plain type: <assignment to="NestedStruct.sSimpleStruct.ui8Val" from="my_source_pin.value"/>
. |
<target name="result" type="INT64" />
| Pin:
BOOL, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT32, FLOAT64 . | <assignment to="value" from="my_source_pin/x.value"/>
or <assignment to="value" from="my_source_pin.sSimpleStruct.ui8Val"/>
or <assignment to="value" from="my_source_pin.value"/>
|
<target name="my_target_pin/NestedStruct" type="tNestedStruct" />
| Pin:
tNestedStruct must be described in one of the given description_files or the Media Description Service, otherwise initialisation will fail. | <assignment to="sSimpleStruct.ui8Val" from="my_source_pin/x.value"/>
or <assignment to="sSimpleStruct.ui8Val" from="my_source_pin.sSimpleStruct.ui8Val"/>
or <assignment to="sSimpleStruct.ui8Val" from="my_source_pin.value"/>
|
<source name="my_target_pin/x" type="INT64" />
| Pin:
BOOL, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT32, FLOAT64 | <assignment to="value" from="my_source_pin/x.value"/>
or <assignment to="value" from="my_source_pin.sSimpleStruct.ui8Val"/>
or <assignment to="value" from="my_source_pin.value"/>
|
Each target my have one or more triggers defined.
The DDL Mapping Filter will work data triggered on each configured source. For each target within the mapping file it is possible to congure it data triggered or time triggered:
Data Triggered:
my_source_pin
my_source_pin
AND the content of value is greater than 2
. Time Triggered:
periodic_trigger
is called and the last call time is more than 5 seconds ago.