[aravis/error] device: error handling.



commit a6adaaac808465067a24d70fc8497d42b1dd9084
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Wed May 9 14:57:33 2012 +0200

    device: error handling.

 docs/reference/aravis/aravis-sections.txt |    7 +-
 src/arvdevice.c                           |  289 +++++++++++++++++++++++++----
 src/arvdevice.h                           |   15 ++-
 src/arvgcfeaturenode.c                    |    6 +-
 src/arvgcregisternode.c                   |    1 +
 src/arvtool.c                             |   31 ++--
 tests/arvgenicamtest.c                    |    8 +-
 tests/arvheartbeattest.c                  |    4 +-
 tests/arvtest.c                           |   64 ++++----
 tests/fake.c                              |   42 ++--
 tests/genicam.c                           |   70 ++++----
 11 files changed, 384 insertions(+), 153 deletions(-)
---
diff --git a/docs/reference/aravis/aravis-sections.txt b/docs/reference/aravis/aravis-sections.txt
index 38cf73a..73130c5 100644
--- a/docs/reference/aravis/aravis-sections.txt
+++ b/docs/reference/aravis/aravis-sections.txt
@@ -206,6 +206,7 @@ ArvGcPortClass
 <FILE>arvdevice</FILE>
 <TITLE>ArvDevice</TITLE>
 ArvDevice
+ArvDeviceStatus
 arv_device_create_stream
 arv_device_read_memory
 arv_device_write_memory
@@ -213,8 +214,10 @@ arv_device_read_register
 arv_device_write_register
 arv_device_get_genicam_xml
 arv_device_get_genicam
-arv_device_execute_command
 arv_device_get_feature
+arv_device_emit_control_lost_signal
+arv_device_get_status
+arv_device_execute_command
 arv_device_set_string_feature_value
 arv_device_get_string_feature_value
 arv_device_set_integer_feature_value
@@ -223,7 +226,7 @@ arv_device_get_integer_feature_bounds
 arv_device_set_float_feature_value
 arv_device_get_float_feature_value
 arv_device_get_float_feature_bounds
-arv_device_emit_control_lost_signal
+arv_device_get_enumeration_feature_available_values
 <SUBSECTION Standard>
 ARV_DEVICE
 ARV_IS_DEVICE
diff --git a/src/arvdevice.c b/src/arvdevice.c
index e418f9c..93bc665 100644
--- a/src/arvdevice.c
+++ b/src/arvdevice.c
@@ -38,6 +38,7 @@
 #include <arvgcenumeration.h>
 #include <arvgcstring.h>
 #include <arvstream.h>
+#include <arvdebug.h>
 
 enum {
 	ARV_DEVICE_SIGNAL_CONTROL_LOST,
@@ -146,24 +147,10 @@ arv_device_get_genicam_xml (ArvDevice *device, size_t *size)
 	return ARV_DEVICE_GET_CLASS (device)->get_genicam_xml (device, size);
 }
 
-void
-arv_device_execute_command (ArvDevice *device, const char *feature)
-{
-	ArvGc *genicam;
-	ArvGcNode *node;
-
-	genicam = arv_device_get_genicam (device);
-	g_return_if_fail (ARV_IS_GC (genicam));
-
-	node = arv_gc_get_node (genicam, feature);
-	if (ARV_IS_GC_COMMAND (node))
-		arv_gc_command_execute (ARV_GC_COMMAND (node));
-}
-
 /**
  * arv_device_get_feature:
  * @device: a #ArvDevice
- * @feature: a feature name
+ * @feature: feature name
  *
  * Return value: (transfer none): the genicam node corresponding to the feature name, NULL if not found.
  */
@@ -179,119 +166,343 @@ arv_device_get_feature (ArvDevice *device, const char *feature)
 	return arv_gc_get_node (genicam, feature);
 }
 
+static void
+_set_status (ArvDevice *device, ArvDeviceStatus status, const char *message)
+{
+	if (device->status == ARV_DEVICE_STATUS_SUCCESS)
+		return;
+
+	arv_warning_device ("[ArvDevice::set_status] Status changed ('%s')", message);
+
+	g_free (device->status_message);
+	device->status = status;
+	device->status_message = g_strdup (message);
+}
+
+/**
+ * arv_device_execute_command:
+ * @device: a #ArvDevice
+ * @feature: feature name
+ *
+ * Execute a genicam command. If an error occur, this function change the device status.
+ */
+
+void
+arv_device_execute_command (ArvDevice *device, const char *feature)
+{
+	ArvGcNode *node;
+
+	g_return_if_fail (ARV_IS_DEVICE (device));
+
+	node = arv_device_get_feature (device, feature);
+
+	if (ARV_IS_GC_COMMAND (node)) {
+		GError *error = NULL;
+		
+		arv_gc_command_execute (ARV_GC_COMMAND (node), &error);
+
+		if (error != NULL) {
+			_set_status (device, error->code, error->message);
+			g_error_free (error);
+		}
+	} else
+		arv_warning_device ("[ArvDevice::execute_command] Node '%s' is not a command",
+				    feature);
+}
+
 void
 arv_device_set_string_feature_value (ArvDevice *device, const char *feature, const char *value)
 {
 	ArvGcNode *node;
+	GError *error = NULL;
+
+	g_return_if_fail (ARV_IS_DEVICE (device));
 
 	node = arv_device_get_feature (device, feature);
 
 	if (ARV_IS_GC_ENUMERATION (node))
-		arv_gc_enumeration_set_string_value (ARV_GC_ENUMERATION (node), value);
+		arv_gc_enumeration_set_string_value (ARV_GC_ENUMERATION (node), value, &error);
 	else if (ARV_IS_GC_STRING (node))
-		arv_gc_string_set_value (ARV_GC_STRING (node), value);
+		arv_gc_string_set_value (ARV_GC_STRING (node), value, &error);
+	else
+		arv_warning_device ("[ArvDevice::set_string_feature_value] Node '%s' is not a string",
+				    feature);
+
+	if (error != NULL) {
+		_set_status (device, error->code, error->message);
+		g_error_free (error);
+	}
 }
 
 const char *
 arv_device_get_string_feature_value (ArvDevice *device, const char *feature)
 {
 	ArvGcNode *node;
+	GError *error = NULL;
+	const char *string = NULL;
+
+	g_return_val_if_fail (ARV_IS_DEVICE (device), NULL);
 
 	node = arv_device_get_feature (device, feature);
 
 	if (ARV_IS_GC_ENUMERATION (node))
-		return arv_gc_enumeration_get_string_value (ARV_GC_ENUMERATION (node));
+		string = arv_gc_enumeration_get_string_value (ARV_GC_ENUMERATION (node), &error);
 	else if (ARV_IS_GC_STRING (node))
-		return arv_gc_string_get_value (ARV_GC_STRING (node));
+		string = arv_gc_string_get_value (ARV_GC_STRING (node), &error);
+	else {
+		arv_warning_device ("[ArvDevice::get_string_feature_value] Node '%s' is not a string",
+				    feature);
+	}
 
-	return NULL;
+	if (error != NULL) {
+		_set_status (device, error->code, error->message);
+		g_error_free (error);
+		return NULL;
+	}
+
+	return string;
 }
 
 void
 arv_device_set_integer_feature_value (ArvDevice *device, const char *feature, gint64 value)
 {
 	ArvGcNode *node;
+	GError *error = NULL;
+
+	g_return_if_fail (ARV_IS_DEVICE (device));
 
 	node = arv_device_get_feature (device, feature);
 
 	if (ARV_IS_GC_INTEGER (node))
-		arv_gc_integer_set_value (ARV_GC_INTEGER (node), value);
+		arv_gc_integer_set_value (ARV_GC_INTEGER (node), value, &error);
 	else if (ARV_IS_GC_ENUMERATION (node))
-		arv_gc_enumeration_set_int_value (ARV_GC_ENUMERATION (node), value);
+		arv_gc_enumeration_set_int_value (ARV_GC_ENUMERATION (node), value, &error);
 	else if (ARV_IS_GC_BOOLEAN (node))
-		arv_gc_boolean_set_value (ARV_GC_BOOLEAN (node), value);
+		arv_gc_boolean_set_value (ARV_GC_BOOLEAN (node), value, &error);
+	else
+		arv_warning_device ("[ArvDevice::set_integer_feature_value] Node '%s' is not an integer",
+				    feature);
+
+	if (error != NULL) {
+		_set_status (device, error->code, error->message);
+		g_error_free (error);
+	}
 }
 
 gint64
 arv_device_get_integer_feature_value (ArvDevice *device, const char *feature)
 {
 	ArvGcNode *node;
+	GError *error = NULL;
+	gint64 value = 0;
+
+	g_return_val_if_fail (ARV_IS_DEVICE (device), 0);
 
 	node = arv_device_get_feature (device, feature);
 
 	if (ARV_IS_GC_INTEGER (node))
-		return arv_gc_integer_get_value (ARV_GC_INTEGER (node));
+		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node), &error);
 	else if (ARV_IS_GC_ENUMERATION (node))
