boss.factory¶
Classes¶
Functions¶
|
Wrap the source class to establish HEROS compatibility. |
Module Contents¶
- class boss.factory.BOSSObject[source]¶
- _stop(boss: heros.RemoteHERO)[source]¶
- boss.factory.wrap_hero_class(source_class: type, name: str, arg_dict: dict, wrap_target: str | None = None) type[source]¶
Wrap the source class to establish HEROS compatibility.
BOSS supports different external libraries which require extra treatment to expose them correctly to the HERO network. This function returns a HEROS compatible representation of the source class.
- Parameters:
source_class – The class to be wrapped
name – Name of the HERO to be created from the
source_classarg_dict – Arguments to be passed to
source_class.__init__wrap_target – By default (
Noneor"auto"), the function tries to automatically find from which library the source class is and wrap it accordingly. By specifyingwrap_targetthe wrapper function can be controlled or wrapping can be turned off by passingno_wrap.
- class boss.factory.Factory[source]¶
- _mixin_class: type¶
- classmethod _build(classname: str, name: str, arg_dict: dict | None = None, extra_decorators: list[tuple[str, str]] | None = None, wrap_target: str | None = None, realm: str = 'heros', session_manager=None, tags: list | None = None)[source]¶
- class boss.factory.HEROFactory[source]¶
Bases:
Factory- _mixin_class¶
- class boss.factory.DatasourceHEROFactory[source]¶
Bases:
HEROFactory- _mixin_class¶
- _observables: dict¶
- class boss.factory.PolledDatasourceHEROFactory[source]¶
Bases:
Factory- _mixin_class¶
- _observables: dict¶
- _interval: float¶
- classmethod build(classname: str, name: str, arg_dict: dict | None = None, extra_decorators: list[tuple[str, str]] | None = None, wrap_target: str | None = None, loop: asyncio.AbstractEventLoop = asyncio.new_event_loop(), interval: float = 5, observables: dict | None = None, realm='heros', session_manager=None, tags: list | None = None)[source]¶