-
Notifications
You must be signed in to change notification settings - Fork 14
How to use the faracon tool from command line
After having installed FARACON, the directory for the specific build (e.g. linux x86_64) may be copied in any place of the filesystem where it seems more appropriate to be. Let's suppose we use $HOME/faracon
.
cp -a franca_ara_tools/products/org.genivi.faracon.cli.product/target/products/org.genivi.faracon.cli.product/linux/gtk/x86_64 $HOME/faracon
In order to ease the usage of FARACON, the $PATH environment variable can be set in order to launch the tool without having to specify the absolute path of the executable:
export PATH=$PATH:$HOME/faracon
In order this change to be permanent, the previous line can be added to $HOME/.bashrc
if you are using bash, $HOME/.shrc
if you are using sh. For other shells, please check the shell's documentation.
faracon-linux-x86_64 --help
will print the following output:
Command: Console Help
Command: Franca ARA Converter
usage: faracon [-a <arg>] [-c] [-ca] [-d <arg>] [-e] [-f <arg>] [-i <arg>] [-L
<arg>] [-l <arg>]
-a,--ara-to-franca <arg> Arxml file that will be converted to .fidl or
directory what will be recursively scanned for
.arxml files and each one of them will be
converted to corresponding fidl ones.
-c,--continue-on-errors Do not stop the tool execution when an error
occurs.
-ca,--check-arxml-files-only Checks the provided ARXML files.
-conf,--f2aconfig <arg> Supply configuration file for command line
related to Franca-to-arxml generation.
-d,--dest <arg> Output directory for the generated files.
-e,--warnings-as-errors Treat warnings as errors.
-f,--franca-to-ara <arg> Franca file that will be converted to arxml or
directory what will be recursively scanned for
fidl files and each one of them will be
converted to corresponding arxml ones.
-i,--include <arg> Additions to classpath.
-L,--license <arg> The file path to the license text that will be
added to each generated file.
-l,--log-level <arg> The log level (quiet or verbose).
Command: Console Help
usage: faracon -h
-h,--help Print out options of the tool.
Command: Version Information
usage: faracon -v
-v,--version Show version number of the tool.
Note: All paths given as command line arguments should be either absolute paths or relative to the folder where the faracon executable resides.
Convert all the fidl files in /path/to/fidls
storing the output in /path/to/output
, with a verbose logging level and continuing to translate the next fidls if an error happen:
faracon-linux-x86_64 -f /path/to/fidls/ -d /path/to/output/ -l verbose -c
The -conf
option allows to specify a configuration file with detailed options for the Franca-to-arxml transformation. The configuration file has the well-known key=value
format. The following example file shows the available options and their respective defaults.
# general
IsAdminDataLanguageGenerationNeeded=false
IsAnnotationGenerationNeeded=true
# service interfaces
IsOptionalFalseGenerationNeeded=false
IsAlwaysFireAndForgetGenerationNeeded=false
# application data types
IsADTsGenerationNeeded=false
IsStoringADTsLocallyNeeded=true
ADTPrefix=
# implementation data types
IDTPrefix=
IsReplacingIDTPrimitiveTypeDefsNeeded=false
IsStoringIDTsLocallyNeeded=true
IsAlwaysIDTArrayGenerationNeeded=false
CompuMethodPrefix=
IsStringAsArrayGenerationNeeded=false
UseSizeAndPayloadStructs=false
AvoidTypeReferences=false
SkipCompoundTypeReferences=true
# deployment
IsDeploymentGenerationNeeded=false
IsStoringDeploymentLocallyNeeded=true
IsSeparateDeploymentFileCreationNeeded=false