-		return arv_gc_enumeration_get_int_value (ARV_GC_ENUMERATION (node));
+		value = arv_gc_enumeration_get_int_value (ARV_GC_ENUMERATION (node), &error);
 	else if (ARV_IS_GC_BOOLEAN (node))
-		return arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node));
+		value = arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node), &error);
+	else
+		arv_warning_device ("[ArvDevice::get_integer_feature_value] Node '%s' is not an integer",
+				    feature);
+
+	if (error != NULL) {
+		_set_status (device, error->code, error->message);
+		g_error_free (error);
+		return 0;
+	}
 
-	return 0;
+	return value;
 }
 
 void
 arv_device_get_integer_feature_bounds (ArvDevice *device, const char *feature, gint64 *min, gint64 *max)
 {
 	ArvGcNode *node;
+	GError *error = NULL;
+
+	if (min != NULL)
+		*min = -G_MAXINT64;
+	if (max != NULL)
+		*max = G_MAXINT64;
+
+	g_return_if_fail (ARV_IS_DEVICE (device));
 
 	node = arv_device_get_feature (device, feature);
 
 	if (ARV_IS_GC_INTEGER (node)) {
+		gint64 minimum;
+		gint64 maximum;
+
+		minimum = arv_gc_integer_get_min (ARV_GC_INTEGER (node), &error);
+
+		if (error != NULL) {
+			_set_status (device, error->code, error->message);
+			g_error_free (error);
+
+			return;
+		}
+
+		maximum = arv_gc_integer_get_max (ARV_GC_INTEGER (node), &error);
+
+		if (error != NULL) {
+			_set_status (device, error->code, error->message);
+			g_error_free (error);
+
+			return;
+		}
+
 		if (min != NULL)
-			*min = arv_gc_integer_get_min (ARV_GC_INTEGER (node));
+			*min = minimum;
 		if (max != NULL)
-			*max = arv_gc_integer_get_max (ARV_GC_INTEGER (node));
-		return;
-	}
+			*max = maximum;
+	} else
+		arv_warning_device ("[ArvDevice::get_integer_feature_bounds] Node '%s' is not an integer",
+				    feature);
 }
 
 void
 arv_device_set_float_feature_value (ArvDevice *device, const char *feature, double value)
 {
 	ArvGcNode *node;
+	GError *error = NULL;
+
+	g_return_if_fail (ARV_IS_DEVICE (device));
 
 	node = arv_device_get_feature (device, feature);
 
 	if (ARV_IS_GC_FLOAT (node))
-		arv_gc_float_set_value (ARV_GC_FLOAT (node), value);
+		arv_gc_float_set_value (ARV_GC_FLOAT (node), value, &error);
+	else 
+		arv_warning_device ("[ArvDevice::set_float_feature_value] Node '%s' is not a float",
+				    feature);
+
+	if (error != NULL) {
+		_set_status (device, error->code, error->message);
+		g_error_free (error);
+	}
 }
 
 double
 arv_device_get_float_feature_value (ArvDevice *device, const char *feature)
 {
 	ArvGcNode *node;
+	GError *error = NULL;
+	double value = 0.0;
+
+	g_return_val_if_fail (ARV_IS_DEVICE (device), 0.0);
 
 	node = arv_device_get_feature (device, feature);
 
 	if (ARV_IS_GC_FLOAT (node))
-		return arv_gc_float_get_value (ARV_GC_FLOAT (node));
+		value = arv_gc_float_get_value (ARV_GC_FLOAT (node), &error);
+	else 
+		arv_warning_device ("[ArvDevice::get_float_feature_value] Node '%s' is not a float",
+				    feature);
+
+	if (error != NULL) {
+		_set_status (device, error->code, error->message);
+		g_error_free (error);
+		return 0.0;
+	}
 
-	return 0.0;
+	return value;
 }
 
 void
 arv_device_get_float_feature_bounds (ArvDevice *device, const char *feature, double *min, double *max)
 {
 	ArvGcNode *node;
+	GError *error = NULL;
+
+	if (min != NULL)
+		*min = G_MINDOUBLE;
+	if (max != NULL)
+		*max = G_MAXDOUBLE;
+
+	g_return_if_fail (ARV_IS_DEVICE (device));
 
 	node = arv_device_get_feature (device, feature);
 
 	if (ARV_IS_GC_FLOAT (node)) {
+		double minimum;
+		double maximum;
+
+		minimum = arv_gc_float_get_min (ARV_GC_FLOAT (node), &error);
+
+		if (error != NULL) {
+			_set_status (device, error->code, error->message);
+			g_error_free (error);
+
+			return;
+		}
+
+		maximum = arv_gc_float_get_max (ARV_GC_FLOAT (node), &error);
+
+		if (error != NULL) {
+			_set_status (device, error->code, error->message);
+			g_error_free (error);
+
+			return;
+		}
+
 		if (min != NULL)
-			*min = arv_gc_float_get_min (ARV_GC_FLOAT (node));
+			*min = minimum;
 		if (max != NULL)
-			*max = arv_gc_float_get_max (ARV_GC_FLOAT (node));
+			*max = maximum;
+	} else
+		arv_warning_device ("[ArvDevice::get_float_feature_bounds] Node '%s' is not a float",
+				    feature);
+}
+
+gint64 *
+arv_device_get_enumeration_feature_available_values (ArvDevice *device, const char *feature, guint *n_values)
+{
+	ArvGcNode *node;
+	GError *error = NULL;
+	gint64 *values = NULL;
+
+	if (n_values != NULL)
+		*n_values = 0;
+
+	g_return_val_if_fail (ARV_IS_DEVICE (device), NULL);
+
+	node = arv_device_get_feature (device, feature);
+
+	if (ARV_IS_GC_ENUMERATION (node))
+		values = arv_gc_enumeration_get_available_int_values (ARV_GC_ENUMERATION (node), n_values, &error);
+	else
+		arv_warning_device ("[ArvDevice::get_enumeration_feature_available_values] Node '%s' is not an enumeration",
+				    feature);
+
+	if (error != NULL) {
+		_set_status (device, error->code, error->message);
+		g_error_free (error);
+
+		return NULL;
 	}
+
+	return values;
+}
+
+ArvDeviceStatus
+arv_device_get_status (ArvDevice *device)
+{
+	ArvDeviceStatus status;
+	
+	g_return_val_if_fail (ARV_IS_DEVICE (device), ARV_DEVICE_STATUS_UNKNOWN);
+
+	status = device->status;
+	
+	g_free (device->status_message);
+	device->status = ARV_DEVICE_STATUS_SUCCESS;
+	device->status_message = NULL;
+
+	return status;
 }
 
 void
