fastoad.module_management.service_registry module¶
Module for registering services.
-
class
fastoad.module_management.service_registry.
RegisterPropulsion
(model_id, desc=None)[source]¶ Bases:
fastoad.module_management.service_registry.RegisterService
Decorator class for registering a propulsion-dedicated model.
Warning: the module must be started as an iPOPO bundle for the decorator to work.
- Parameters
model_id – the identifier of the propulsion model
desc – description of the model. If not provided, the docstring will be used.
-
class
fastoad.module_management.service_registry.
RegisterService
(provider_id: str, service_id: str, base_class: type = None, desc=None)[source]¶ Bases:
object
Decorator class that allows to register a service.
The service can be associated to a base class (or interface). Then all registered classes must inherit from this base class.
Warning: the module must be started as an iPOPO bundle for the decorator to work.
- Parameters
provider_id – the identifier of the service provider to register
service_id – the identifier of the service
base_class – the class that should be parent to the registered class
desc – description of the service. If not provided, the docstring will be used.