sunflare.config
#
- class sunflare.config.FrontendTypes(value)#
Bases:
str
,Enum
Supported frontend types.
Frontends are the supported GUI frameworks that are used to interact with the user.
- PYQT#
PyQt6 frontend.
- PYSIDE#
PySide6 frontend.
- class sunflare.config.ControllerInfo(*, plugin_name, plugin_id)#
Controller information model.
All controller information models inherit from this class.
- Parameters:
plugin_name (
str
, optional) – Controller plugin name. Equivalent to the name of the PyPI/Conda package.plugin_id (
str
, optional) – Controller plugin ID. Associated with the exposed entry point in the plugin manifest.
- class sunflare.config.ModelInfo(*, plugin_name, plugin_id, vendor='N/A', family='N/A', serial_number='N/A')#
Base model for device information.
All device information models inherit from this class.
- Parameters:
plugin_name (str)
plugin_id (str)
vendor (str)
family (str)
serial_number (str)
- plugin_name#
Model plugin name. Equivalent to the name of the PyPI/Conda package.
- Type:
str
, optional
- plugin_id#
Model plugin ID. Associated with the exposed entry point in the plugin manifest.
- Type:
str
, optional
- vendor#
Detector vendor. Defaults to
N/A
.- Type:
str
, optional
- family#
Detector family. Defaults to
N/A
.- Type:
str
, optional
- class sunflare.config.RedSunSessionInfo(*, session='Redsun', frontend, models=NOTHING, controllers=NOTHING, views=NOTHING)#
Redsun session configuration class.
This class is used to store the configuration of a running Redsun application; it provides information about the hardware layout and the selected acquisition engine.
A minimal configuration must include:
the selected frontend;
the selected acquisition engine;
- Parameters:
session (str)
frontend (FrontendTypes)
models (dict[str, ModelInfoProtocol])
controllers (dict[str, ControllerInfoProtocol])
views (dict[str, ViewInfoProtocol])
- session#
The name of the current session. Defaults to
Redsun
. It will be shown as the main window title.- Type:
str
- frontend#
Frontend selected for the current session. Defaults to
FrontendTypes.PYQT
.- Type:
FrontendTypes
- controllers#
Controller informations dictionary. Defaults to an empty dictionary.
- Type:
dict[str, ControllerInfo]
- models#
Model informations dictionary. Defaults to an empty dictionary.
- Type:
dict[str, ModelInfo]
- views#
View informations dictionary. Defaults to an empty dictionary.
- Type:
dict[str, ViewInfo]