@@ -305,11 +516,17 @@ arv_device_emit_control_lost_signal (ArvDevice *device)
 static void
 arv_device_init (ArvDevice *device)
 {
+	device->status = ARV_DEVICE_STATUS_SUCCESS;
+	device->status_message = NULL;
 }
 
 static void
 arv_device_finalize (GObject *object)
 {
+	ArvDevice *device = ARV_DEVICE (object);
+
+	g_free (device->status_message);
+
 	parent_class->finalize (object);
 }
 
diff --git a/src/arvdevice.h b/src/arvdevice.h
index 8cf9492..1e2eab4 100644
--- a/src/arvdevice.h
+++ b/src/arvdevice.h
@@ -30,13 +30,15 @@ G_BEGIN_DECLS
 
 /**
  * ArvDeviceStatus:
+ * @ARV_DEVICE_STATUS_UNKNOWN: unknown status
  * @ARV_DEVICE_STATUS_SUCCESS: no error has occured
  * @ARV_DEVICE_STATUS_TIMEOUT: action failed on a timeout
  * @ARV_DEVICE_STATUS_WRITE_ERROR: write on a read only node
  */
 
 typedef enum {
-	ARV_DEVICE_STATUS_SUCCESS,
+	ARV_DEVICE_STATUS_UNKNOWN = -1,
+	ARV_DEVICE_STATUS_SUCCESS =  0,
 	ARV_DEVICE_STATUS_TIMEOUT,
 	ARV_DEVICE_STATUS_WRITE_ERROR
 } ArvDeviceStatus;
