Difference between revisions of "Technical topic: SedsConverter"

From TASTE
Jump to: navigation, search
(Basic usage)
(Export to SEDS)
(3 intermediate revisions by the same user not shown)
Line 65: Line 65:
 
|-
 
|-
 
| --asn1-filepath-prefix <prefix>  
 
| --asn1-filepath-prefix <prefix>  
| <prefix> to add at the beginning of the ASN1 output filepath
+
| <prefix> to add at the beginning of the ASN.1 output filepath
 
|}
 
|}
  
Line 108: Line 108:
  
 
== GUI usage ==
 
== GUI usage ==
 +
[[File:sedsconverter.png|350px|thumb|right|Menu with SedsConverter options available via GUI]]
 
SEDS import and export operations are accessible through graphical user interface. The following options are available:
 
SEDS import and export operations are accessible through graphical user interface. The following options are available:
 
* '''Import InterfaceView''' - a user selects a SEDS file containing InterfaceView description; SedsConverter adds described functions to the current interaceview.xml file
 
* '''Import InterfaceView''' - a user selects a SEDS file containing InterfaceView description; SedsConverter adds described functions to the current interaceview.xml file
Line 114: Line 115:
 
* '''Export InterfaceView''' - a user selects IV functions from the current project which will be exported to SEDS .xml file; a user selects a destination directory, where the output shall be placed by SedsConverter
 
* '''Export InterfaceView''' - a user selects IV functions from the current project which will be exported to SEDS .xml file; a user selects a destination directory, where the output shall be placed by SedsConverter
 
* '''Export ASN.1''' - a user selects ASN.1 and ACN files to be exported to SEDS .xml file; a user selects a destination directory, where the output shall be placed
 
* '''Export ASN.1''' - a user selects ASN.1 and ACN files to be exported to SEDS .xml file; a user selects a destination directory, where the output shall be placed
 +
 +
 +
=== Import from SEDS ===
 +
 +
==== InterfaceView ====
 +
To import InterfaceView choose ''Tools -> SEDS -> Import InterfaceView'' and select SEDS file which contains IV functions that shall be imported.
 +
 +
[[File:sedsconverter_import_iv.png|450px]]
 +
[[File:sedsconverter_import_iv_select_src.png|450px]]
 +
 +
==== SDL ====
 +
To import SDL functions choose ''Tools -> SEDS -> Import SDL'' and select SEDS file which contains SDL functions that shall be imported.
 +
 +
[[File:sedsconverter_import_sdl.png|450px]]
 +
[[File:sedsconverter_import_sdl_select_src.png|450px]]
 +
 +
==== ASN.1 ====
 +
To import ASN.1 data definitions choose ''Tools -> SEDS -> Import ASN.1'' and select SEDS file which contains ASN.1 data that shall be imported.
 +
 +
[[File:sedsconverter_import_asn1.png|450px]]
 +
[[File:sedsconverter_import_asn1_select_src.png|450px]]
 +
 +
=== Export to SEDS ===
 +
==== InterfaceView ====
 +
To export InterfaceView functions choose ''Tools -> SEDS -> Export InterfaceView'' and select IV functions which shall be exported to SEDS. Click ''export to SEDS'' and in the next dialog select a destination directory for the output file.
 +
 +
[[File:sedsconverter_export_iv.png|350px]]
 +
[[File:sedsconverter_export_iv_select_function.png|280px]]
 +
[[File:sedsconverter_export_iv_select_dst.png|350px]]
 +
 +
==== ASN.1 ====
 +
To export ASN.1 definitions choose ''Tools -> SEDS ->  Export ASN.1'' and select .asn and .acn files which shall be exported to SEDS. In the next dialog select a destination directory for the output file.
 +
 +
[[File:sedsconverter_export_asn1.png|350px]]
 +
[[File:sedsconverter_export_asn1_select_files.png|350px]]
 +
[[File:sedsconverter_export_asn1_select_dst.png|350px]]

Revision as of 12:05, 30 November 2021

Introduction

SedsConverter is a tool that provides EDS import/export capabilities to TASTE:

  • generation of TASTE compliant ASN.1/ACN, InterfaceView and SDL from EDS;
  • generation of EDS from TASTE InterfaceView and ASN.1.

InterfaceView XML files can be then converted to AADL with the usage of the SpaceCreator.

SedsConverter is a part of the SpaceCreator project. It can be used either from the command line interface or from the SpaceCreator GUI.

Capabilities

The following conversion directions are supported:

  • SEDS → ASN.1
  • SEDS → InterfaceView
  • SEDS → SDL
  • ASN.1 → SEDS
  • InterfaceView → SEDS

Building and updating

Building from sources

