added SynSignalRO
This commit is contained in:
parent
fbdccf4dd7
commit
a8a2637d07
@ -1,6 +1,6 @@
|
||||
from .galil.galil_ophyd import GalilMotor
|
||||
from .npoint.npoint import NPointAxis
|
||||
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 .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 time as ttime
|
||||
import warnings
|
||||
from email.message import Message
|
||||
from typing import List
|
||||
|
||||
import numpy as np
|
||||
@ -19,6 +18,22 @@ class DeviceStop(Exception):
|
||||
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):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
@ -284,6 +299,12 @@ class DummyController:
|
||||
some_var = 10
|
||||
another_var = 20
|
||||
|
||||
def on(self):
|
||||
self._connected = True
|
||||
|
||||
def off(self):
|
||||
self._connected = False
|
||||
|
||||
def controller_show_all(self):
|
||||
"""dummy controller show all
|
||||
|
||||
@ -297,6 +318,10 @@ class DummyController:
|
||||
print(self.some_var)
|
||||
|
||||
|
||||
class DummyControllerDevice(Device):
|
||||
USER_ACCESS = ["controller"]
|
||||
|
||||
|
||||
class SynFlyer(Device, PositionerBase):
|
||||
def __init__(
|
||||
self,
|
||||
|
Loading…
x
Reference in New Issue
Block a user