@@ -52,6 +54,9 @@ typedef struct _ArvDeviceClass ArvDeviceClass;
 
 struct _ArvDevice {
 	GObject	object;
+
+	ArvDeviceStatus status;
+	char *status_message;
 };
 
 struct _ArvDeviceClass {
@@ -84,10 +89,14 @@ gboolean	arv_device_write_register 	(ArvDevice *device, guint32 address, guint32
 const char * 	arv_device_get_genicam_xml 		(ArvDevice *device, size_t *size);
 ArvGc *		arv_device_get_genicam			(ArvDevice *device);
 
-void 		arv_device_execute_command 		(ArvDevice *device, const char *feature);
+void 		arv_device_emit_control_lost_signal 	(ArvDevice *device);
 
 ArvGcNode *	arv_device_get_feature			(ArvDevice *device, const char *feature);
 
+/* This functions may change the device status */
+
+void 		arv_device_execute_command 		(ArvDevice *device, const char *feature);
+
 void		arv_device_set_string_feature_value	(ArvDevice *device, const char *feature, const char *value);
 const char *	arv_device_get_string_feature_value	(ArvDevice *device, const char *feature);
 
@@ -103,7 +112,7 @@ void 		arv_device_get_float_feature_bounds 	(ArvDevice *device, const char *feat
 
 gint64 *	arv_device_get_enumeration_feature_available_values	(ArvDevice *device, const char *feature, guint *n_values);
 
-void 		arv_device_emit_control_lost_signal 	(ArvDevice *device);
+ArvDeviceStatus arv_device_get_status			(ArvDevice *device);
 
 G_END_DECLS
 
diff --git a/src/arvgcfeaturenode.c b/src/arvgcfeaturenode.c
index 9417d73..ecedb0c 100644
--- a/src/arvgcfeaturenode.c
+++ b/src/arvgcfeaturenode.c
@@ -263,7 +263,7 @@ arv_gc_feature_node_is_implemented (ArvGcFeatureNode *gc_feature_node, GError **
 
 	value = arv_gc_property_node_get_int64 (gc_feature_node->priv->is_implemented, &local_error) != 0;
 
-	if (local_error == NULL) {
+	if (local_error != NULL) {
 		g_propagate_error (error, local_error);
 		return FALSE;
 	}
@@ -285,7 +285,7 @@ arv_gc_feature_node_is_available (ArvGcFeatureNode *gc_feature_node, GError **er
 
 	value = arv_gc_property_node_get_int64 (gc_feature_node->priv->is_available, &local_error) != 0;
 
-	if (local_error == NULL) {
+	if (local_error != NULL) {
 		g_propagate_error (error, local_error);
 		return FALSE;
 	}
@@ -306,7 +306,7 @@ arv_gc_feature_node_is_locked (ArvGcFeatureNode *gc_feature_node, GError **error
 
 	value = arv_gc_property_node_get_int64 (gc_feature_node->priv->is_locked, &local_error) != 0;
 
-	if (local_error == NULL) {
+	if (local_error != NULL) {
 		g_propagate_error (error, local_error);
 		return FALSE;
 	}
diff --git a/src/arvgcregisternode.c b/src/arvgcregisternode.c
index 4b9402e..83b19e6 100644
--- a/src/arvgcregisternode.c
+++ b/src/arvgcregisternode.c
@@ -307,6 +307,7 @@ _update_cache_size (ArvGcRegisterNode *gc_register_node, GError **error)
 	gint64 length;
 
 	length = _get_length (gc_register_node, &local_error);
+
 	if (local_error != NULL) {
 		g_propagate_error (error, local_error);
 		return;
diff --git a/src/arvtool.c b/src/arvtool.c
index 757622d..e816c09 100644
--- a/src/arvtool.c
+++ b/src/arvtool.c
@@ -10,7 +10,7 @@ arv_tool_list_features (ArvGc *genicam, const char *feature, gboolean show_descr
 
 	node = arv_gc_get_node (genicam, feature);
 	if (ARV_IS_GC_FEATURE_NODE (node) &&
-	    arv_gc_feature_node_is_implemented (ARV_GC_FEATURE_NODE (node))) {
+	    arv_gc_feature_node_is_implemented (ARV_GC_FEATURE_NODE (node), NULL)) {
 		int i;
 
 		for (i = 0; i < level; i++)
@@ -19,12 +19,12 @@ arv_tool_list_features (ArvGc *genicam, const char *feature, gboolean show_descr
 		printf ("%s: '%s'%s\n",
 			arv_dom_node_get_node_name (ARV_DOM_NODE (node)),
 			feature,
-			arv_gc_feature_node_is_available (ARV_GC_FEATURE_NODE (node)) ? "" : " (Not available)");
+			arv_gc_feature_node_is_available (ARV_GC_FEATURE_NODE (node), NULL) ? "" : " (Not available)");
 
 		if (show_description) {
 			const char *description;
 
-			description = arv_gc_feature_node_get_description (ARV_GC_FEATURE_NODE (node));
+			description = arv_gc_feature_node_get_description (ARV_GC_FEATURE_NODE (node), NULL);
 			if (description)
 				printf ("%s\n", description);
 		}
@@ -43,14 +43,14 @@ arv_tool_list_features (ArvGc *genicam, const char *feature, gboolean show_descr
 
 			childs = arv_gc_enumeration_get_entries (ARV_GC_ENUMERATION (node));
 			for (iter = childs; iter != NULL; iter = iter->next) {
-				if (arv_gc_feature_node_is_implemented (iter->data)) {
+				if (arv_gc_feature_node_is_implemented (iter->data, NULL)) {
 					for (i = 0; i < level + 1; i++)
 						printf ("    ");
 
 					printf ("%s: '%s'%s\n",
 						arv_dom_node_get_node_name (iter->data),
 						arv_gc_feature_node_get_name (iter->data),
-						arv_gc_feature_node_is_available (iter->data) ? "" : " (Not available)");
+						arv_gc_feature_node_is_available (iter->data, NULL) ? "" : " (Not available)");
 				}
 			}
 		}
@@ -99,7 +99,7 @@ arv_tool_execute_command (int argc, char **argv, const char *device_name)
 
 					printf ("%s: '%s'\n", arv_dom_node_get_node_name (ARV_DOM_NODE (node)), argv[i]);
 
-					description = arv_gc_feature_node_get_description (ARV_GC_FEATURE_NODE (node));
+					description = arv_gc_feature_node_get_description (ARV_GC_FEATURE_NODE (node), NULL);
 					if (description)
 						printf ("%s\n", description);
 				}
@@ -136,29 +136,30 @@ arv_tool_execute_command (int argc, char **argv, const char *device_name)
 					printf ("Feature '%s' not found\n", tokens[0]);
 				else {
 					if (ARV_IS_GC_COMMAND (feature)) {
-						arv_gc_command_execute (ARV_GC_COMMAND (feature));
+						arv_gc_command_execute (ARV_GC_COMMAND (feature), NULL);
 						printf ("%s executed\n", tokens[0]);
 					} else {
 						if (tokens[1] != NULL)
 							arv_gc_feature_node_set_value_from_string (ARV_GC_FEATURE_NODE (feature),
-												   tokens[1]);
+												   tokens[1], NULL);
 
 						if (ARV_IS_GC_INTEGER (feature))
 							printf ("%s = %" G_GINT64_FORMAT
 								" (min:%" G_GINT64_FORMAT 
 								"-max:%" G_GINT64_FORMAT
 								")\n", tokens[0],
-								arv_gc_integer_get_value (ARV_GC_INTEGER (feature)),
-								arv_gc_integer_get_min (ARV_GC_INTEGER (feature)),
-								arv_gc_integer_get_max (ARV_GC_INTEGER (feature)));
+								arv_gc_integer_get_value (ARV_GC_INTEGER (feature), NULL),
+								arv_gc_integer_get_min (ARV_GC_INTEGER (feature), NULL),
+								arv_gc_integer_get_max (ARV_GC_INTEGER (feature), NULL));
 						else if (ARV_IS_GC_FLOAT (feature))
 							printf ("%s = %g (min:%g-max:%g)\n", tokens[0],
-								arv_gc_float_get_value (ARV_GC_FLOAT (feature)),
-								arv_gc_float_get_min (ARV_GC_FLOAT (feature)),
-								arv_gc_float_get_max (ARV_GC_FLOAT (feature)));
+								arv_gc_float_get_value (ARV_GC_FLOAT (feature), NULL),
+								arv_gc_float_get_min (ARV_GC_FLOAT (feature), NULL),
+								arv_gc_float_get_max (ARV_GC_FLOAT (feature), NULL));
 						else
 							printf ("%s = %s\n", tokens[0],
-								arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (feature)));
+								arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (feature),
+													 NULL));
 					}
 				}
 			g_strfreev (tokens);
diff --git a/tests/arvgenicamtest.c b/tests/arvgenicamtest.c
index c6d3895..fd404df 100644
--- a/tests/arvgenicamtest.c
+++ b/tests/arvgenicamtest.c
@@ -57,20 +57,20 @@ main (int argc, char **argv)
 			node = arv_gc_get_node (genicam, "RegAcquisitionCommand");
 			if (node != NULL) {
 				g_print ("RegAcquisitionCommand address = 0x%Lx - length = 0x%Lx\n",
-					 (unsigned long long) arv_gc_register_get_address (ARV_GC_REGISTER (node)),
-					 (unsigned long long) arv_gc_register_get_length (ARV_GC_REGISTER (node)));
+					 (unsigned long long) arv_gc_register_get_address (ARV_GC_REGISTER (node), NULL),
+					 (unsigned long long) arv_gc_register_get_length (ARV_GC_REGISTER (node), NULL));
 			}
 
 			node = arv_gc_get_node (genicam, "IntWidthIncrement");
 			if (node != NULL) {
 				g_print ("IntWidthIncrement value = %Ld\n",
-					 (long long) arv_gc_integer_get_value (ARV_GC_INTEGER (node)));
+					 (long long) arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL));
 			}
 
 			node = arv_gc_get_node (genicam, "WhitebalValueMin");
 			if (node != NULL) {
 				g_print ("WhitebalValueMin value = %g\n",
-					 arv_gc_float_get_value (ARV_GC_FLOAT (node)));
+					 arv_gc_float_get_value (ARV_GC_FLOAT (node), NULL));
 			}
 
 			g_free (xml);
diff --git a/tests/arvheartbeattest.c b/tests/arvheartbeattest.c
index cf15cbd..ede0f9c 100644
--- a/tests/arvheartbeattest.c
+++ b/tests/arvheartbeattest.c
@@ -126,9 +126,9 @@ int main(int argc, char *argv[])
 
 			    fprintf (stderr, "Setting %s from %s to %s\n",
 				     arv_option_feature_name,
-				     arv_gc_feature_node_get_value_as_string (feature),
+				     arv_gc_feature_node_get_value_as_string (feature, NULL),
 				     value);
-			    arv_gc_feature_node_set_value_from_string (feature, value);
+			    arv_gc_feature_node_set_value_from_string (feature, value, NULL);
 
 			    g_free (value);
 		    }
