mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2026-02-04 14:18:41 +01:00
fix(waveform_sim): added signal to emit 0D data
This commit is contained in:
@@ -90,6 +90,7 @@ class SimWaveform(Device):
|
|||||||
compute_readback=True,
|
compute_readback=True,
|
||||||
kind=Kind.hinted,
|
kind=Kind.hinted,
|
||||||
)
|
)
|
||||||
|
waveform_0d = Cpt(AsyncSignal, name="waveform_0d", ndim=0, max_size=1000, kind=Kind.hinted)
|
||||||
data = Cpt(AsyncSignal, name="data", ndim=1, max_size=1000)
|
data = Cpt(AsyncSignal, name="data", ndim=1, max_size=1000)
|
||||||
# Can be extend or append
|
# Can be extend or append
|
||||||
async_update = Cpt(AsyncUpdateSignal, value="add", kind=Kind.config)
|
async_update = Cpt(AsyncUpdateSignal, value="add", kind=Kind.config)
|
||||||
@@ -151,6 +152,9 @@ class SimWaveform(Device):
|
|||||||
Here, we also run a callback on SUB_MONITOR to send the image data the device_monitor endpoint in BEC.
|
Here, we also run a callback on SUB_MONITOR to send the image data the device_monitor endpoint in BEC.
|
||||||
"""
|
"""
|
||||||
status = DeviceStatus(self)
|
status = DeviceStatus(self)
|
||||||
|
self.waveform_0d.put(
|
||||||
|
np.random.randint(0, 100), async_update={"type": "add", "max_shape": [None]}
|
||||||
|
)
|
||||||
|
|
||||||
def acquire(status: DeviceStatus):
|
def acquire(status: DeviceStatus):
|
||||||
try:
|
try:
|
||||||
@@ -247,7 +251,6 @@ class SimWaveform(Device):
|
|||||||
is published to the device_monitor endpoint in REDIS.
|
is published to the device_monitor endpoint in REDIS.
|
||||||
"""
|
"""
|
||||||
if self._staged is Staged.yes:
|
if self._staged is Staged.yes:
|
||||||
|
|
||||||
return super().stage()
|
return super().stage()
|
||||||
self.file_path.set(
|
self.file_path.set(
|
||||||
os.path.join(
|
os.path.join(
|
||||||
|
|||||||
Reference in New Issue
Block a user