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.
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
For a tutorial how to create a module step-by-step see "A Module with a GUI that Communicates to Other Modules".
📄️ Module Config
The base ModuleConfig contains relevant attributes for the import and run phase of the module.
📄️ Module Info
The ModuleInfo class of a module contains the information relevant for the architecture setup.
📄️ Module Class
The Module base class defines the methods that are called in the default startfunction. Containing the initialize, step, termination, and extensionstep methods.