jvconnected.interfaces.base
- class jvconnected.interfaces.base.Interface(*args, **kwargs)[source]
Bases:
DispatcherBase interface class
Subclasses must override the
open()andclose()methods. In order to operate with theEngine, the class should be added to theregistry- Property running: bool = False
Run state
runningis apydispatch.Propertyobject.
- Property config: 'jvconnected.config.Config' | None = None
Instance of
jvconnected.config.Config. This is gathered from theengineafterset_engine()has been called.configis apydispatch.Propertyobject.
- loop: asyncio.BaseEventLoop
The
asyncio.BaseEventLoopassociated with the instance
- property engine: jvconnected.engine.Engine
Instance of
jvconnected.engine.Engine
- async set_engine(engine: jvconnected.engine.Engine)[source]
Attach the interface to a running instance of
jvconnected.engine.EngineThis will be called automatically by the engine if the class is in the
jvconnected.interfaces.registry.If the engine is running, the interface will start (using the
open()method). Otherwise it will automatically start when the engine does.