summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mock/uca-mock-camera.c2
-rw-r--r--plugins/pco/uca-pco-camera.c14
-rw-r--r--src/uca-camera.c7
-rw-r--r--src/uca-camera.h1
-rw-r--r--test/test-mock.c4
5 files changed, 25 insertions, 3 deletions
diff --git a/plugins/mock/uca-mock-camera.c b/plugins/mock/uca-mock-camera.c
index 38caf0d..bf3124e 100644
--- a/plugins/mock/uca-mock-camera.c
+++ b/plugins/mock/uca-mock-camera.c
@@ -397,6 +397,8 @@ static void uca_mock_camera_init(UcaMockCamera *self)
g_value_init(&val, G_TYPE_UINT);
g_value_set_uint(&val, 1);
g_value_array_append(self->priv->binnings, &val);
+
+ uca_camera_register_unit (UCA_CAMERA (self), "frame-rate", UCA_UNIT_COUNT);
}
G_MODULE_EXPORT UcaCamera *
diff --git a/plugins/pco/uca-pco-camera.c b/plugins/pco/uca-pco-camera.c
index 725ffbf..92f814e 100644
--- a/plugins/pco/uca-pco-camera.c
+++ b/plugins/pco/uca-pco-camera.c
@@ -1363,6 +1363,8 @@ uca_pco_camera_class_init(UcaPcoCameraClass *klass)
static void
uca_pco_camera_init(UcaPcoCamera *self)
{
+ UcaCamera *camera;
+
self->priv = UCA_PCO_CAMERA_GET_PRIVATE(self);
self->priv->fg = NULL;
self->priv->fg_mem = NULL;
@@ -1376,6 +1378,18 @@ uca_pco_camera_init(UcaPcoCamera *self)
self->priv->delay_timebase = TIMEBASE_INVALID;
self->priv->exposure_timebase = TIMEBASE_INVALID;
+
+ camera = UCA_CAMERA (self);
+ uca_camera_register_unit (camera, "sensor-width-extended", UCA_UNIT_PIXEL);
+ uca_camera_register_unit (camera, "sensor-height-extended", UCA_UNIT_PIXEL);
+ uca_camera_register_unit (camera, "temperature", UCA_UNIT_DEGREE_CELSIUS);
+ uca_camera_register_unit (camera, "cooling-point", UCA_UNIT_DEGREE_CELSIUS);
+ uca_camera_register_unit (camera, "cooling-point-min", UCA_UNIT_DEGREE_CELSIUS);
+ uca_camera_register_unit (camera, "cooling-point-max", UCA_UNIT_DEGREE_CELSIUS);
+ uca_camera_register_unit (camera, "cooling-point-default", UCA_UNIT_DEGREE_CELSIUS);
+ uca_camera_register_unit (camera, "sensor-adcs", UCA_UNIT_COUNT);
+ uca_camera_register_unit (camera, "sensor-max-adcs", UCA_UNIT_COUNT);
+ uca_camera_register_unit (camera, "delay-time", UCA_UNIT_SECOND);
}
G_MODULE_EXPORT UcaCamera *
diff --git a/src/uca-camera.c b/src/uca-camera.c
index 2cf17ff..8b08359 100644
--- a/src/uca-camera.c
+++ b/src/uca-camera.c
@@ -56,10 +56,11 @@ GQuark uca_camera_error_quark()
/**
* UcaUnit:
* @UCA_UNIT_NA: Not applicable
- * @UCA_UNIT_METER: SI meter
- * @UCA_UNIT_SECOND: SI second
+ * @UCA_UNIT_METER: Length in SI meter
+ * @UCA_UNIT_SECOND: Time in SI second
* @UCA_UNIT_PIXEL: Number of pixels in one dimension
- * @UCA_UNIT_COUNT: Number
+ * @UCA_UNIT_DEGREE_CELSIUS: Temperature in degree Celsius
+ * @UCA_UNIT_COUNT: Generic number
*
* Units should be registered by camera implementations using
* uca_camera_register_unit() and can be queried by client programs with
diff --git a/src/uca-camera.h b/src/uca-camera.h
index 4aad0b4..d84b5f2 100644
--- a/src/uca-camera.h
+++ b/src/uca-camera.h
@@ -54,6 +54,7 @@ typedef enum {
UCA_UNIT_METER,
UCA_UNIT_SECOND,
UCA_UNIT_PIXEL,
+ UCA_UNIT_DEGREE_CELSIUS,
UCA_UNIT_COUNT
} UcaUnit;
diff --git a/test/test-mock.c b/test/test-mock.c
index 08f24b8..85c1ba4 100644
--- a/test/test-mock.c
+++ b/test/test-mock.c
@@ -171,8 +171,12 @@ test_fps_property (Fixture *fixture, gconstpointer data)
static void
test_property_units (Fixture *fixture, gconstpointer data)
{
+ /* Default camera properties */
g_assert (uca_camera_get_unit (fixture->camera, "sensor-width") == UCA_UNIT_PIXEL);
g_assert (uca_camera_get_unit (fixture->camera, "name") == UCA_UNIT_NA);
+
+ /* Mock-specific properties */
+ g_assert (uca_camera_get_unit (fixture->camera, "frame-rate") == UCA_UNIT_COUNT);
}
static void