Skip to content

Commit

Permalink
Improvments to the program options description as well as the manual …
Browse files Browse the repository at this point in the history
…of the commsdsl2tools_qt.
  • Loading branch information
arobenko committed Feb 25, 2024
1 parent a6794db commit dcbe87b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/commsdsl2tools_qt/src/ToolsQtProgramOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,15 @@ ToolsQtProgramOptions::ToolsQtProgramOptions()
(FullCodeInputDirStr, "Directory with code updates.", true)
(ProtocolStr,
"Protocol information for plugin generation. Exepected to be in the following format:\n"
"\"frame_id:interface_id:protocol_name:description\".\nUse comma separation for multiple plugins. If not provided, "
"\"frame_id:interface_id:protocol_name:description:plugin_id\".\nUse comma separation for multiple plugins. If not provided, "
"one frame and one interface from the schema will be chosen and code for only one protocol "
"plugin will be generated.\n"
" * frame_id - Full reference id of the frame. Can be empty if there is only one frame.\n"
" * interface_id - Full reference id of the interface. Can be empty if there is only one interface.\n"
" * name - Name of the plugin to be desplayed in the tools.\n"
" * description - Description of the plugin.\n"
" * plugin_id - ID of the plugin to be used in the saved configuration file. When empty or "
"omitted same as \"name\" value is assumed.\n"
, true)
(FullMultipleSchemasEnabledStr, "Allow having multiple schemas with different names.")
(ForceMainNamespaceInOptionsStr, "Force having main namespace struct in generated options.")
Expand Down
11 changes: 9 additions & 2 deletions doc/Manual_commsdsl2tools_qt.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,21 @@ files).
To provide the necessary information use `--protocol` command line option:

```
$> /path/to/commsdsl2tools_qt --protocol "frame_id:interface_id:protocol_name:description"
$> /path/to/commsdsl2tools_qt --protocol "frame_id:interface_id:protocol_name:description:plugin_id"
```

In case there is only one `<frame>` and/or only one `<interface>` (implicit or explicit)
the relevant id can be omitted. For example:

```
$> /path/to/commsdsl2tools_qt --protocol "::My Protocol:My Protocol Description"
$> /path/to/commsdsl2tools_qt --protocol "::My Protocol:My Protocol Description:my_protocol_id"
```

Colon (:) separated elements at the end can be omitted. In such case the **commsdsl2tools_qt** code
generator comes up with some default values.

```
$> /path/to/commsdsl2tools_qt --protocol "SomeFrame:SomeInterface:My Protocol"
```

It is possible to add support for multiple protocol plugins (with different frames / interfaces)
Expand Down

0 comments on commit dcbe87b

Please sign in to comment.