diff --git a/tests/arvtest.c b/tests/arvtest.c
index 7d22bde..8570caa 100644
--- a/tests/arvtest.c
+++ b/tests/arvtest.c
@@ -94,76 +94,76 @@ main (int argc, char **argv)
 
 		if (arv_option_width > 0) {
 			node = arv_gc_get_node (genicam, "Width");
-			arv_gc_integer_set_value (ARV_GC_INTEGER (node), arv_option_width);
+			arv_gc_integer_set_value (ARV_GC_INTEGER (node), arv_option_width, NULL);
 		}
 		if (arv_option_height > 0) {
 			node = arv_gc_get_node (genicam, "Height");
-			arv_gc_integer_set_value (ARV_GC_INTEGER (node), arv_option_height);
+			arv_gc_integer_set_value (ARV_GC_INTEGER (node), arv_option_height, NULL);
 		}
 		if (arv_option_horizontal_binning > 0) {
 			node = arv_gc_get_node (genicam, "BinningHorizontal");
-			arv_gc_integer_set_value (ARV_GC_INTEGER (node), arv_option_horizontal_binning);
+			arv_gc_integer_set_value (ARV_GC_INTEGER (node), arv_option_horizontal_binning, NULL);
 		}
 		if (arv_option_vertical_binning > 0) {
 			node = arv_gc_get_node (genicam, "BinningVertical");
-			arv_gc_integer_set_value (ARV_GC_INTEGER (node), arv_option_vertical_binning);
+			arv_gc_integer_set_value (ARV_GC_INTEGER (node), arv_option_vertical_binning, NULL);
 		}
 
 		node = arv_gc_get_node (genicam, "DeviceVendorName");
-		v_string = arv_gc_string_get_value (ARV_GC_STRING (node));
+		v_string = arv_gc_string_get_value (ARV_GC_STRING (node), NULL);
 		g_print ("vendor        = %s\n", v_string);
 		node = arv_gc_get_node (genicam, "DeviceModelName");
-		v_string = arv_gc_string_get_value (ARV_GC_STRING (node));
+		v_string = arv_gc_string_get_value (ARV_GC_STRING (node), NULL);
 		g_print ("model         = %s\n", v_string);
 		node = arv_gc_get_node (genicam, "DeviceID");
-		v_string = arv_gc_string_get_value (ARV_GC_STRING (node));
+		v_string = arv_gc_string_get_value (ARV_GC_STRING (node), NULL);
 		g_print ("device id     = %s\n", v_string);
 		node = arv_gc_get_node (genicam, "SensorWidth");
-		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
+		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
 		g_print ("sensor width  = %d\n", value);
 		node = arv_gc_get_node (genicam, "SensorHeight");
-		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
+		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
 		g_print ("sensor height = %d\n", value);
 		node = arv_gc_get_node (genicam, "Width");
-		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
-		maximum = arv_gc_integer_get_max (ARV_GC_INTEGER (node));
+		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
+		maximum = arv_gc_integer_get_max (ARV_GC_INTEGER (node), NULL);
 		g_print ("image width   = %d (max:%d)\n", value, maximum);
 		node = arv_gc_get_node (genicam, "Height");
-		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
-		maximum = arv_gc_integer_get_max (ARV_GC_INTEGER (node));
+		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
+		maximum = arv_gc_integer_get_max (ARV_GC_INTEGER (node), NULL);
 		g_print ("image height  = %d (max:%d)\n", value, maximum);
 		node = arv_gc_get_node (genicam, "BinningHorizontal");
-		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
-		maximum = arv_gc_integer_get_max (ARV_GC_INTEGER (node));
-		minimum = arv_gc_integer_get_min (ARV_GC_INTEGER (node));
+		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
+		maximum = arv_gc_integer_get_max (ARV_GC_INTEGER (node), NULL);
+		minimum = arv_gc_integer_get_min (ARV_GC_INTEGER (node), NULL);
 		g_print ("horizontal binning  = %d (min:%d - max:%d)\n", value, minimum, maximum);
 		node = arv_gc_get_node (genicam, "BinningVertical");
