[aravis] fake: add basic PayloadSize definition.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] fake: add basic PayloadSize definition.
- Date: Mon, 10 May 2010 07:53:16 +0000 (UTC)
commit 9bff43241e63adcfbf1c76e68fb099de894fc78a
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sun May 9 17:57:34 2010 +0200
fake: add basic PayloadSize definition.
src/arv-fake-camera.xml | 11 +++++++++++
src/arvfakecamera.c | 11 +++++++++++
src/arvfakecamera.h | 7 +++++--
src/tests/fake.c | 3 +++
4 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/src/arv-fake-camera.xml b/src/arv-fake-camera.xml
index a4828c2..b589299 100644
--- a/src/arv-fake-camera.xml
+++ b/src/arv-fake-camera.xml
@@ -20,6 +20,7 @@
<Category Name="Root" NameSpace="Standard">
<pFeature>AcquisitionControl</pFeature>
<pFeature>FeatureControl</pFeature>
+ <pFeature>TransportLayerControl</pFeature>
</Category>
<Category Name="AcquisitionControl" NameSpace="Custom">
@@ -33,6 +34,10 @@
<pFeature>GainAuto</pFeature>
</Category>
+ <Category Name="TransportLayerControl" NameSpace="Standard">
+ <pFeature>PayloadSize</pFeature>
+ </Category>
+
<Command Name="AcquisitionStart" NameSpace="Standard">
<Description>Start acquisition.</Description>
<pValue>AcquisitionCommandRegister</pValue>
@@ -209,6 +214,12 @@
<Endianess>LittleEndian</Endianess>
</IntReg>
+ <IntSwissKnife Name="PayloadSize" NameSpace="Standard">
+ <pVariable Name="WIDTH">Width</pVariable>
+ <pVariable Name="HEIGHT">Width</pVariable>
+ <Formula>WIDTH * HEIGHT</Formula>
+ </IntSwissKnife>
+
<Port Name="Device" NameSpace="Standard">
</Port>
diff --git a/src/arvfakecamera.c b/src/arvfakecamera.c
index a3bccf2..b02f166 100644
--- a/src/arvfakecamera.c
+++ b/src/arvfakecamera.c
@@ -93,6 +93,17 @@ arv_fake_camera_write_register (ArvFakeCamera *camera, guint32 address, guint32
}
void
+arv_fake_camera_fill_buffer (ArvFakeCamera *camera, ArvBuffer *buffer)
+{
+}
+
+guint32
+arv_fake_camera_get_frame_period (ArvFakeCamera *camera)
+{
+ return 0;
+}
+
+void
arv_set_fake_camera_genicam_filename (const char *filename)
{
arv_fake_camera_genicam_filename = filename;
diff --git a/src/arvfakecamera.h b/src/arvfakecamera.h
index cc324e3..239da52 100644
--- a/src/arvfakecamera.h
+++ b/src/arvfakecamera.h
@@ -69,8 +69,11 @@ gboolean arv_fake_camera_write_memory (ArvFakeCamera *camera, guint32 address, g
gboolean arv_fake_camera_read_register (ArvFakeCamera *camera, guint32 address, guint32 *value);
gboolean arv_fake_camera_write_register (ArvFakeCamera *camera, guint32 address, guint32 value);
-void arv_set_fake_camera_genicam_filename (const char *filename);
-const char * arv_get_fake_camera_genicam_data (size_t *size);
+void arv_fake_camera_fill_buffer (ArvFakeCamera *camera, ArvBuffer *buffer);
+guint32 arv_fake_camera_get_frame_period (ArvFakeCamera *camera);
+
+void arv_set_fake_camera_genicam_filename (const char *filename);
+const char * arv_get_fake_camera_genicam_data (size_t *size);
G_END_DECLS
diff --git a/src/tests/fake.c b/src/tests/fake.c
index daf1a22..bbb7ef7 100644
--- a/src/tests/fake.c
+++ b/src/tests/fake.c
@@ -44,6 +44,9 @@ fake_device_test (void)
value = arv_gc_integer_get_value (ARV_GC_INTEGER (arv_gc_get_node (genicam, "Height")));
g_assert_cmpint (value, ==, 1024);
+ value = arv_gc_integer_get_value (ARV_GC_INTEGER (arv_gc_get_node (genicam, "PayloadSize")));
+ g_assert_cmpint (value, ==, 1024 * 1024);
+
value = arv_gc_integer_get_value (ARV_GC_INTEGER (arv_gc_get_node (genicam, "BinningHorizontal")));
g_assert_cmpint (value, ==, 1);
value = arv_gc_integer_get_value (ARV_GC_INTEGER (arv_gc_get_node (genicam, "BinningVertical")));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]