From f83189da7a96f19d7186e623426b39bafed0c714 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Tue, 17 Mar 2015 13:55:14 +0100 Subject: tango: provide an "image" attribute --- tango/Uca | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tango/Uca b/tango/Uca index f08ef20..4ba7108 100755 --- a/tango/Uca +++ b/tango/Uca @@ -6,7 +6,7 @@ import numpy as np import PyTango from gi.repository import Uca, GObject from PyTango import Attr, AttrWriteType, DevState -from PyTango.server import Device, DeviceMeta, device_property, command, server_run +from PyTango.server import Device, DeviceMeta, attribute, device_property, command, server_run try: import tifffile @@ -65,6 +65,9 @@ class Camera(Device): camera = device_property(dtype=str, default_value='mock') + image = attribute(label="Image", dtype=[[np.uint16]], + max_dim_x=4096, max_dim_y=4096) + def init_device(self): Device.init_device(self) self.set_state(DevState.ON) @@ -123,6 +126,9 @@ class Camera(Device): else: np.savez(open(path, 'wb'), frame) + def read_image(self): + return self.grab() + if __name__ == '__main__': server_run((Camera,)) -- cgit v1.2.3