Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/general/04_detail_module_concept.rst
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ Focusing on the source and header files, generally, the tool generates:
* One source-header pair describing a class for each interface implementation
in the module: ``${IMPLEMENTATION_ID}/${INTERFACE_NAME}Impl.{cpp, hpp}``

.. _moduleconcept_modclass:

The module class
----------------

Expand All @@ -399,7 +401,10 @@ a few notable members:
- reference to the interface implementation;
* For each interface requirement:
``std::unique_ptr<${INTERFACE_ID}Intf> r_${REQUIREMENT_ID}`` - use this to
trigger commands or subscribe to variables on the provider.
trigger commands or subscribe to variables on the provider. If 1 is used
for ``min_connections`` and ``max_connections`` in ``required`` in the module's
manifest a pointer is given as an argument as shown, otherwise it's an
array (std::vector) of pointers.

The header file contains designated areas where further members or other
definitions can be added.
Expand Down
14 changes: 14 additions & 0 deletions docs/tutorials/new_modules/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ command `command_tutorial` that can be called by another module and will
just always return the string "everest" as result. We will later give some
ideas how to extend this minimal example.

In C++, the interface is an object class that wraps the publish and
subscribe of the MQTT topics of the interface.

The MQTT topics of an interface are either commands or variables.
It comes in two forms, depending on if you are using it or implementing it.

- Implementation handles commands and publishes variables.
- Interface offer subscribing to variables and invokes commands.

We store the following interface configuration in form of a .yaml file in
`$EVEREST_TUTORIAL_DIR/interfaces/interface_tutorial_module.yaml`:

Expand Down Expand Up @@ -238,6 +247,11 @@ its interface implementations.
Among others, you'll furthermore find the module's configuration and a pointer
to the interface implementations.

Note: After you have built on your module's autogenerated code, you may well
find you need to change the manifest but don't want to regenerate these files.
Changing the manifest may change the arguments your modules contructor is
called with by other auto generated code, so you have to know how to change
it. Please refer to the :ref:`the module class in the module concept <moduleconcept_modclass>`.

**interface_impl_tutorial_module/interface_tutorial_moduleImpl{.hpp,.cpp}:**
For each interface implementation (here, only a single one is defined), the
Expand Down