We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe8c5a4 commit cb9558bCopy full SHA for cb9558b
src/pytac/aioca_cs.py
@@ -1,6 +1,7 @@
1
import logging
2
3
-from aioca import caget, caput, CANothing
+from aioca import CANothing, caget, caput
4
+
5
from pytac.cs import ControlSystem
6
from pytac.exceptions import ControlSystemException
7
@@ -121,7 +122,9 @@ async def set_multiple(self, pvs, values, throw=True):
121
122
"""
123
if len(pvs) != len(values):
124
raise ValueError("Please enter the same number of values as PVs.")
- status = await caput(pvs, values, timeout=self._timeout, throw=False, wait=self._wait)
125
+ status = await caput(
126
+ pvs, values, timeout=self._timeout, throw=False, wait=self._wait
127
+ )
128
return_values = []
129
failures = []
130
for stat in status:
src/pytac/cs.py
@@ -10,7 +10,7 @@ class ControlSystem:
10
**Methods:**
11
12
13
- async def get_single(self, pv, throw):
+ def get_single(self, pv, throw):
14
"""Get the value of a given PV.
15
16
Args:
@@ -27,7 +27,7 @@ async def get_single(self, pv, throw):
27
28
raise NotImplementedError()
29
30
- async def get_multiple(self, pvs, throw):
+ def get_multiple(self, pvs, throw):
31
"""Get the value for given PVs.
32
33
@@ -44,7 +44,7 @@ async def get_multiple(self, pvs, throw):
44
45
46
47
- async def set_single(self, pv, value, throw):
+ def set_single(self, pv, value, throw):
48
"""Set the value of a given PV.
49
50
@@ -58,7 +58,7 @@ async def set_single(self, pv, value, throw):
58
59
60
61
- async def set_multiple(self, pvs, values, throw):
+ def set_multiple(self, pvs, values, throw):
62
"""Set the values for given PVs.
63
64
src/pytac/data_source.py
@@ -28,7 +28,7 @@ def get_fields(self):
- async def get_value(self, field, handle, throw):
+ def get_value(self, field, handle, throw):
"""Get a value for a field.
34
@@ -368,4 +368,4 @@ async def set_value(self, field, value, throw=True):
368
if inspect.iscoroutinefunction(device.set_value):
369
await device.set_value(value, throw)
370
else:
371
- device.set_value(value, throw)
+ device.set_value(value, throw)
src/pytac/device.py
@@ -27,7 +27,7 @@ def is_enabled(self) -> bool:
- async def get_value(self, handle: str, throw: bool) -> float:
+ def get_value(self, handle: str, throw: bool) -> float:
"""Read the value from the device.
src/pytac/element.py
@@ -290,7 +290,9 @@ async def set_value(
290
FieldException: if the element does not have the specified field.
291
292
try:
293
- await self._data_source_manager.set_value(field, value, units, data_source, throw)
+ await self._data_source_manager.set_value(
294
+ field, value, units, data_source, throw
295
296
except DataSourceException as e:
297
raise DataSourceException(f"{self}: {e}") from e
298
except FieldException as e:
src/pytac/lattice.py
@@ -644,7 +644,7 @@ async def get_element_values(
644
family, field, values, pytac.ENG, pytac.PHYS
645
)
646
647
- values = super().get_element_values(
+ values = await super().get_element_values(
648
family, field, handle, units, data_source, throw
649
650
if dtype is not None:
@@ -694,4 +694,6 @@ async def set_element_values(
694
695
await self._cs.set_multiple(pv_names, values, throw)
696
697
- super().set_element_values(family, field, values, units, data_source, throw)
+ await super().set_element_values(
698
+ family, field, values, units, data_source, throw
699
0 commit comments