Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/hardware/abstract/tomoflatmotion.py: 0%
29 statements
« prev ^ index » next coverage.py v7.6.5, created at 2024-11-15 02:12 +0000
« prev ^ index » next coverage.py v7.6.5, created at 2024-11-15 02:12 +0000
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3from marshmallow import fields
5from daiquiri.core.hardware.abstract import HardwareObject
6from daiquiri.core.schema.hardware import HardwareSchema
7from daiquiri.core.schema.validators import OneOf
9import logging
11logger = logging.getLogger(__name__)
13TomoFlatMotion = ["READY"]
16class _MotionSchema(HardwareSchema):
17 axisRef = fields.Str()
18 relative_position = fields.Number(allow_none=True)
19 absolute_position = fields.Number(allow_none=True)
22class _UpdateParamSchema(HardwareSchema):
23 axisRef = fields.Str()
24 position = fields.Number(allow_none=True)
27class _PropertiesSchema(HardwareSchema):
28 state = OneOf(TomoFlatMotion, metadata={"readOnly": True})
29 settle_time = fields.Number(metadata={"readOnly": True})
30 power_onoff = fields.Bool(metadata={"readOnly": True})
31 move_in_parallel = fields.Bool(metadata={"readOnly": True})
32 available_axes = fields.List(fields.Str(), metadata={"readOnly": True})
33 motion = fields.List(fields.Nested(_MotionSchema), metadata={"readOnly": True})
36class _CallablesSchema(HardwareSchema):
37 update_axis = fields.Dict()
40class TomoFlatMotion(HardwareObject):
41 _type = "tomoflatmotion"
42 _properties = _PropertiesSchema()
43 _callables = _CallablesSchema()
45 def update_axis(self, value):
46 self.call("update_axis", value)