SedsConverter is built as a part of the SpaceCreator. For the SpaceCreator building instructions please consult its README file.

Updating with SpaceCreator

SedsConverter is updated as a part of the SpaceCreator. To perform an update run the following commands in the terminal:

   $ cd ~/tool-src
   $ ./install/88_spaceCreator.sh

Console interface usage

SedsConverter can be accessed through the SpaceCreator AppImage

   $ spacecreator.AppImage --sedsconverter --help

If SedsConverter was built from sources, then the console interface can be found in the build directory

   $ <build_dir>/bin/sedsconverter --help

Basic usage

Conversion requires input filename and conversion direction to be passed via options

   $ spacecreator.AppImage --in <filename> --from <input models> --to <output models>

i.e to convert a SEDS file to ASN.1 type the following command:

   $ spacecreator.AppImage --sedsconverter --in input.xml --from SEDS --to ASN.1


Models could also have dependencies. Those dependencies can be resolved in two ways:

  1. User provides input files for all models that are required for the given conversion
  2. SedsConverter tries to resolve dependencies using available inputs

Example: SEDS to InterfaceView conversion requires an ASN.1 model. User can either: provide ASN.1 input file to be used during the conversion

   $ spacecreator.AppImage --sedsconverter --in input.xml,input.asn --from SEDS,ASN.1 --to InterfaceView

or use SEDS input to create an intermediate ASN.1 model

   $ spacecreator.AppImage --sedsconverter --in input.xml --from SEDS --to InterfaceView


Additionally the intermediate models can be also exported using --aux option:

   $ spacecreator.AppImage --sedsconverter --in input.xml --from SEDS --to InterfaceView --aux ASN.1

Available commands

ASN.1

--acn-filepath-prefix <prefix> <prefix> to add at the beginning of the ACN output filepath
--asn1-filepath-prefix <prefix> <prefix> to add at the beginning of the ASN.1 output filepath

InterfaceView

--iv-config <file> Specify config xml <file> for InterfaceView
--iv-generate-parent-functions Generate parent functions for each SEDS package

SDL

--sdl-filepath-prefix <prefix> SDL filepath <prefix>

SEDS

--seds-preprocessed-filepath Path to the intermediate file that will be created during preprocessing
--seds-schema Specify schema <file> for SEDS
--seds-ext-ref <references> Specify external <references> for SEDS, e.g. foo:bar,foo2:bar2,foo3:bar3,...
--seds-ext-ref-file <file> Specify <file> with an external references for SEDS
--skip-validation Skip validation for SEDS
--keep-intermediate-files Keep SEDS intermediate files

GUI usage

Menu with SedsConverter options available via GUI

SEDS import and export operations are accessible through graphical user interface. The following options are available:

  • Import InterfaceView - a user selects a SEDS file containing InterfaceView description; SedsConverter adds described functions to the current interaceview.xml file
  • Import SDL - a user selects a SEDS file containing SDL data; SedsConverter extracts SDL data and outputs it to dedicated .pr files
  • Import ASN.1 - a user selects a SEDS file containing ASN.1 type definitions; SedsConverter extracts definitions and creates .asn and .acn files in the current project directory
  • Export InterfaceView - a user selects IV functions from the current project which will be exported to SEDS .xml file; a user selects a destination directory, where the output shall be placed by SedsConverter
  • Export ASN.1 - a user selects ASN.1 and ACN files to be exported to SEDS .xml file; a user selects a destination directory, where the output shall be placed


Import from SEDS

InterfaceView

To import InterfaceView choose Tools -> SEDS -> Import InterfaceView and select SEDS file which contains IV functions that shall be imported.

Sedsconverter import iv.png Sedsconverter import iv select src.png

SDL

To import SDL functions choose Tools -> SEDS -> Import SDL and select SEDS file which contains SDL functions that shall be imported.

Sedsconverter import sdl.png Sedsconverter import sdl select src.png

ASN.1

To import ASN.1 data definitions choose Tools -> SEDS -> Import ASN.1 and select SEDS file which contains ASN.1 data that shall be imported.

Sedsconverter import asn1.png Sedsconverter import asn1 select src.png

Export to SEDS

InterfaceView

To export InterfaceView functions choose Tools -> SEDS -> Export InterfaceView and select IV functions which shall be exported to SEDS. Click export to SEDS and in the next dialog select a destination directory for the output file.

Sedsconverter export iv.png Sedsconverter export iv select function.png Sedsconverter export iv select dst.png

ASN.1

To export ASN.1 definitions choose Tools -> SEDS -> Export ASN.1 and select .asn and .acn files which shall be exported to SEDS. In the next dialog select a destination directory for the output file.

Sedsconverter export asn1.png Sedsconverter export asn1 select files.png Sedsconverter export asn1 select dst.png