summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/uca.c60
-rw-r--r--src/uca.h8
2 files changed, 42 insertions, 26 deletions
diff --git a/src/uca.c b/src/uca.c
index 7cbe8b8..84de8b6 100644
--- a/src/uca.c
+++ b/src/uca.c
@@ -25,31 +25,43 @@
#include "cameras/photron.h"
#endif
+const char *uca_unit_map[] = {
+ "px",
+ "bits",
+ "ns",
+ "µs",
+ "ms",
+ "s",
+ "rows",
+ "fps"
+ ""
+};
+
static struct uca_property_t property_map[UCA_PROP_LAST+1] = {
- { "name", uca_na, uca_string },
- { "width", uca_pixel, uca_uint32t },
- { "width.min", uca_pixel, uca_uint32t },
- { "width.max", uca_pixel, uca_uint32t },
- { "height", uca_pixel, uca_uint32t },
- { "height.min", uca_pixel, uca_uint32t },
- { "height.max", uca_pixel, uca_uint32t },
- { "offset.x", uca_pixel, uca_uint32t },
- { "offset.y", uca_pixel, uca_uint32t },
- { "bitdepth", uca_bits, uca_uint8t },
- { "exposure", uca_us, uca_uint32t },
- { "exposure.min", uca_ns, uca_uint32t },
- { "exposure.max", uca_ms, uca_uint32t },
- { "delay", uca_us, uca_uint32t },
- { "delay.min", uca_ns, uca_uint32t },
- { "delay.max", uca_ms, uca_uint32t },
- { "framerate", uca_na, uca_uint32t },
- { "triggermode", uca_na, uca_uint32t },
- { "timestampmode", uca_na, uca_uint32t },
- { "scan-mode", uca_na, uca_uint32t },
- { "interlace.samplerate", uca_na, uca_uint32t },
- { "interlace.threshold.pixel", uca_na, uca_uint32t },
- { "interlace.threshold.row", uca_na, uca_uint32t },
- { "correctionmode", uca_na, uca_uint32t },
+ { "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 }
};
diff --git a/src/uca.h b/src/uca.h
index 9c17b86..5fa8c39 100644
--- a/src/uca.h
+++ b/src/uca.h
@@ -93,6 +93,7 @@ enum uca_property_ids {
#define UCA_CORRECT_HOTPIXEL 0x02
#define UCA_CORRECT_GAIN 0x04
+
/**
* \brief Describe a property used by cameras and frame grabbers
*/
@@ -100,13 +101,14 @@ struct uca_property_t {
const char *name;
enum uca_unit {
- uca_pixel,
+ uca_pixel = 0,
uca_bits,
uca_ns,
uca_us,
uca_ms,
uca_s,
uca_rows,
+ uca_fps,
uca_na
} unit;
@@ -117,10 +119,12 @@ struct uca_property_t {
} type;
};
+extern const char *uca_unit_map[]; /**< maps unit numbers to corresponding strings */
+
enum uca_errors {
UCA_NO_ERROR = 0,
UCA_ERR_GRABBER_NOT_FOUND,
- UCA_ERR_CAM_NOT_FOUND, /**< camera probing or initialization failed */
+ UCA_ERR_CAM_NOT_FOUND, /**< camera probing or initialization failed */
UCA_ERR_PROP_INVALID, /**< the requested property is not supported by the camera */
UCA_ERR_PROP_GENERAL, /**< error occured reading/writing the property */
UCA_ERR_PROP_VALUE_OUT_OF_RANGE, /**< error occured writing the property */