-		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
-		maximum = arv_gc_integer_get_max (ARV_GC_INTEGER (node));
-		minimum = arv_gc_integer_get_min (ARV_GC_INTEGER (node));
+		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
+		maximum = arv_gc_integer_get_max (ARV_GC_INTEGER (node), NULL);
+		minimum = arv_gc_integer_get_min (ARV_GC_INTEGER (node), NULL);
 		g_print ("vertical binning    = %d (min:%d - max:%d)\n", value, minimum, maximum);
 		node = arv_gc_get_node (genicam, "ExposureTimeAbs");
-		v_double = arv_gc_float_get_value (ARV_GC_FLOAT (node));
-		v_double_min = arv_gc_float_get_min (ARV_GC_FLOAT (node));
-		v_double_max = arv_gc_float_get_max (ARV_GC_FLOAT (node));
+		v_double = arv_gc_float_get_value (ARV_GC_FLOAT (node), NULL);
+		v_double_min = arv_gc_float_get_min (ARV_GC_FLOAT (node), NULL);
+		v_double_max = arv_gc_float_get_max (ARV_GC_FLOAT (node), NULL);
 		g_print ("exposure            = %g (min:%g - max:%g)\n", v_double, v_double_min, v_double_max);
 		node = arv_gc_get_node (genicam, "ExposureAuto");
-		v_string = arv_gc_enumeration_get_string_value (ARV_GC_ENUMERATION (node));
+		v_string = arv_gc_enumeration_get_string_value (ARV_GC_ENUMERATION (node), NULL);
 		g_print ("exposure auto mode  = %s\n", v_string);
 		node = arv_gc_get_node (genicam, "GainRaw");
-		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
-		maximum = arv_gc_integer_get_max (ARV_GC_INTEGER (node));
-		minimum = arv_gc_integer_get_min (ARV_GC_INTEGER (node));
+		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
+		maximum = arv_gc_integer_get_max (ARV_GC_INTEGER (node), NULL);
+		minimum = arv_gc_integer_get_min (ARV_GC_INTEGER (node), NULL);
 		g_print ("gain                = %d (min:%d - max:%d)\n", value, minimum, maximum);
 		node = arv_gc_get_node (genicam, "GainAuto");
-		v_string = arv_gc_enumeration_get_string_value (ARV_GC_ENUMERATION (node));
+		v_string = arv_gc_enumeration_get_string_value (ARV_GC_ENUMERATION (node), NULL);
 		g_print ("gain auto mode      = %s\n", v_string);
 		node = arv_gc_get_node (genicam, "TriggerSelector");
-		v_string = arv_gc_enumeration_get_string_value (ARV_GC_ENUMERATION (node));
+		v_string = arv_gc_enumeration_get_string_value (ARV_GC_ENUMERATION (node), NULL);
 		g_print ("trigger selector    = %s\n", v_string);
 		node = arv_gc_get_node (genicam, "ReverseX");
 		if (node != NULL) {
-			v_boolean = arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node));
+			v_boolean = arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node), NULL);
 			g_print ("reverse x          = %s\n", v_boolean ? "TRUE" : "FALSE");
 		}
 
@@ -175,7 +175,7 @@ main (int argc, char **argv)
 				      NULL);
 
 		node = arv_gc_get_node (genicam, "PayloadSize");
-		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
+		value = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
 		g_print ("payload size  = %d (0x%x)\n", value, value);
 
 		for (i = 0; i < 30; i++)
@@ -191,7 +191,7 @@ main (int argc, char **argv)
 					ARV_GVBS_USER_DEFINED_NAME_SIZE, memory_buffer);
 
 		node = arv_gc_get_node (genicam, "AcquisitionStart");
-		arv_gc_command_execute (ARV_GC_COMMAND (node));
+		arv_gc_command_execute (ARV_GC_COMMAND (node), NULL);
 
 		signal (SIGINT, set_cancel);
 
@@ -215,7 +215,7 @@ main (int argc, char **argv)
 		g_print ("Underruns         = %Lu\n", (unsigned long long) n_underruns);
 
 		node = arv_gc_get_node (genicam, "AcquisitionStop");
-		arv_gc_command_execute (ARV_GC_COMMAND (node));
+		arv_gc_command_execute (ARV_GC_COMMAND (node), NULL);
 
 		g_object_unref (stream);
 		g_object_unref (device);
diff --git a/tests/fake.c b/tests/fake.c
index 4865ec6..02a6c35 100644
--- a/tests/fake.c
+++ b/tests/fake.c
@@ -32,20 +32,20 @@ trigger_registers_test (void)
 	node = arv_gc_get_node (genicam, "TriggerModeRegister");
 	g_assert (ARV_IS_GC_NODE (node));
 
-	address = arv_gc_register_get_address (ARV_GC_REGISTER (node));
+	address = arv_gc_register_get_address (ARV_GC_REGISTER (node), NULL);
 	g_assert_cmpint (address, ==, ARV_FAKE_CAMERA_REGISTER_TRIGGER_MODE);
 
 	address = arv_gc_register_get_address (ARV_GC_REGISTER (arv_gc_get_node (genicam,
-										 "TriggerSourceRegister")));
+										 "TriggerSourceRegister")), NULL);
 	g_assert_cmpint (address, ==, ARV_FAKE_CAMERA_REGISTER_TRIGGER_SOURCE);
 
 	address = arv_gc_register_get_address (ARV_GC_REGISTER (arv_gc_get_node (genicam,
-										 "TriggerActivationRegister")));
+										 "TriggerActivationRegister")), NULL);
 	g_assert_cmpint (address, ==, ARV_FAKE_CAMERA_REGISTER_TRIGGER_ACTIVATION);
 
 	arv_device_set_string_feature_value (device, "TriggerSelector", "AcquisitionStart");
 
-	address = arv_gc_register_get_address (ARV_GC_REGISTER (node));
+	address = arv_gc_register_get_address (ARV_GC_REGISTER (node), NULL);
 	g_assert_cmpint (address, ==, ARV_FAKE_CAMERA_REGISTER_TRIGGER_MODE +
 			 ARV_FAKE_CAMERA_REGISTER_ACQUISITION_START_OFFSET);
 
