zaber-motion 7.13.0__py3-none-win_arm64.whl → 7.15.0__py3-none-win_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zaber_motion/dto/ascii/optional_measurement_sequence.py +1 -1
- zaber_motion/dto/requests/__init__.py +2 -0
- zaber_motion/dto/requests/channel_on.py +13 -1
- zaber_motion/dto/requests/test_request_complex.py +57 -0
- zaber_motion/dto/requests/wdi_generic_float_request.py +119 -0
- zaber_motion/library.py +1 -1
- zaber_motion/microscopy/illuminator.py +24 -0
- zaber_motion/microscopy/illuminator_channel.py +15 -2
- zaber_motion/microscopy/wdi_autofocus_provider.py +140 -0
- zaber_motion/version.py +1 -1
- {zaber_motion-7.13.0.dist-info → zaber_motion-7.15.0.dist-info}/METADATA +1 -1
- {zaber_motion-7.13.0.dist-info → zaber_motion-7.15.0.dist-info}/RECORD +16 -14
- zaber_motion_bindings/zaber-motion-core-windows-arm64.dll +0 -0
- {zaber_motion-7.13.0.dist-info → zaber_motion-7.15.0.dist-info}/WHEEL +0 -0
- {zaber_motion-7.13.0.dist-info → zaber_motion-7.15.0.dist-info}/licenses/LICENSE.txt +0 -0
- {zaber_motion-7.13.0.dist-info → zaber_motion-7.15.0.dist-info}/top_level.txt +0 -0
|
@@ -210,6 +210,7 @@ from .string_array_response import StringArrayResponse as StringArrayResponse
|
|
|
210
210
|
from .string_response import StringResponse as StringResponse
|
|
211
211
|
from .test_event import TestEvent as TestEvent
|
|
212
212
|
from .test_request import TestRequest as TestRequest
|
|
213
|
+
from .test_request_complex import TestRequestComplex as TestRequestComplex
|
|
213
214
|
from .test_response import TestResponse as TestResponse
|
|
214
215
|
from .test_response_long import TestResponseLong as TestResponseLong
|
|
215
216
|
from .toggle_device_db_store_request import ToggleDeviceDbStoreRequest as ToggleDeviceDbStoreRequest
|
|
@@ -250,5 +251,6 @@ from .unknown_binary_response_event_wrapper import UnknownBinaryResponseEventWra
|
|
|
250
251
|
from .unknown_response_event_wrapper import UnknownResponseEventWrapper as UnknownResponseEventWrapper
|
|
251
252
|
from .wait_to_clear_warnings_request import WaitToClearWarningsRequest as WaitToClearWarningsRequest
|
|
252
253
|
from .wait_to_respond_request import WaitToRespondRequest as WaitToRespondRequest
|
|
254
|
+
from .wdi_generic_float_request import WdiGenericFloatRequest as WdiGenericFloatRequest
|
|
253
255
|
from .wdi_generic_request import WdiGenericRequest as WdiGenericRequest
|
|
254
256
|
from .wdi_get_status_response import WdiGetStatusResponse as WdiGetStatusResponse
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# This file is generated. Do not modify by hand.
|
|
2
2
|
# pylint: disable=line-too-long, unused-argument, f-string-without-interpolation, too-many-branches, too-many-statements, unnecessary-pass
|
|
3
3
|
from dataclasses import dataclass
|
|
4
|
-
from typing import Any, Dict
|
|
4
|
+
from typing import Any, Dict, Optional
|
|
5
5
|
import decimal
|
|
6
6
|
import zaber_bson
|
|
7
|
+
from ..measurement import Measurement
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
@dataclass
|
|
@@ -17,6 +18,8 @@ class ChannelOn:
|
|
|
17
18
|
|
|
18
19
|
on: bool = False
|
|
19
20
|
|
|
21
|
+
duration: Optional[Measurement] = None
|
|
22
|
+
|
|
20
23
|
@staticmethod
|
|
21
24
|
def zero_values() -> 'ChannelOn':
|
|
22
25
|
return ChannelOn(
|
|
@@ -24,6 +27,7 @@ class ChannelOn:
|
|
|
24
27
|
device=0,
|
|
25
28
|
axis=0,
|
|
26
29
|
on=False,
|
|
30
|
+
duration=None,
|
|
27
31
|
)
|
|
28
32
|
|
|
29
33
|
@staticmethod
|
|
@@ -43,6 +47,7 @@ class ChannelOn:
|
|
|
43
47
|
'device': int(self.device),
|
|
44
48
|
'axis': int(self.axis),
|
|
45
49
|
'on': bool(self.on),
|
|
50
|
+
'duration': self.duration.to_dict() if self.duration is not None else None,
|
|
46
51
|
}
|
|
47
52
|
|
|
48
53
|
@staticmethod
|
|
@@ -52,6 +57,7 @@ class ChannelOn:
|
|
|
52
57
|
device=data.get('device'), # type: ignore
|
|
53
58
|
axis=data.get('axis'), # type: ignore
|
|
54
59
|
on=data.get('on'), # type: ignore
|
|
60
|
+
duration=Measurement.from_dict(data.get('duration')) if data.get('duration') is not None else None, # type: ignore
|
|
55
61
|
)
|
|
56
62
|
|
|
57
63
|
def validate(self) -> None:
|
|
@@ -82,3 +88,9 @@ class ChannelOn:
|
|
|
82
88
|
|
|
83
89
|
if int(self.axis) != self.axis:
|
|
84
90
|
raise ValueError(f'Property "Axis" of "ChannelOn" is not integer value.')
|
|
91
|
+
|
|
92
|
+
if self.duration is not None:
|
|
93
|
+
if not isinstance(self.duration, Measurement):
|
|
94
|
+
raise ValueError(f'Property "Duration" of "ChannelOn" is not an instance of "Measurement".')
|
|
95
|
+
|
|
96
|
+
self.duration.validate()
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# This file is generated. Do not modify by hand.
|
|
2
|
+
# pylint: disable=line-too-long, unused-argument, f-string-without-interpolation, too-many-branches, too-many-statements, unnecessary-pass
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from typing import Any, Dict, List
|
|
5
|
+
import decimal
|
|
6
|
+
from collections.abc import Iterable
|
|
7
|
+
import zaber_bson
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass
|
|
11
|
+
class TestRequestComplex:
|
|
12
|
+
|
|
13
|
+
int_array: List[int] = field(default_factory=list)
|
|
14
|
+
|
|
15
|
+
@staticmethod
|
|
16
|
+
def zero_values() -> 'TestRequestComplex':
|
|
17
|
+
return TestRequestComplex(
|
|
18
|
+
int_array=[],
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
@staticmethod
|
|
22
|
+
def from_binary(data_bytes: bytes) -> 'TestRequestComplex':
|
|
23
|
+
"""" Deserialize a binary representation of this class. """
|
|
24
|
+
data = zaber_bson.loads(data_bytes) # type: Dict[str, Any]
|
|
25
|
+
return TestRequestComplex.from_dict(data)
|
|
26
|
+
|
|
27
|
+
def to_binary(self) -> bytes:
|
|
28
|
+
"""" Serialize this class to a binary representation. """
|
|
29
|
+
self.validate()
|
|
30
|
+
return zaber_bson.dumps(self.to_dict()) # type: ignore
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
33
|
+
return {
|
|
34
|
+
'intArray': [int(item) for item in self.int_array] if self.int_array is not None else [],
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@staticmethod
|
|
38
|
+
def from_dict(data: Dict[str, Any]) -> 'TestRequestComplex':
|
|
39
|
+
return TestRequestComplex(
|
|
40
|
+
int_array=data.get('intArray'), # type: ignore
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def validate(self) -> None:
|
|
44
|
+
"""" Validates the properties of the instance. """
|
|
45
|
+
if self.int_array is not None:
|
|
46
|
+
if not isinstance(self.int_array, Iterable):
|
|
47
|
+
raise ValueError('Property "IntArray" of "TestRequestComplex" is not iterable.')
|
|
48
|
+
|
|
49
|
+
for i, int_array_item in enumerate(self.int_array):
|
|
50
|
+
if int_array_item is None:
|
|
51
|
+
raise ValueError(f'Item {i} in property "IntArray" of "TestRequestComplex" is None.')
|
|
52
|
+
|
|
53
|
+
if not isinstance(int_array_item, (int, float, decimal.Decimal)):
|
|
54
|
+
raise ValueError(f'Item {i} in property "IntArray" of "TestRequestComplex" is not a number.')
|
|
55
|
+
|
|
56
|
+
if int(int_array_item) != int_array_item:
|
|
57
|
+
raise ValueError(f'Item {i} in property "IntArray" of "TestRequestComplex" is not integer value.')
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# This file is generated. Do not modify by hand.
|
|
2
|
+
# pylint: disable=line-too-long, unused-argument, f-string-without-interpolation, too-many-branches, too-many-statements, unnecessary-pass
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from typing import Any, Dict, List
|
|
5
|
+
import decimal
|
|
6
|
+
from collections.abc import Iterable
|
|
7
|
+
import zaber_bson
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass
|
|
11
|
+
class WdiGenericFloatRequest:
|
|
12
|
+
|
|
13
|
+
interface_id: int = 0
|
|
14
|
+
|
|
15
|
+
register_id: int = 0
|
|
16
|
+
|
|
17
|
+
count: int = 0
|
|
18
|
+
|
|
19
|
+
offset: int = 0
|
|
20
|
+
|
|
21
|
+
register_bank: str = ""
|
|
22
|
+
|
|
23
|
+
data: List[float] = field(default_factory=list)
|
|
24
|
+
|
|
25
|
+
@staticmethod
|
|
26
|
+
def zero_values() -> 'WdiGenericFloatRequest':
|
|
27
|
+
return WdiGenericFloatRequest(
|
|
28
|
+
interface_id=0,
|
|
29
|
+
register_id=0,
|
|
30
|
+
count=0,
|
|
31
|
+
offset=0,
|
|
32
|
+
register_bank="",
|
|
33
|
+
data=[],
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
@staticmethod
|
|
37
|
+
def from_binary(data_bytes: bytes) -> 'WdiGenericFloatRequest':
|
|
38
|
+
"""" Deserialize a binary representation of this class. """
|
|
39
|
+
data = zaber_bson.loads(data_bytes) # type: Dict[str, Any]
|
|
40
|
+
return WdiGenericFloatRequest.from_dict(data)
|
|
41
|
+
|
|
42
|
+
def to_binary(self) -> bytes:
|
|
43
|
+
"""" Serialize this class to a binary representation. """
|
|
44
|
+
self.validate()
|
|
45
|
+
return zaber_bson.dumps(self.to_dict()) # type: ignore
|
|
46
|
+
|
|
47
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
48
|
+
return {
|
|
49
|
+
'interfaceId': int(self.interface_id),
|
|
50
|
+
'registerId': int(self.register_id),
|
|
51
|
+
'count': int(self.count),
|
|
52
|
+
'offset': int(self.offset),
|
|
53
|
+
'registerBank': str(self.register_bank or ''),
|
|
54
|
+
'data': [float(item) for item in self.data] if self.data is not None else [],
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@staticmethod
|
|
58
|
+
def from_dict(data: Dict[str, Any]) -> 'WdiGenericFloatRequest':
|
|
59
|
+
return WdiGenericFloatRequest(
|
|
60
|
+
interface_id=data.get('interfaceId'), # type: ignore
|
|
61
|
+
register_id=data.get('registerId'), # type: ignore
|
|
62
|
+
count=data.get('count'), # type: ignore
|
|
63
|
+
offset=data.get('offset'), # type: ignore
|
|
64
|
+
register_bank=data.get('registerBank'), # type: ignore
|
|
65
|
+
data=data.get('data'), # type: ignore
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
def validate(self) -> None:
|
|
69
|
+
"""" Validates the properties of the instance. """
|
|
70
|
+
if self.interface_id is None:
|
|
71
|
+
raise ValueError(f'Property "InterfaceId" of "WdiGenericFloatRequest" is None.')
|
|
72
|
+
|
|
73
|
+
if not isinstance(self.interface_id, (int, float, decimal.Decimal)):
|
|
74
|
+
raise ValueError(f'Property "InterfaceId" of "WdiGenericFloatRequest" is not a number.')
|
|
75
|
+
|
|
76
|
+
if int(self.interface_id) != self.interface_id:
|
|
77
|
+
raise ValueError(f'Property "InterfaceId" of "WdiGenericFloatRequest" is not integer value.')
|
|
78
|
+
|
|
79
|
+
if self.register_id is None:
|
|
80
|
+
raise ValueError(f'Property "RegisterId" of "WdiGenericFloatRequest" is None.')
|
|
81
|
+
|
|
82
|
+
if not isinstance(self.register_id, (int, float, decimal.Decimal)):
|
|
83
|
+
raise ValueError(f'Property "RegisterId" of "WdiGenericFloatRequest" is not a number.')
|
|
84
|
+
|
|
85
|
+
if int(self.register_id) != self.register_id:
|
|
86
|
+
raise ValueError(f'Property "RegisterId" of "WdiGenericFloatRequest" is not integer value.')
|
|
87
|
+
|
|
88
|
+
if self.count is None:
|
|
89
|
+
raise ValueError(f'Property "Count" of "WdiGenericFloatRequest" is None.')
|
|
90
|
+
|
|
91
|
+
if not isinstance(self.count, (int, float, decimal.Decimal)):
|
|
92
|
+
raise ValueError(f'Property "Count" of "WdiGenericFloatRequest" is not a number.')
|
|
93
|
+
|
|
94
|
+
if int(self.count) != self.count:
|
|
95
|
+
raise ValueError(f'Property "Count" of "WdiGenericFloatRequest" is not integer value.')
|
|
96
|
+
|
|
97
|
+
if self.offset is None:
|
|
98
|
+
raise ValueError(f'Property "Offset" of "WdiGenericFloatRequest" is None.')
|
|
99
|
+
|
|
100
|
+
if not isinstance(self.offset, (int, float, decimal.Decimal)):
|
|
101
|
+
raise ValueError(f'Property "Offset" of "WdiGenericFloatRequest" is not a number.')
|
|
102
|
+
|
|
103
|
+
if int(self.offset) != self.offset:
|
|
104
|
+
raise ValueError(f'Property "Offset" of "WdiGenericFloatRequest" is not integer value.')
|
|
105
|
+
|
|
106
|
+
if self.register_bank is not None:
|
|
107
|
+
if not isinstance(self.register_bank, str):
|
|
108
|
+
raise ValueError(f'Property "RegisterBank" of "WdiGenericFloatRequest" is not a string.')
|
|
109
|
+
|
|
110
|
+
if self.data is not None:
|
|
111
|
+
if not isinstance(self.data, Iterable):
|
|
112
|
+
raise ValueError('Property "Data" of "WdiGenericFloatRequest" is not iterable.')
|
|
113
|
+
|
|
114
|
+
for i, data_item in enumerate(self.data):
|
|
115
|
+
if data_item is None:
|
|
116
|
+
raise ValueError(f'Item {i} in property "Data" of "WdiGenericFloatRequest" is None.')
|
|
117
|
+
|
|
118
|
+
if not isinstance(data_item, (int, float, decimal.Decimal)):
|
|
119
|
+
raise ValueError(f'Item {i} in property "Data" of "WdiGenericFloatRequest" is not a number.')
|
zaber_motion/library.py
CHANGED
|
@@ -55,6 +55,30 @@ class Illuminator:
|
|
|
55
55
|
|
|
56
56
|
return IlluminatorChannel(self, channel_number)
|
|
57
57
|
|
|
58
|
+
def turn_off(
|
|
59
|
+
self
|
|
60
|
+
) -> None:
|
|
61
|
+
"""
|
|
62
|
+
Turns all channels off.
|
|
63
|
+
"""
|
|
64
|
+
request = dto.DeviceEmptyRequest(
|
|
65
|
+
interface_id=self.device.connection.interface_id,
|
|
66
|
+
device=self.device.device_address,
|
|
67
|
+
)
|
|
68
|
+
call("illuminator/all_off", request)
|
|
69
|
+
|
|
70
|
+
async def turn_off_async(
|
|
71
|
+
self
|
|
72
|
+
) -> None:
|
|
73
|
+
"""
|
|
74
|
+
Turns all channels off.
|
|
75
|
+
"""
|
|
76
|
+
request = dto.DeviceEmptyRequest(
|
|
77
|
+
interface_id=self.device.connection.interface_id,
|
|
78
|
+
device=self.device.device_address,
|
|
79
|
+
)
|
|
80
|
+
await call_async("illuminator/all_off", request)
|
|
81
|
+
|
|
58
82
|
def __verify_is_illuminator(
|
|
59
83
|
self
|
|
60
84
|
) -> None:
|
|
@@ -8,6 +8,7 @@ from ..dto.ascii.response import Response
|
|
|
8
8
|
from ..ascii import Axis, AxisSettings, AxisStorage, Warnings
|
|
9
9
|
from ..dto.ascii.set_state_axis_response import SetStateAxisResponse
|
|
10
10
|
from ..dto.firmware_version import FirmwareVersion
|
|
11
|
+
from ..dto.measurement import Measurement
|
|
11
12
|
|
|
12
13
|
if TYPE_CHECKING:
|
|
13
14
|
from .illuminator import Illuminator
|
|
@@ -63,30 +64,42 @@ class IlluminatorChannel:
|
|
|
63
64
|
self._warnings: Warnings = Warnings(illuminator.device, channel_number)
|
|
64
65
|
|
|
65
66
|
def on(
|
|
66
|
-
self
|
|
67
|
+
self,
|
|
68
|
+
duration: Optional[Measurement] = None
|
|
67
69
|
) -> None:
|
|
68
70
|
"""
|
|
69
71
|
Turns this channel on.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
duration: Duration for which to turn the channel on.
|
|
75
|
+
If not specified, the channel remains on until turned off.
|
|
70
76
|
"""
|
|
71
77
|
request = dto.ChannelOn(
|
|
72
78
|
interface_id=self.illuminator.device.connection.interface_id,
|
|
73
79
|
device=self.illuminator.device.device_address,
|
|
74
80
|
axis=self.channel_number,
|
|
75
81
|
on=True,
|
|
82
|
+
duration=duration,
|
|
76
83
|
)
|
|
77
84
|
call("illuminator/on", request)
|
|
78
85
|
|
|
79
86
|
async def on_async(
|
|
80
|
-
self
|
|
87
|
+
self,
|
|
88
|
+
duration: Optional[Measurement] = None
|
|
81
89
|
) -> None:
|
|
82
90
|
"""
|
|
83
91
|
Turns this channel on.
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
duration: Duration for which to turn the channel on.
|
|
95
|
+
If not specified, the channel remains on until turned off.
|
|
84
96
|
"""
|
|
85
97
|
request = dto.ChannelOn(
|
|
86
98
|
interface_id=self.illuminator.device.connection.interface_id,
|
|
87
99
|
device=self.illuminator.device.device_address,
|
|
88
100
|
axis=self.channel_number,
|
|
89
101
|
on=True,
|
|
102
|
+
duration=duration,
|
|
90
103
|
)
|
|
91
104
|
await call_async("illuminator/on", request)
|
|
92
105
|
|
|
@@ -9,6 +9,7 @@ from ..exceptions.motion_lib_exception import MotionLibException
|
|
|
9
9
|
|
|
10
10
|
from ..dto import requests as dto
|
|
11
11
|
from ..dto.microscopy.wdi_autofocus_provider_status import WdiAutofocusProviderStatus
|
|
12
|
+
from ..dto.firmware_version import FirmwareVersion
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class WdiAutofocusProvider:
|
|
@@ -28,6 +29,13 @@ class WdiAutofocusProvider:
|
|
|
28
29
|
"""
|
|
29
30
|
return self._provider_id
|
|
30
31
|
|
|
32
|
+
@property
|
|
33
|
+
def firmware_version(self) -> FirmwareVersion:
|
|
34
|
+
"""
|
|
35
|
+
The firmware version of the connected autofocus.
|
|
36
|
+
"""
|
|
37
|
+
return self.__retrieve_firmware_version()
|
|
38
|
+
|
|
31
39
|
def __init__(self, provider_id: int):
|
|
32
40
|
self._provider_id: int = provider_id
|
|
33
41
|
|
|
@@ -116,6 +124,24 @@ class WdiAutofocusProvider:
|
|
|
116
124
|
)
|
|
117
125
|
call_sync("wdi/free", request)
|
|
118
126
|
|
|
127
|
+
def __retrieve_firmware_version(
|
|
128
|
+
self
|
|
129
|
+
) -> FirmwareVersion:
|
|
130
|
+
"""
|
|
131
|
+
Returns FW version.
|
|
132
|
+
|
|
133
|
+
Returns:
|
|
134
|
+
Firmware version.
|
|
135
|
+
"""
|
|
136
|
+
request = dto.InterfaceEmptyRequest(
|
|
137
|
+
interface_id=self.provider_id,
|
|
138
|
+
)
|
|
139
|
+
response = call_sync(
|
|
140
|
+
"wdi/get_firmware_version",
|
|
141
|
+
request,
|
|
142
|
+
FirmwareVersion.from_binary)
|
|
143
|
+
return response
|
|
144
|
+
|
|
119
145
|
def generic_read(
|
|
120
146
|
self,
|
|
121
147
|
register_id: int,
|
|
@@ -242,6 +268,120 @@ class WdiAutofocusProvider:
|
|
|
242
268
|
)
|
|
243
269
|
await call_async("wdi/write", request)
|
|
244
270
|
|
|
271
|
+
def generic_read_float(
|
|
272
|
+
self,
|
|
273
|
+
register_id: int,
|
|
274
|
+
count: int = 1,
|
|
275
|
+
offset: int = 0,
|
|
276
|
+
register_bank: str = "U"
|
|
277
|
+
) -> List[float]:
|
|
278
|
+
"""
|
|
279
|
+
Generic read operation.
|
|
280
|
+
|
|
281
|
+
Args:
|
|
282
|
+
register_id: Register address to read from.
|
|
283
|
+
count: Number of values to read (defaults to 1).
|
|
284
|
+
offset: Offset within the register (defaults to 0).
|
|
285
|
+
register_bank: Register bank letter (defaults to U for user bank).
|
|
286
|
+
|
|
287
|
+
Returns:
|
|
288
|
+
Array of floats read from the device.
|
|
289
|
+
"""
|
|
290
|
+
request = dto.WdiGenericFloatRequest(
|
|
291
|
+
interface_id=self.provider_id,
|
|
292
|
+
register_id=register_id,
|
|
293
|
+
count=count,
|
|
294
|
+
offset=offset,
|
|
295
|
+
register_bank=register_bank,
|
|
296
|
+
)
|
|
297
|
+
response = call(
|
|
298
|
+
"wdi/read_float",
|
|
299
|
+
request,
|
|
300
|
+
dto.DoubleArrayResponse.from_binary)
|
|
301
|
+
return response.values
|
|
302
|
+
|
|
303
|
+
async def generic_read_float_async(
|
|
304
|
+
self,
|
|
305
|
+
register_id: int,
|
|
306
|
+
count: int = 1,
|
|
307
|
+
offset: int = 0,
|
|
308
|
+
register_bank: str = "U"
|
|
309
|
+
) -> List[float]:
|
|
310
|
+
"""
|
|
311
|
+
Generic read operation.
|
|
312
|
+
|
|
313
|
+
Args:
|
|
314
|
+
register_id: Register address to read from.
|
|
315
|
+
count: Number of values to read (defaults to 1).
|
|
316
|
+
offset: Offset within the register (defaults to 0).
|
|
317
|
+
register_bank: Register bank letter (defaults to U for user bank).
|
|
318
|
+
|
|
319
|
+
Returns:
|
|
320
|
+
Array of floats read from the device.
|
|
321
|
+
"""
|
|
322
|
+
request = dto.WdiGenericFloatRequest(
|
|
323
|
+
interface_id=self.provider_id,
|
|
324
|
+
register_id=register_id,
|
|
325
|
+
count=count,
|
|
326
|
+
offset=offset,
|
|
327
|
+
register_bank=register_bank,
|
|
328
|
+
)
|
|
329
|
+
response = await call_async(
|
|
330
|
+
"wdi/read_float",
|
|
331
|
+
request,
|
|
332
|
+
dto.DoubleArrayResponse.from_binary)
|
|
333
|
+
return response.values
|
|
334
|
+
|
|
335
|
+
def generic_write_float(
|
|
336
|
+
self,
|
|
337
|
+
register_id: int,
|
|
338
|
+
data: List[float] = [],
|
|
339
|
+
offset: int = 0,
|
|
340
|
+
register_bank: str = "U"
|
|
341
|
+
) -> None:
|
|
342
|
+
"""
|
|
343
|
+
Generic write operation.
|
|
344
|
+
|
|
345
|
+
Args:
|
|
346
|
+
register_id: Register address to write to.
|
|
347
|
+
data: Array of values to write to the register. Empty array is allowed.
|
|
348
|
+
offset: Offset within the register (defaults to 0).
|
|
349
|
+
register_bank: Register bank letter (defaults to U for user bank).
|
|
350
|
+
"""
|
|
351
|
+
request = dto.WdiGenericFloatRequest(
|
|
352
|
+
interface_id=self.provider_id,
|
|
353
|
+
register_id=register_id,
|
|
354
|
+
data=data,
|
|
355
|
+
offset=offset,
|
|
356
|
+
register_bank=register_bank,
|
|
357
|
+
)
|
|
358
|
+
call("wdi/write_float", request)
|
|
359
|
+
|
|
360
|
+
async def generic_write_float_async(
|
|
361
|
+
self,
|
|
362
|
+
register_id: int,
|
|
363
|
+
data: List[float] = [],
|
|
364
|
+
offset: int = 0,
|
|
365
|
+
register_bank: str = "U"
|
|
366
|
+
) -> None:
|
|
367
|
+
"""
|
|
368
|
+
Generic write operation.
|
|
369
|
+
|
|
370
|
+
Args:
|
|
371
|
+
register_id: Register address to write to.
|
|
372
|
+
data: Array of values to write to the register. Empty array is allowed.
|
|
373
|
+
offset: Offset within the register (defaults to 0).
|
|
374
|
+
register_bank: Register bank letter (defaults to U for user bank).
|
|
375
|
+
"""
|
|
376
|
+
request = dto.WdiGenericFloatRequest(
|
|
377
|
+
interface_id=self.provider_id,
|
|
378
|
+
register_id=register_id,
|
|
379
|
+
data=data,
|
|
380
|
+
offset=offset,
|
|
381
|
+
register_bank=register_bank,
|
|
382
|
+
)
|
|
383
|
+
await call_async("wdi/write_float", request)
|
|
384
|
+
|
|
245
385
|
def enable_laser(
|
|
246
386
|
self
|
|
247
387
|
) -> None:
|
zaber_motion/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "7.
|
|
1
|
+
__version__ = "7.15.0"
|
|
@@ -9,13 +9,13 @@ zaber_motion/call.py,sha256=X8iXJdlO1AvnMeDFmKXEPY8UFQWn8EXZmoXzcWO_ihc,5404
|
|
|
9
9
|
zaber_motion/convert_exception.py,sha256=0ANPUmugxDvCGMURPN8Lqyi-3cU80L323xrsF19wbIk,8625
|
|
10
10
|
zaber_motion/dto_object.py,sha256=TrwKMn_dbeh4DnCToS507G5eRJiW0_ZcGj9Q5RaSjqY,377
|
|
11
11
|
zaber_motion/events.py,sha256=8UB_4SZz3HDb8VqborlHQGt7w0Nd11rEYblbVQxyckE,3510
|
|
12
|
-
zaber_motion/library.py,sha256=
|
|
12
|
+
zaber_motion/library.py,sha256=KSvJ0a4O8bqA83EtL8PmKUv18XHrxXinx2z1bZPfQ9A,5676
|
|
13
13
|
zaber_motion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
zaber_motion/serialization.py,sha256=0yLY0dA7XRjMAlI-wr92arZ6yRO97CyC_Rzc9BBHJRk,1019
|
|
15
15
|
zaber_motion/tools.py,sha256=ZI8xYDa6SFlMghP2qklV73Z0TJcezC6trdAAXVI6PoM,2291
|
|
16
16
|
zaber_motion/unit_table.py,sha256=DtphJjbzD1LSHpd4-idwIE2Dif89L7RrmeQI3LkOp40,2583
|
|
17
17
|
zaber_motion/units.py,sha256=h1sEuCQR0q8SeCdWd2V8X62VZJBxMda9Kef724f6yc0,11059
|
|
18
|
-
zaber_motion/version.py,sha256=
|
|
18
|
+
zaber_motion/version.py,sha256=VrjTjmBXMXwMfknPbQK7nsMSpgedOz1yuUcYCgELK-s,24
|
|
19
19
|
zaber_motion/ascii/__init__.py,sha256=9RFjxHOckdwD6DlAvmVfpWhR1U9-lWyU1t3EE0C2Glc,4921
|
|
20
20
|
zaber_motion/ascii/all_axes.py,sha256=-g226GCRClqolpwZSYQj_ohuVfyBf6YPNSt3BxXxme4,11145
|
|
21
21
|
zaber_motion/ascii/axis.py,sha256=6J1IjouSoZOFsVaTVfMj6GQKL9OGqPeb9w-NUY_IEe0,59558
|
|
@@ -77,7 +77,7 @@ zaber_motion/dto/ascii/io_port_type.py,sha256=6z50mu1AhzXZ0pzTl1KNNKgiUclKVHTmGG
|
|
|
77
77
|
zaber_motion/dto/ascii/lockstep_axes.py,sha256=2FGj2CZ4_DghPGPGuLHxGFmiFtVVE1ql56dVxqd8PtY,3699
|
|
78
78
|
zaber_motion/dto/ascii/measurement_sequence.py,sha256=60uYTd-wr0RVoIrDToAZ7IzQcD47X2sUxfXNRN2_WyM,2792
|
|
79
79
|
zaber_motion/dto/ascii/message_type.py,sha256=GMeDtVAoWKIQsxlV9emOJO7q90_AoEg7GT6nL6XRLuo,336
|
|
80
|
-
zaber_motion/dto/ascii/optional_measurement_sequence.py,sha256=
|
|
80
|
+
zaber_motion/dto/ascii/optional_measurement_sequence.py,sha256=7ZyZc07sxfu1oXVSBkagm7KHOocH4fVKJgg6GvNhwkc,2834
|
|
81
81
|
zaber_motion/dto/ascii/oscilloscope_capture_properties.py,sha256=iC5m1SWxmqO-EskIguVibysKAhycxyAADrtmHauY6z4,4647
|
|
82
82
|
zaber_motion/dto/ascii/oscilloscope_data_source.py,sha256=sQR5ePzWXfObCWRDW3S1CO74tFmkHSUG9bba4dohARo,215
|
|
83
83
|
zaber_motion/dto/ascii/paramset_info.py,sha256=sJH4IgVen9XD3PG7zEV3VgG7xzxb6Ggk9N_ZdpFGmoE,3324
|
|
@@ -153,7 +153,7 @@ zaber_motion/dto/product/__init__.py,sha256=86E40zuNYyjmUZbI633rB2PjjvhltcZ1KQ3O
|
|
|
153
153
|
zaber_motion/dto/product/process_controller_mode.py,sha256=CCiUqQHSuxui8Bn_qDFDgh5NdyREdC9eH3uWHQD4v54,241
|
|
154
154
|
zaber_motion/dto/product/process_controller_source.py,sha256=nW-vvxjqEaSVnhZrgIFNxq0Gvn5qmJsdpe2dY_fOEAY,2649
|
|
155
155
|
zaber_motion/dto/product/process_controller_source_sensor.py,sha256=2LvWeTrbG7OqTS26OZRGQtOUyBAjy6LaB9k9hoVEMSM,228
|
|
156
|
-
zaber_motion/dto/requests/__init__.py,sha256=
|
|
156
|
+
zaber_motion/dto/requests/__init__.py,sha256=VOsePl9evXP8Uda0bmpSExEdE_Zwusdz0JvGl6MAWWY,24155
|
|
157
157
|
zaber_motion/dto/requests/alert_event_wrapper.py,sha256=5py6PY1Ao_lkD3K_FvDHyW6pTDmOFl30Jh5lIwljB9E,3135
|
|
158
158
|
zaber_motion/dto/requests/autofocus_focus_request.py,sha256=9IGsIMqwoBryeo5onGrqWMcD5WFR7dEtnfU_DWHL4A8,5403
|
|
159
159
|
zaber_motion/dto/requests/autofocus_get_objective_params_request.py,sha256=2p79lpPqgJzOqglYym7qU4JT1IQ7jmkRn-bZhReQSiw,5472
|
|
@@ -179,7 +179,7 @@ zaber_motion/dto/requests/binary_reply_only_event_wrapper.py,sha256=Tkt1raNQhf42
|
|
|
179
179
|
zaber_motion/dto/requests/bool_response.py,sha256=lY_F_J8Hvdw0QnK-PH2gzdpW1jYU9sIMBQ74m2Y0J6I,1323
|
|
180
180
|
zaber_motion/dto/requests/can_set_state_axis_response.py,sha256=6LYjFfbWYU51P7vuhzPalPiM_l9BWCkQ1-msf86C9Uk,2290
|
|
181
181
|
zaber_motion/dto/requests/can_set_state_request.py,sha256=LINLynW6PGX-f8scpvcvuu9leSL-nQOk9RgoEreSn94,4036
|
|
182
|
-
zaber_motion/dto/requests/channel_on.py,sha256=
|
|
182
|
+
zaber_motion/dto/requests/channel_on.py,sha256=pmpCwcu6lxDJyHNQcT0hJUG53Mvbqd2SWqPZIQ5J7CI,3567
|
|
183
183
|
zaber_motion/dto/requests/channel_set_intensity.py,sha256=Ndrp7mdGK9Myz-6x8g0irp50VsQ9RTuZWbncQMWaAQ4,3472
|
|
184
184
|
zaber_motion/dto/requests/check_version_request.py,sha256=We9hlCDdiQVd6L5-EHzGyHZppSYWxsaNytVX87MYouw,1876
|
|
185
185
|
zaber_motion/dto/requests/custom_interface_close_request.py,sha256=nXLojkpYSauIP_I-n3mjFnqi4CLFG_5qn0HZ4yuEifQ,2362
|
|
@@ -365,6 +365,7 @@ zaber_motion/dto/requests/string_array_response.py,sha256=WqhHTutnGcxxQQ7vA8qyXH
|
|
|
365
365
|
zaber_motion/dto/requests/string_response.py,sha256=SGoY26-ZSdEC2uUwExJ90fc4LK-LHt_jaAYYOvjOsK4,1498
|
|
366
366
|
zaber_motion/dto/requests/test_event.py,sha256=F-RVsjrV-f4bV-YTgk3p-5HDV4APhRZoOtqUgfiI9Mk,1449
|
|
367
367
|
zaber_motion/dto/requests/test_request.py,sha256=AVh7wgezF6XHM3dtQmeI3O9WxyMP0B7mlLgT3IweqK0,1937
|
|
368
|
+
zaber_motion/dto/requests/test_request_complex.py,sha256=TZ89lxlw7UJIZjBdq8uORcyREcu1UwlB1OyOFkDBteU,2315
|
|
368
369
|
zaber_motion/dto/requests/test_response.py,sha256=GQ_06sv2AIhTWstD_ANX9sxDiUW-EFgsjxtCtf-zLig,1515
|
|
369
370
|
zaber_motion/dto/requests/test_response_long.py,sha256=NNlP0KRfhk-21E3sw2Z6LfUry6hTmTlml7bmt4vwHmM,1983
|
|
370
371
|
zaber_motion/dto/requests/toggle_device_db_store_request.py,sha256=W3MNaR1U-2ZSIwY9xLs1jAC7WcRHP4rz1ZqCpzR5BwY,1904
|
|
@@ -405,6 +406,7 @@ zaber_motion/dto/requests/unknown_binary_response_event_wrapper.py,sha256=RXAKQV
|
|
|
405
406
|
zaber_motion/dto/requests/unknown_response_event_wrapper.py,sha256=vMqTqjC1K6GX447q424no1-OQBgyIE1O7B8_9bdKWIw,3483
|
|
406
407
|
zaber_motion/dto/requests/wait_to_clear_warnings_request.py,sha256=85I8HjG1CPLU1-WdbRsjW1m6sEZTtMTxEv2p0fUTGKo,4453
|
|
407
408
|
zaber_motion/dto/requests/wait_to_respond_request.py,sha256=NK4W7r0D1-YV2hY-fgDPP3RDZVf4nhTKa5cLmu-SfDc,2915
|
|
409
|
+
zaber_motion/dto/requests/wdi_generic_float_request.py,sha256=sYGbMQtd_4XSBtbElpyyzHxAITqARXfDze3DwANkdVs,4972
|
|
408
410
|
zaber_motion/dto/requests/wdi_generic_request.py,sha256=0gy5YxJzvLfx-2je4Jeqe60davRISvvPEUd_19JpTD0,5565
|
|
409
411
|
zaber_motion/dto/requests/wdi_get_status_response.py,sha256=gsoNgsSVScPxrDLwLuMKHEWHn2M95uFOdtjX4hfWR-4,1971
|
|
410
412
|
zaber_motion/exceptions/__init__.py,sha256=us1-pFsQ85T1Z5Bo8hmVZwUFvvdQcDo4lcLghRtDK4Y,8813
|
|
@@ -478,17 +480,17 @@ zaber_motion/microscopy/__init__.py,sha256=B1nfWsalhZC2iZZR65YCu-v1gzI0_A0mpebME
|
|
|
478
480
|
zaber_motion/microscopy/autofocus.py,sha256=XhorXFrXT_Sikp0UhTIQc9xDCpGbhmq9V9B3odPDIwo,24389
|
|
479
481
|
zaber_motion/microscopy/camera_trigger.py,sha256=WqKqdaIhF68BnvYE6C4ygY3f5uoCGTGq1bM3LXH0--k,3583
|
|
480
482
|
zaber_motion/microscopy/filter_changer.py,sha256=8nTMWfF89IoEy5sueZA-v6sHEc-xhLuL6cl6k-G2RTQ,4826
|
|
481
|
-
zaber_motion/microscopy/illuminator.py,sha256=
|
|
482
|
-
zaber_motion/microscopy/illuminator_channel.py,sha256=
|
|
483
|
+
zaber_motion/microscopy/illuminator.py,sha256=C9sog9vqh6ikTCJ-cwmjV5k5vt8nr3jpKNyLT2HEFn0,4982
|
|
484
|
+
zaber_motion/microscopy/illuminator_channel.py,sha256=tq1BzM0G5RfaOyOnLi7hzPSFAFhmeUKF3cu2UTTfZ1c,21661
|
|
483
485
|
zaber_motion/microscopy/microscope.py,sha256=2f02iWTypslE9xjnrIIYfty-XmBVOLQVuxoSqrLDsG0,10096
|
|
484
486
|
zaber_motion/microscopy/objective_changer.py,sha256=YdIUczXXijOpiOWKmj1OIcbTZvuls24AqoRju3Z8kT0,13960
|
|
485
|
-
zaber_motion/microscopy/wdi_autofocus_provider.py,sha256=
|
|
487
|
+
zaber_motion/microscopy/wdi_autofocus_provider.py,sha256=QwYC7ITnjSjUOjWkCxNPVViiK5874S5sM_6Xniiq0kI,16350
|
|
486
488
|
zaber_motion/product/__init__.py,sha256=ZGZzfMmsd1ZWwLk0SZ3Ac1Une88SZQHuuzEFGgd6ork,538
|
|
487
489
|
zaber_motion/product/process.py,sha256=o5GoKjC7eTVwTrfeugqvfTmg-UARhyTTbDDmoGCQ8Q8,28345
|
|
488
490
|
zaber_motion/product/process_controller.py,sha256=GVYMALlFWEcvLipPk1GF-M7LcoKfCf5_YqFMeFseCpg,4327
|
|
489
|
-
zaber_motion-7.
|
|
490
|
-
zaber_motion_bindings/zaber-motion-core-windows-arm64.dll,sha256
|
|
491
|
-
zaber_motion-7.
|
|
492
|
-
zaber_motion-7.
|
|
493
|
-
zaber_motion-7.
|
|
494
|
-
zaber_motion-7.
|
|
491
|
+
zaber_motion-7.15.0.dist-info/licenses/LICENSE.txt,sha256=H7YIgjgmcE_L-pfvZTWUoLrk7p0LiiKQh5_oeIWux-k,111363
|
|
492
|
+
zaber_motion_bindings/zaber-motion-core-windows-arm64.dll,sha256=-1llGu8gLoHMI_ndf5DHRYC8vSvJergnOURoPOzhFyg,14820352
|
|
493
|
+
zaber_motion-7.15.0.dist-info/METADATA,sha256=KpBDKXfzEnvW4ReQ7cNNmW8ckup7is5Iwa3QEgk2vlw,129839
|
|
494
|
+
zaber_motion-7.15.0.dist-info/WHEEL,sha256=PtZ7_1TP6Cu1E5x_voSGj5l6q0pu2rBD8e6tfv65a50,97
|
|
495
|
+
zaber_motion-7.15.0.dist-info/top_level.txt,sha256=ypgkPvPad6Oge50CT6unnvxCEliKUB6olL6CUUER1SA,51
|
|
496
|
+
zaber_motion-7.15.0.dist-info/RECORD,,
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|