[aravis] fake_camera: add a test register for debug.



commit 6935ae26eb4ac14a39736a87e5602ff8590963c4
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Thu May 12 15:28:48 2011 +0200

    fake_camera: add a test register for debug.

 docs/reference/aravis/aravis-sections.txt |    2 ++
 src/arv-fake-camera.xml                   |   18 ++++++++++++++++++
 src/arvfakecamera.c                       |    3 +++
 src/arvfakecamera.h                       |    2 ++
 4 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/aravis/aravis-sections.txt b/docs/reference/aravis/aravis-sections.txt
index 0bdaceb..ac3820e 100644
--- a/docs/reference/aravis/aravis-sections.txt
+++ b/docs/reference/aravis/aravis-sections.txt
@@ -603,6 +603,8 @@ ARV_FAKE_CAMERA_ACQUISITION_FRAME_RATE_DEFAULT
 ARV_FAKE_CAMERA_EXPOSURE_TIME_US_DEFAULT
 ARV_FAKE_CAMERA_REGISTER_GAIN_RAW
 ARV_FAKE_CAMERA_REGISTER_GAIN_MODE
+ARV_FAKE_CAMERA_REGISTER_TEST
+ARV_FAKE_CAMERA_TEST_REGISTER_DEFAULT
 ArvFakeCameraClass
 ArvFakeCameraPrivate
 ArvFakeCameraFillPattern
diff --git a/src/arv-fake-camera.xml b/src/arv-fake-camera.xml
index 8c65ac2..2a85e87 100644
--- a/src/arv-fake-camera.xml
+++ b/src/arv-fake-camera.xml
@@ -22,6 +22,7 @@
 		<pFeature>ImageFormatControl</pFeature>
 		<pFeature>AcquisitionControl</pFeature>
 		<pFeature>TransportLayerControl</pFeature>
+		<pFeature>Debug</pFeature>
 	</Category>
 
 	<!-- Device control -->
@@ -332,6 +333,7 @@
 		<Length>4</Length>
 		<AccessMode>RW</AccessMode>
 		<pPort>Device</pPort>
+		<Sign>Unsigned</Sign>
 		<Endianess>LittleEndian</Endianess>
 	</IntReg>
 
@@ -349,6 +351,7 @@
 		<Length>4</Length>
 		<AccessMode>RW</AccessMode>
 		<pPort>Device</pPort>
+		<Sign>Unsigned</Sign>
 		<Endianess>LittleEndian</Endianess>
 	</IntReg>
 
@@ -366,6 +369,7 @@
 		<Length>4</Length>
 		<AccessMode>RW</AccessMode>
 		<pPort>Device</pPort>
+		<Sign>Unsigned</Sign>
 		<Endianess>LittleEndian</Endianess>
 	</IntReg>
 
@@ -452,4 +456,18 @@
 	<Port Name="Device" NameSpace="Standard">
 	</Port>
 
+	<Category Name="Debug" NameSpace="Standard">
+		<pFeature>TestRegister</pFeature>
+	</Category>
+
+	<IntReg Name="TestRegister" NameSpace="Custom">
+		<Address>0x1f0</Address>
+		<Length>4</Length>
+		<AccessMode>RW</AccessMode>
+		<pPort>Device</pPort>
+		<Sign>Unsigned</Sign>
+		<Endianess>LittleEndian</Endianess>
+	</IntReg>
+
 </RegisterDescription>
+
diff --git a/src/arvfakecamera.c b/src/arvfakecamera.c
index 3798536..a4ac454 100644
--- a/src/arvfakecamera.c
+++ b/src/arvfakecamera.c
@@ -463,6 +463,9 @@ arv_fake_camera_new (const char *serial_number)
 	arv_fake_camera_write_register (fake_camera, ARV_GVBS_TIMESTAMP_TICK_FREQUENCY_LOW_OFFSET, 1000000000);
 	arv_fake_camera_write_register (fake_camera, ARV_GVBS_CONTROL_CHANNEL_PRIVILEGE_OFFSET, 0);
 
+	arv_fake_camera_write_register (fake_camera, ARV_FAKE_CAMERA_REGISTER_TEST,
+					ARV_FAKE_CAMERA_TEST_REGISTER_DEFAULT);
+
 	return fake_camera;
 }
 
diff --git a/src/arvfakecamera.h b/src/arvfakecamera.h
index 3707180..35b6738 100644
--- a/src/arvfakecamera.h
+++ b/src/arvfakecamera.h
@@ -47,6 +47,7 @@ typedef void (*ArvFakeCameraFillPattern) (ArvBuffer *buffer, void *fill_pattern_
 #define ARV_FAKE_CAMERA_REGISTER_BINNING_HORIZONTAL	0x108
 #define ARV_FAKE_CAMERA_REGISTER_BINNING_VERTICAL	0x10c
 #define ARV_FAKE_CAMERA_REGISTER_PIXEL_FORMAT		0x128
+#define ARV_FAKE_CAMERA_REGISTER_TEST			0x1f0
 
 #define ARV_FAKE_CAMERA_SENSOR_WIDTH			2048
 #define ARV_FAKE_CAMERA_SENSOR_HEIGHT			2048
@@ -55,6 +56,7 @@ typedef void (*ArvFakeCameraFillPattern) (ArvBuffer *buffer, void *fill_pattern_
 #define ARV_FAKE_CAMERA_BINNING_HORIZONTAL_DEFAULT	1
 #define ARV_FAKE_CAMERA_BINNING_VERTICAL_DEFAULT	1
 #define ARV_FAKE_CAMERA_PIXEL_FORMAT_DEFAULT		ARV_PIXEL_FORMAT_MONO_8
+#define ARV_FAKE_CAMERA_TEST_REGISTER_DEFAULT		0x12345678
 
 /* Acquisition control */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]