View on GitHub

LCSF Generator User Manual

Documentation to learn how to use LCSF Generator.

What is LCSF Generator

LCSF Generator is a C++/Qt graphical tool that will allow you to:

  1. Create and edit protocols based on LCSF easily.
  2. Generate corresponding code for the LCSF C Stack and LCSF Stack Rust.
  3. Import previous protocol source files to deploy modificatons without hassle (only C files supported).
  4. Generate protocole documentation on wiki and markdown format.

Interface Breakdown

The LCSF Generator GUI is detailed below:

LCSF Generator GUI

A - Menu Bar

The menu bar is composed of the file menu and the help menu.

File Menu

The file menu structure is:

file menu

Help Menu

The help menu structure is:

help menu

B - Protocol Section

This is where you fill the protocol parameters:

C - Table Tree

This component will show hierarchically the different tables that make the protocol.

Clicking on a table will display the table content on the table view (section D). It will also silently save any modifications on the previous table.

The root table is always the Commands table and will contain the protocol commands. Each root table child will be a command containing attributes. Each command table child will be an attribute containing sub-attributes and so on and so forth.

D - Table View

The table view will display the content of the currently selected table on the table tree (section C). The label on top indicates which table is currently displayed.

If the root table Commands is selected, it will display the protocol command table, otherwise it will display an attribute table.

Each table is composed of 5 columns, which depend on the table type. Each row represents an entry in the table. Each cell of the table can be modified directly, only the first two columns (name, id) are mandatory.

If the table detects two identitcal ids it will disable the save table button and highlight the cells in red.

Command Table

The command table is composed of 5 columns:

Attribute Table

The attribute table is composed of 5 columns:

E - Table Button

Table buttons have an effect on the table view (section D). It contains 5 buttons:

F - Output Button

Output buttons are related to code and documentation generation. It contains 4 buttons:

Tooltip

In case you forgot the purpose on an element of the GUI, most of them have a tooltip that might help you. Just hover your mouse over them for a couple of seconds to make them appear.

How to use it

  1. (optional) Load protocol description.
  2. Set/Modify protocol name and protocol id.
  3. Add/Modify protocol commands in the root table.
  4. Add/Modify attributes and sub-attributes in the sub-tables.
  5. Save the description for future use.
  6. (optional) Import previous code if you already wrote specific code in the protocol main source file.
  7. Generate source code and documentation.

About Code Generation

LCSF Generator will generate code for the LCSF stacks following the protocol description. It will generate code for both A and B points of view.

It will fully generate the descriptor and bridge files but only build a template for the main files as it cannot produce application code.

If you already wrote application code for the protocol, you can import it through the Import Desc buttons, the code will be included in the next generation. It will only accept files named “protocolName_Main.c”.

About Code Importation

The code importation feature relies heavily on its internal model of a protocol main source file to extract useful information. This means that heavy modification of this file formatting (sections names mainly) might yield unpredicted behaviour when importing and generating code with it.

This is why the feature is currently only available for C code and not for Rust code.