Skip to content

Commit

Permalink
ogma-cli: Document format of variable DB. Refs #143.
Browse files Browse the repository at this point in the history
The README does not explain the structure that the variable DB files for
ROS should have. Because ogma doesn't give much information to users
when a variable cannot be found in the var DB, users do not know what to
put in each field in the variable DB, and what effect it will have in
the program.

This commit adds a subsection to the ROS section of the README
explaining the structure and format of the variable DB.
  • Loading branch information
ivanperez-keera committed May 22, 2024
1 parent 5070d63 commit 9e4b4c1
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ogma-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,34 @@ compile the image with:
docker build .
```

### Format of the Variables DB File

The argument variable DB passed to the ROS backend should contain a list of
variables, together with their types and the corresponding ROS topic in which
those variables are passed. Each line in that file has the format:

```
("<NAME>","<TYPE>","<TOPIC_NAME>","<RESERVED_FOR_FUTURE_USE>")
```

For example, an input variable called "temperature" of type 64-bit signed
integer coming in a ROS topic called "/battery/temperature" should have a
matching entry in the variable DB file like the following:

```
("temperature","int64_t","/battery/temperature","ignore")
```

There should never be two lines in the same file with the same variable name.
Variables in the DB that are not not used in any of the properties being
monitored and/or are not listed in the variable file passed as argument to the
ROS command will be ignored.

For a more concrete example, see the files in `ogma-cli/examples/ros-copilot/`
and the last step of the script
`.github/workflows/repo-ghc-8.6-cabal-2.4-ros.yml`, which generates a ROS
monitor with multiple variables and compiles the resulting code.

### Current limitations

The user must place the code generated by Copilot monitors in two files,
Expand Down

0 comments on commit 9e4b4c1

Please sign in to comment.