embutils.utils.service module
Service implementation.
- date
2021
- author
Christian Wiche
- contact
- license
The MIT License (MIT)
- class embutils.utils.service.AbstractService(delay: float = 0.001)[source]
Bases:
abc.ABCService definition abstraction. Use this class to simplify the service definition and handling.
Class initialization.
- Parameters
delay (float) – Time between service task executions.
- TASK_DELAY_S = 0.001
Task execution delay.
- _abc_impl = <_abc_data object>
- _service() None[source]
Service process execution.
Runs the starting code.
Run the execution loop until the service stop is requested.
Runs the ending code and return.
- property delay: float
Service main task execution delay in seconds.
- property is_alive: bool
Returns if the service is alive.
- property is_running: bool
Returns if the service is running.