mxcubeweb.core.models.adaptermodels#
Classes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- class mxcubeweb.core.models.adaptermodels.Base64StrModel(*, value: str = '')[source]#
Bases:
BaseModel- Parameters:
value (str) –
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'value': FieldInfo(annotation=str, required=False, default='', description='Base64 encoded string')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.BeamlineActionInputModel(*, cmd: str, parameters: dict | list)[source]#
Bases:
BaseModel- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'cmd': FieldInfo(annotation=str, required=True), 'parameters': FieldInfo(annotation=Union[dict, list], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.FloatValueModel(*, value: float = 0)[source]#
Bases:
BaseModel- Parameters:
value (float) –
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'value': FieldInfo(annotation=float, required=False, default=0, description='Value of actuator (position)')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.FrontEndStackTraceModel(*, stack: str, state: dict)[source]#
Bases:
BaseModel- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'stack': FieldInfo(annotation=str, required=True), 'state': FieldInfo(annotation=dict, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.HOActuatorModel(*, name: str = '', state: str = '', msg: str = '', type: str = '', available: bool = True, readonly: bool = True, attributes: dict = {}, commands: dict | list = {}, value: float = 0, limits: tuple[float | None, float | None] = (-1, -1))[source]#
Bases:
HOModel- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'attributes': FieldInfo(annotation=dict, required=False, default={}, description='Data attributes'), 'available': FieldInfo(annotation=bool, required=False, default=True, description='True if the object avilable/enabled'), 'commands': FieldInfo(annotation=Union[dict, list], required=False, default={}, description='Available methods'), 'limits': FieldInfo(annotation=tuple[Union[float, NoneType], Union[float, NoneType]], required=False, default=(-1, -1), description='Limits (min max)'), 'msg': FieldInfo(annotation=str, required=False, default='', description='additional message to display'), 'name': FieldInfo(annotation=str, required=False, default='', description='name of the hardware object'), 'readonly': FieldInfo(annotation=bool, required=False, default=True, description='True if the object can only be read (not manipluated)'), 'state': FieldInfo(annotation=str, required=False, default='', description='hardware object state'), 'type': FieldInfo(annotation=str, required=False, default='', description='type of data the object contains'), 'value': FieldInfo(annotation=float, required=False, default=0, description='Value of actuator (position)')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.HOActuatorValueChangeModel(*, name: str = '', value: float | str = '')[source]#
Bases:
BaseModel- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=False, default='', description='Name of the hardware object to change'), 'value': FieldInfo(annotation=Union[float, str], required=False, default='', description='New value of actuator (position)')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.HOBeamModel(*, name: str = '', state: str = '', msg: str = '', type: str = '', available: bool = True, readonly: bool = True, attributes: dict = {}, commands: dict | list = {}, value: HOBeamValueModel, limits: tuple[float | None, float | None] = (-1, -1))[source]#
Bases:
HOActuatorModel- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'attributes': FieldInfo(annotation=dict, required=False, default={}, description='Data attributes'), 'available': FieldInfo(annotation=bool, required=False, default=True, description='True if the object avilable/enabled'), 'commands': FieldInfo(annotation=Union[dict, list], required=False, default={}, description='Available methods'), 'limits': FieldInfo(annotation=tuple[Union[float, NoneType], Union[float, NoneType]], required=False, default=(-1, -1), description='Limits (min max)'), 'msg': FieldInfo(annotation=str, required=False, default='', description='additional message to display'), 'name': FieldInfo(annotation=str, required=False, default='', description='name of the hardware object'), 'readonly': FieldInfo(annotation=bool, required=False, default=True, description='True if the object can only be read (not manipluated)'), 'state': FieldInfo(annotation=str, required=False, default='', description='hardware object state'), 'type': FieldInfo(annotation=str, required=False, default='', description='type of data the object contains'), 'value': FieldInfo(annotation=HOBeamValueModel, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.HOBeamValueModel(*, apertureList: list[str] = [0], currentAperture: str = 0, position: tuple[float, float] = (0, 0), shape: str = 'ellipse', size_x: float = 0.01, size_y: float = 0.01)[source]#
Bases:
BaseModel- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'apertureList': FieldInfo(annotation=list[str], required=False, default=[0], description='List of available apertures'), 'currentAperture': FieldInfo(annotation=str, required=False, default=0, description='Current aperture label'), 'position': FieldInfo(annotation=tuple[float, float], required=False, default=(0, 0), description='Beam position on OAV'), 'shape': FieldInfo(annotation=str, required=False, default='ellipse', json_schema_extra={'descrption': 'Beam shape'}), 'size_x': FieldInfo(annotation=float, required=False, default=0.01, description='Current beam x size (width) in millimieters'), 'size_y': FieldInfo(annotation=float, required=False, default=0.01, description='Current beam y size (height) in millimieters')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.HOMachineInfoModel(*, name: str = '', state: str = '', msg: str = '', type: str = '', available: bool = True, readonly: bool = True, attributes: dict = {}, commands: dict | list = {}, limits: tuple[float | None, float | None] = (-1, -1), value: dict)[source]#
Bases:
HOModel- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'attributes': FieldInfo(annotation=dict, required=False, default={}, description='Data attributes'), 'available': FieldInfo(annotation=bool, required=False, default=True, description='True if the object avilable/enabled'), 'commands': FieldInfo(annotation=Union[dict, list], required=False, default={}, description='Available methods'), 'limits': FieldInfo(annotation=tuple[Union[float, NoneType], Union[float, NoneType]], required=False, default=(-1, -1), description='Limits (min max)'), 'msg': FieldInfo(annotation=str, required=False, default='', description='additional message to display'), 'name': FieldInfo(annotation=str, required=False, default='', description='name of the hardware object'), 'readonly': FieldInfo(annotation=bool, required=False, default=True, description='True if the object can only be read (not manipluated)'), 'state': FieldInfo(annotation=str, required=False, default='', description='hardware object state'), 'type': FieldInfo(annotation=str, required=False, default='', description='type of data the object contains'), 'value': FieldInfo(annotation=dict, required=True, description='Value of machine info')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.HOModel(*, name: str = '', state: str = '', msg: str = '', type: str = '', available: bool = True, readonly: bool = True, attributes: dict = {}, commands: dict | list = {})[source]#
Bases:
BaseModel- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'attributes': FieldInfo(annotation=dict, required=False, default={}, description='Data attributes'), 'available': FieldInfo(annotation=bool, required=False, default=True, description='True if the object avilable/enabled'), 'commands': FieldInfo(annotation=Union[dict, list], required=False, default={}, description='Available methods'), 'msg': FieldInfo(annotation=str, required=False, default='', description='additional message to display'), 'name': FieldInfo(annotation=str, required=False, default='', description='name of the hardware object'), 'readonly': FieldInfo(annotation=bool, required=False, default=True, description='True if the object can only be read (not manipluated)'), 'state': FieldInfo(annotation=str, required=False, default='', description='hardware object state'), 'type': FieldInfo(annotation=str, required=False, default='', description='type of data the object contains')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.ListOfShapesModel(*, shapes: list[dict] = [])[source]#
Bases:
BaseModel- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'shapes': FieldInfo(annotation=list[dict], required=False, default=[], description='List of dictionaries')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.NStateModel(*, name: str = '', state: str = '', msg: str = '', type: str = '', available: bool = True, readonly: bool = True, attributes: dict = {}, commands: dict | list = {}, value: str = '', limits: tuple[float | None, float | None] = (-1, -1))[source]#
Bases:
HOActuatorModel- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'attributes': FieldInfo(annotation=dict, required=False, default={}, description='Data attributes'), 'available': FieldInfo(annotation=bool, required=False, default=True, description='True if the object avilable/enabled'), 'commands': FieldInfo(annotation=Union[dict, list], required=False, default={}, description='Available methods'), 'limits': FieldInfo(annotation=tuple[Union[float, NoneType], Union[float, NoneType]], required=False, default=(-1, -1), description='Limits (min max)'), 'msg': FieldInfo(annotation=str, required=False, default='', description='additional message to display'), 'name': FieldInfo(annotation=str, required=False, default='', description='name of the hardware object'), 'readonly': FieldInfo(annotation=bool, required=False, default=True, description='True if the object can only be read (not manipluated)'), 'state': FieldInfo(annotation=str, required=False, default='', description='hardware object state'), 'type': FieldInfo(annotation=str, required=False, default='', description='type of data the object contains'), 'value': FieldInfo(annotation=str, required=False, default='', description='Value of nstate object')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.SampleChangerCommandInputModel(*, cmd: str, arguments: str | None)[source]#
Bases:
BaseModel- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'arguments': FieldInfo(annotation=Union[str, NoneType], required=True), 'cmd': FieldInfo(annotation=str, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.SampleInputModel(*, location: str, sampleName: str = '', sampleID: str = '')[source]#
Bases:
BaseModel- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'location': FieldInfo(annotation=str, required=True), 'sample_id': FieldInfo(annotation=str, required=False, default='', alias='sampleID', alias_priority=2), 'sample_name': FieldInfo(annotation=str, required=False, default='', alias='sampleName', alias_priority=2)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.adaptermodels.StrValueModel(*, value: str = '')[source]#
Bases:
BaseModel- Parameters:
value (str) –
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'value': FieldInfo(annotation=str, required=False, default='', description='Value of actuator (position)')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.