Skip to main content

Modules

A module consists of three parts: the config, the module info, and the final module class. When you implement your own module you will probably need to create subclasses of all of these. If importing the module is not important during the setup process, then you may want to inherit the info and module class in one class.

The complex behaviour of execution and references of the different parts:

The ModuleInfo is the class that is referenced in the arch_config for every module instance. The ModuleInfo references the ModuleConfig class that needs to contain the module_path attribute. This attribute contains the "path" to the python file that needs to contain the provide_module function that will return the Module class.

tip

The templates already set up that behaviour correct. You just need to reference the ModuleInfo in a config.

modules:
my_new_module:
module_info: !name:my_package.modules.my_new_module.MyNewModule
info

For a tutorial how to create a module step-by-step see "A Module with a GUI that Communicates to Other Modules".