@@ -73,11 +73,11 @@ registers_test (void)
 	node = arv_gc_get_node (genicam, "TestRegister");
 	g_assert (ARV_IS_GC_NODE (node));
 
-	address = arv_gc_register_get_address (ARV_GC_REGISTER (node));
+	address = arv_gc_register_get_address (ARV_GC_REGISTER (node), NULL);
 	g_assert_cmpint (address, ==, 0x1f0);
 
-	arv_gc_integer_set_value (ARV_GC_INTEGER (node), 0x12345678);
-	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
+	arv_gc_integer_set_value (ARV_GC_INTEGER (node), 0x12345678, NULL);
+	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
 	g_assert_cmpint (value, ==, 0x12345678);
 
 	node_a = arv_gc_get_node (genicam, "StructEntry_0_15");
@@ -87,41 +87,41 @@ registers_test (void)
 	node_c = arv_gc_get_node (genicam, "StructEntry_16");
 	g_assert (ARV_IS_GC_NODE (node_c));
 
-	value = arv_gc_register_get_address (ARV_GC_REGISTER (node_a));
+	value = arv_gc_register_get_address (ARV_GC_REGISTER (node_a), NULL);
 	g_assert_cmpint (value, ==, address);
-	value = arv_gc_register_get_address (ARV_GC_REGISTER (node_b));
+	value = arv_gc_register_get_address (ARV_GC_REGISTER (node_b), NULL);
 	g_assert_cmpint (value, ==, address);
-	value = arv_gc_register_get_address (ARV_GC_REGISTER (node_c));
+	value = arv_gc_register_get_address (ARV_GC_REGISTER (node_c), NULL);
 	g_assert_cmpint (value, ==, address);
 
-	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_a));
+	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_a), NULL);
 	g_assert_cmpint (value, ==, 0x5678);
 
-	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_b));
+	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_b), NULL);
 	g_assert_cmpint (value, ==, 0x1234);
 
-	arv_gc_integer_set_value (ARV_GC_INTEGER (node_b), 0x10101010);
+	arv_gc_integer_set_value (ARV_GC_INTEGER (node_b), 0x10101010, NULL);
 
-	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_a));
+	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_a), NULL);
 	g_assert_cmpint (value, ==, 0x5678);
 
-	arv_gc_integer_set_value (ARV_GC_INTEGER (node_a), 0xabcdefaa);
+	arv_gc_integer_set_value (ARV_GC_INTEGER (node_a), 0xabcdefaa, NULL);
 
-	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_a));
+	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_a), NULL);
 	g_assert_cmpint (value, ==, 0xefaa);
 
-	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_b));
+	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_b), NULL);
 	g_assert_cmpint (value, ==, 0x1010);
 
-	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_c));
+	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_c), NULL);
 	g_assert_cmpint (value, ==, 0x0);
 
-	arv_gc_integer_set_value (ARV_GC_INTEGER (node_c), 0xff);
+	arv_gc_integer_set_value (ARV_GC_INTEGER (node_c), 0xff, NULL);
 
-	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_c));
+	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_c), NULL);
 	g_assert_cmpint (value, ==, 0x1);
 
-	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_b));
+	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node_b), NULL);
 	g_assert_cmpint (value, ==, 0x1011);
 
 	g_object_unref (device);
diff --git a/tests/genicam.c b/tests/genicam.c
index ac6a51e..122698f 100644
--- a/tests/genicam.c
+++ b/tests/genicam.c
@@ -19,38 +19,38 @@ integer_test (void)
 	node = arv_gc_get_node (genicam, "RWInteger");
 	g_assert (ARV_IS_GC_INTEGER_NODE (node));
 
-	v_int64 = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
+	v_int64 = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
 	g_assert_cmpint (v_int64, ==, 1);
 
-	v_int64 = arv_gc_integer_get_min (ARV_GC_INTEGER (node));
+	v_int64 = arv_gc_integer_get_min (ARV_GC_INTEGER (node), NULL);
 	g_assert_cmpint (v_int64, ==, -10);
 
-	v_int64 = arv_gc_integer_get_max (ARV_GC_INTEGER (node));
+	v_int64 = arv_gc_integer_get_max (ARV_GC_INTEGER (node), NULL);
 	g_assert_cmpint (v_int64, ==, 10);
 
-	v_int64 = arv_gc_integer_get_inc (ARV_GC_INTEGER (node));
+	v_int64 = arv_gc_integer_get_inc (ARV_GC_INTEGER (node), NULL);
 	g_assert_cmpint (v_int64, ==, 2);
 
-	v_string = arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (node));
+	v_string = arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (node), NULL);
 	g_assert_cmpstr (v_string, ==, "1");
 
-	arv_gc_integer_set_value (ARV_GC_INTEGER (node), 2);
-	v_int64 = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
+	arv_gc_integer_set_value (ARV_GC_INTEGER (node), 2, NULL);
+	v_int64 = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
 	g_assert_cmpint (v_int64, ==, 2);
 
 	node = arv_gc_get_node (genicam, "P_RWInteger");
 	g_assert (ARV_IS_GC_INTEGER_NODE (node));
 
-	v_int64 = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
+	v_int64 = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
 	g_assert_cmpint (v_int64, ==, 2);
 
-	v_int64 = arv_gc_integer_get_min (ARV_GC_INTEGER (node));
+	v_int64 = arv_gc_integer_get_min (ARV_GC_INTEGER (node), NULL);
 	g_assert_cmpint (v_int64, ==, -20);
 
-	v_int64 = arv_gc_integer_get_max (ARV_GC_INTEGER (node));
+	v_int64 = arv_gc_integer_get_max (ARV_GC_INTEGER (node), NULL);
 	g_assert_cmpint (v_int64, ==, 20);
 
-	v_int64 = arv_gc_integer_get_inc (ARV_GC_INTEGER (node));
+	v_int64 = arv_gc_integer_get_inc (ARV_GC_INTEGER (node), NULL);
 	g_assert_cmpint (v_int64, ==, 3);
 
 	g_object_unref (device);
@@ -75,31 +75,31 @@ boolean_test (void)
 	node = arv_gc_get_node (genicam, "RWBoolean");
 	g_assert (ARV_IS_GC_BOOLEAN (node));
 
-	v_boolean = arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node));
+	v_boolean = arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node), NULL);
 	g_assert_cmpint (v_boolean, ==, TRUE);
 
-	v_string = arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (node));
+	v_string = arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (node), NULL);
 	g_assert_cmpstr (v_string, ==, "true");
 
