diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2015-03-17 13:55:14 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2015-03-17 13:57:51 +0100 |
commit | f83189da7a96f19d7186e623426b39bafed0c714 (patch) | |
tree | 6b476214405765c55709f1cfa74ebf333a0264f7 /tango/Uca | |
parent | 175b7e29e2e1076add453e1d1dd758ddfcc23811 (diff) | |
download | libuca-f83189da7a96f19d7186e623426b39bafed0c714.tar.gz libuca-f83189da7a96f19d7186e623426b39bafed0c714.tar.bz2 libuca-f83189da7a96f19d7186e623426b39bafed0c714.tar.xz libuca-f83189da7a96f19d7186e623426b39bafed0c714.zip |
tango: provide an "image" attribute
Diffstat (limited to 'tango/Uca')
-rwxr-xr-x | tango/Uca | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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,)) |