navigate.model.features.feature_container.get_registered_funcs
- navigate.model.features.feature_container.get_registered_funcs(feature_module, func_type='signal')
Get a dictionary of registered functions for a feature module.
This function retrieves a dictionary of registered functions for a given feature module and function type (signal or data). It ensures that essential functions such as ‘init’, ‘main’, and ‘end’ are present in the dictionary, and assigns them default dummy functions if they are missing.
Parameters:
- feature_modulemodule
The feature module containing the configuration table of functions.
- func_typestr, optional
The type of functions to retrieve, either ‘signal’ (default) or ‘data’.
Returns:
- dict
A dictionary of registered functions for the specified function type.
Notes:
This function is typically used to retrieve a dictionary of functions defined in a feature module’s configuration table. The dictionary includes ‘init’, ‘main’, and ‘end’ functions, and optionally ‘pre-main’ for data functions and ‘main-response’ for signal functions.
If any of the essential functions is missing in the configuration table, this function assigns default dummy functions to ensure the dictionary is complete.
The dummy_func function is used as a default for functions that do nothing, and dummy_True is used as a default for functions that return True.