Merge branch 'master' into online_changes

This commit is contained in:
2022-10-31 13:28:57 +01:00
4 changed files with 59 additions and 25 deletions

View File

@@ -1 +1 @@
from .sim import SynAxisMonitor, SynAxisOPAAS, SynFlyer, SynSLSDetector
from .sim import SynAxisMonitor, SynAxisOPAAS, SynFlyer, SynSignalRO, SynSLSDetector

View File

@@ -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,