added SynSignalRO
This commit is contained in:
parent
fbdccf4dd7
commit
a8a2637d07
@ -1,6 +1,6 @@
|
|||||||
from .galil.galil_ophyd import GalilMotor
|
from .galil.galil_ophyd import GalilMotor
|
||||||
from .npoint.npoint import NPointAxis
|
from .npoint.npoint import NPointAxis
|
||||||
from .rt_lamni import RtLamniMotor
|
from .rt_lamni import RtLamniMotor
|
||||||
from .sim.sim import SynAxisMonitor, SynAxisOPAAS, SynFlyer, SynSLSDetector
|
from .sim.sim import SynAxisMonitor, SynAxisOPAAS, SynFlyer, SynSignalRO, SynSLSDetector
|
||||||
from .sls_devices.sls_devices import SLSOperatorMessages
|
from .sls_devices.sls_devices import SLSOperatorMessages
|
||||||
from .smaract.smaract_ophyd import SmaractMotor
|
from .smaract.smaract_ophyd import SmaractMotor
|
||||||
|
@ -1 +1 @@
|
|||||||
from .sim import SynAxisMonitor, SynAxisOPAAS, SynFlyer, SynSLSDetector
|
from .sim import SynAxisMonitor, SynAxisOPAAS, SynFlyer, SynSignalRO, SynSLSDetector
|
||||||
|
@ -2,7 +2,6 @@ import os
|
|||||||
import threading
|
import threading
|
||||||
import time as ttime
|
import time as ttime
|
||||||
import warnings
|
import warnings
|
||||||
from email.message import Message
|
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -19,6 +18,22 @@ class DeviceStop(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class SynSignalRO(Signal):
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
self._metadata.update(
|
||||||
|
write_access=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
def wait_for_connection(self, timeout=0):
|
||||||
|
super().wait_for_connection(timeout)
|
||||||
|
self._metadata.update(connected=True)
|
||||||
|
|
||||||
|
def get(self, **kwargs):
|
||||||
|
self._readback = np.random.rand()
|
||||||
|
return self._readback
|
||||||
|
|
||||||
|
|
||||||
class _ReadbackSignal(Signal):
|
class _ReadbackSignal(Signal):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
@ -284,6 +299,12 @@ class DummyController:
|
|||||||
some_var = 10
|
some_var = 10
|
||||||
another_var = 20
|
another_var = 20
|
||||||
|
|
||||||
|
def on(self):
|
||||||
|
self._connected = True
|
||||||
|
|
||||||
|
def off(self):
|
||||||
|
self._connected = False
|
||||||
|
|
||||||
def controller_show_all(self):
|
def controller_show_all(self):
|
||||||
"""dummy controller show all
|
"""dummy controller show all
|
||||||
|
|
||||||
@ -297,6 +318,10 @@ class DummyController:
|
|||||||
print(self.some_var)
|
print(self.some_var)
|
||||||
|
|
||||||
|
|
||||||
|
class DummyControllerDevice(Device):
|
||||||
|
USER_ACCESS = ["controller"]
|
||||||
|
|
||||||
|
|
||||||
class SynFlyer(Device, PositionerBase):
|
class SynFlyer(Device, PositionerBase):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user