-	arv_gc_boolean_set_value (ARV_GC_BOOLEAN (node), 0);
-	v_boolean = arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node));
+	arv_gc_boolean_set_value (ARV_GC_BOOLEAN (node), 0, NULL);
+	v_boolean = arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node), NULL);
 	g_assert_cmpint (v_boolean, ==, FALSE);
 
-	v_string = arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (node));
+	v_string = arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (node), NULL);
 	g_assert_cmpstr (v_string, ==, "false");
 
 	node = arv_gc_get_node (genicam, "P_RWBoolean");
 	g_assert (ARV_IS_GC_BOOLEAN (node));
 
-	v_boolean = arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node));
+	v_boolean = arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node), NULL);
 	g_assert_cmpint (v_boolean, ==, TRUE);
 
 	node_b = arv_gc_get_node (genicam, "RWBooleanValue");
 	g_assert (ARV_IS_GC_INTEGER (node_b));
 
-	arv_gc_integer_set_value (ARV_GC_INTEGER (node_b), 42);
+	arv_gc_integer_set_value (ARV_GC_INTEGER (node_b), 42, NULL);
 
-	v_boolean = arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node));
+	v_boolean = arv_gc_boolean_get_value (ARV_GC_BOOLEAN (node), NULL);
 	g_assert_cmpint (v_boolean, ==, FALSE);
 
 	g_object_unref (device);
@@ -123,38 +123,38 @@ float_test (void)
 	node = arv_gc_get_node (genicam, "RWFloat");
 	g_assert (ARV_IS_GC_FLOAT_NODE (node));
 
-	v_double = arv_gc_float_get_value (ARV_GC_FLOAT (node));
+	v_double = arv_gc_float_get_value (ARV_GC_FLOAT (node), NULL);
 	g_assert_cmpfloat (v_double, ==, 0.1);
 
-	v_double = arv_gc_float_get_min (ARV_GC_FLOAT (node));
+	v_double = arv_gc_float_get_min (ARV_GC_FLOAT (node), NULL);
 	g_assert_cmpfloat (v_double, ==, -10.0);
 
-	v_double = arv_gc_float_get_max (ARV_GC_FLOAT (node));
+	v_double = arv_gc_float_get_max (ARV_GC_FLOAT (node), NULL);
 	g_assert_cmpfloat (v_double, ==, 10.0);
 
-	v_double = arv_gc_float_get_inc (ARV_GC_FLOAT (node));
+	v_double = arv_gc_float_get_inc (ARV_GC_FLOAT (node), NULL);
 	g_assert_cmpfloat (v_double, ==, 2.0);
 
-	v_string = arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (node));
+	v_string = arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (node), NULL);
 	g_assert_cmpstr (v_string, ==, "0.1");
 
-	arv_gc_float_set_value (ARV_GC_FLOAT (node), 0.2);
-	v_double = arv_gc_float_get_value (ARV_GC_FLOAT (node));
+	arv_gc_float_set_value (ARV_GC_FLOAT (node), 0.2, NULL);
+	v_double = arv_gc_float_get_value (ARV_GC_FLOAT (node), NULL);
 	g_assert_cmpfloat (v_double, ==, 0.2);
 
 	node = arv_gc_get_node (genicam, "P_RWFloat");
 	g_assert (ARV_IS_GC_FLOAT_NODE (node));
 
-	v_double = arv_gc_float_get_value (ARV_GC_FLOAT (node));
+	v_double = arv_gc_float_get_value (ARV_GC_FLOAT (node), NULL);
 	g_assert_cmpfloat (v_double, ==, 0.2);
 
-	v_double = arv_gc_float_get_min (ARV_GC_FLOAT (node));
+	v_double = arv_gc_float_get_min (ARV_GC_FLOAT (node), NULL);
 	g_assert_cmpfloat (v_double, ==, -20.0);
 
-	v_double = arv_gc_float_get_max (ARV_GC_FLOAT (node));
+	v_double = arv_gc_float_get_max (ARV_GC_FLOAT (node), NULL);
 	g_assert_cmpfloat (v_double, ==, 20.0);
 
-	v_double = arv_gc_float_get_inc (ARV_GC_FLOAT (node));
+	v_double = arv_gc_float_get_inc (ARV_GC_FLOAT (node), NULL);
 	g_assert_cmpfloat (v_double, ==, 3.0);
 
 	g_object_unref (device);
@@ -179,10 +179,10 @@ enumeration_test (void)
 	node = arv_gc_get_node (genicam, "Enumeration");
 	g_assert (ARV_IS_GC_ENUMERATION (node));
 
-	v_int64 = arv_gc_enumeration_get_int_value (ARV_GC_ENUMERATION (node));
+	v_int64 = arv_gc_enumeration_get_int_value (ARV_GC_ENUMERATION (node), NULL);
 	g_assert_cmpint (v_int64, ==, 0);
 
-	values = arv_gc_enumeration_get_available_int_values (ARV_GC_ENUMERATION (node), &n_values);
+	values = arv_gc_enumeration_get_available_int_values (ARV_GC_ENUMERATION (node), &n_values, NULL);
 	g_assert_cmpint (n_values, ==, 2);
 	g_assert (values != NULL);
 
@@ -208,7 +208,7 @@ swiss_knife_test (void)
 	node = arv_gc_get_node (genicam, "IntSwissKnifeTest");
 	g_assert (ARV_IS_GC_SWISS_KNIFE (node));
 
-	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node));
+	value = arv_gc_integer_get_value (ARV_GC_INTEGER (node), NULL);
 	g_assert_cmpint (value, ==, 0x1234);
 
 	g_object_unref (device);
@@ -231,13 +231,13 @@ register_test (void)
 	node = arv_gc_get_node (genicam, "IntRegisterA");
 	g_assert (ARV_IS_GC_REGISTER (node));
 
-	value = arv_gc_register_get_address (ARV_GC_REGISTER (node));
+	value = arv_gc_register_get_address (ARV_GC_REGISTER (node), NULL);
 	g_assert_cmpint (value, ==, 0x1050);
 
 	node = arv_gc_get_node (genicam, "IntRegisterB");
 	g_assert (ARV_IS_GC_REGISTER (node));
 
-	value = arv_gc_register_get_address (ARV_GC_REGISTER (node));
+	value = arv_gc_register_get_address (ARV_GC_REGISTER (node), NULL);
 	g_assert_cmpint (value, ==, 0x20ff);
 
 	g_object_unref (device);



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