summaryrefslogtreecommitdiffstats
path: root/src/uca.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-10-20 17:25:53 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-10-20 17:25:53 +0200
commit7e1ec3056d1fdb6786c452ba6ed7e978355a98c2 (patch)
tree3e423903d8ad51c115db17f699e071a162447c24 /src/uca.c
parentf3fdc154a50516dc969942594e884cd0be0b29d0 (diff)
downloadlibuca-7e1ec3056d1fdb6786c452ba6ed7e978355a98c2.tar.gz
libuca-7e1ec3056d1fdb6786c452ba6ed7e978355a98c2.tar.bz2
libuca-7e1ec3056d1fdb6786c452ba6ed7e978355a98c2.tar.xz
libuca-7e1ec3056d1fdb6786c452ba6ed7e978355a98c2.zip
Add: auto transfer property and readout function
Diffstat (limited to 'src/uca.c')
-rw-r--r--src/uca.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/uca.c b/src/uca.c
index ec8ad07..191092c 100644
--- a/src/uca.c
+++ b/src/uca.c
@@ -86,6 +86,7 @@ static struct uca_property property_map[UCA_PROP_LAST+1] = {
{ "Gain.ADC.Step", uca_na, uca_uint32t, uca_read },
{ "Grabber.Timeout", uca_s, uca_uint32t, uca_readwrite },
{ "Grabber.Synchronous", uca_bool, uca_uint32t, uca_readwrite },
+ { "Grabber.Auto", uca_bool, uca_uint32t, uca_readwrite },
{ "Mode.Timestamp", uca_na, uca_uint32t, uca_readwrite },
{ "Mode.Scan", uca_na, uca_uint32t, uca_readwrite },
{ "Mode.Hotpixel", uca_na, uca_uint32t, uca_readwrite },
@@ -331,3 +332,13 @@ uint32_t uca_cam_grab(struct uca_camera *cam, char *buffer, void *meta_data)
return priv->grab(priv, buffer, meta_data);
}
+uint32_t uca_cam_readout(struct uca_camera *cam)
+{
+ struct uca_camera_priv *priv = cam->priv;
+ if (priv->state == UCA_CAM_RECORDING)
+ return UCA_ERR_CAMERA | UCA_ERR_IS_RECORDING;
+ if (priv->readout == NULL)
+ return UCA_ERR_CAMERA | UCA_ERR_NOT_IMPLEMENTED;
+ return priv->readout(priv);
+}
+