summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-03-08 12:03:14 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-03-08 12:03:14 +0100
commit3804fd2355997cc5d2b811ffcbc546a367aa2b48 (patch)
tree68245e0ad10636ba78258a50bdfc9b10fa7bbcd9 /src
parent923dab046564bdfcd7267281b99462f6d866d311 (diff)
downloadlibuca-3804fd2355997cc5d2b811ffcbc546a367aa2b48.tar.gz
libuca-3804fd2355997cc5d2b811ffcbc546a367aa2b48.tar.bz2
libuca-3804fd2355997cc5d2b811ffcbc546a367aa2b48.tar.xz
libuca-3804fd2355997cc5d2b811ffcbc546a367aa2b48.zip
Add r/w access for each property
Diffstat (limited to 'src')
-rw-r--r--src/uca.c50
-rw-r--r--src/uca.h6
2 files changed, 31 insertions, 25 deletions
diff --git a/src/uca.c b/src/uca.c
index 84de8b6..ea91f59 100644
--- a/src/uca.c
+++ b/src/uca.c
@@ -38,31 +38,31 @@ const char *uca_unit_map[] = {
};
static struct uca_property_t property_map[UCA_PROP_LAST+1] = {
- { "general.name", uca_na, uca_string },
- { "image.width", uca_pixel, uca_uint32t },
- { "image.width.min", uca_pixel, uca_uint32t },
- { "image.width.max", uca_pixel, uca_uint32t },
- { "image.height", uca_pixel, uca_uint32t },
- { "image.height.min", uca_pixel, uca_uint32t },
- { "image.height.max", uca_pixel, uca_uint32t },
- { "image.offset.x", uca_pixel, uca_uint32t },
- { "image.offset.y", uca_pixel, uca_uint32t },
- { "image.bitdepth", uca_bits, uca_uint8t },
- { "time.exposure", uca_us, uca_uint32t },
- { "time.exposure.min", uca_ns, uca_uint32t },
- { "time.exposure.max", uca_ms, uca_uint32t },
- { "time.delay", uca_us, uca_uint32t },
- { "time.delay.min", uca_ns, uca_uint32t },
- { "time.delay.max", uca_ms, uca_uint32t },
- { "time.framerate", uca_fps, uca_uint32t },
- { "mode.trigger", uca_na, uca_uint32t },
- { "mode.timestamp", uca_na, uca_uint32t },
- { "mode.scan", uca_na, uca_uint32t },
- { "ipe.interlace.samplerate", uca_na, uca_uint32t },
- { "ipe.interlace.threshold.pixel", uca_na, uca_uint32t },
- { "ipe.interlace.threshold.row", uca_na, uca_uint32t },
- { "mode.correction", uca_na, uca_uint32t },
- { NULL, 0, 0 }
+ { "general.name", uca_na, uca_string, uca_read },
+ { "image.width", uca_pixel, uca_uint32t, uca_readwrite },
+ { "image.width.min", uca_pixel, uca_uint32t, uca_read },
+ { "image.width.max", uca_pixel, uca_uint32t, uca_read },
+ { "image.height", uca_pixel, uca_uint32t, uca_readwrite },
+ { "image.height.min", uca_pixel, uca_uint32t, uca_read },
+ { "image.height.max", uca_pixel, uca_uint32t, uca_read },
+ { "image.offset.x", uca_pixel, uca_uint32t, uca_readwrite },
+ { "image.offset.y", uca_pixel, uca_uint32t, uca_readwrite },
+ { "image.bitdepth", uca_bits, uca_uint8t, uca_read},
+ { "time.exposure", uca_us, uca_uint32t, uca_readwrite },
+ { "time.exposure.min", uca_ns, uca_uint32t, uca_read },
+ { "time.exposure.max", uca_ms, uca_uint32t, uca_read },
+ { "time.delay", uca_us, uca_uint32t, uca_readwrite },
+ { "time.delay.min", uca_ns, uca_uint32t, uca_read },
+ { "time.delay.max", uca_ms, uca_uint32t, uca_read },
+ { "time.framerate", uca_fps, uca_uint32t, uca_read },
+ { "mode.trigger", uca_na, uca_uint32t, uca_readwrite },
+ { "mode.timestamp", uca_na, uca_uint32t, uca_readwrite },
+ { "mode.scan", uca_na, uca_uint32t, uca_readwrite },
+ { "ipe.interlace.samplerate", uca_na, uca_uint32t, uca_readwrite },
+ { "ipe.interlace.threshold.pixel", uca_na, uca_uint32t, uca_readwrite },
+ { "ipe.interlace.threshold.row", uca_na, uca_uint32t, uca_readwrite },
+ { "mode.correction", uca_na, uca_uint32t, uca_readwrite },
+ { NULL, 0, 0, 0 }
};
struct uca_t *uca_init(void)
diff --git a/src/uca.h b/src/uca.h
index 5fa8c39..0c554c6 100644
--- a/src/uca.h
+++ b/src/uca.h
@@ -117,6 +117,12 @@ struct uca_property_t {
uca_uint8t,
uca_string
} type;
+
+ enum uca_access_rights {
+ uca_read = 0x01,
+ uca_write = 0x02,
+ uca_readwrite = 0x01 | 0x02
+ } access;
};
extern const char *uca_unit_map[]; /**< maps unit numbers to corresponding strings */