Browse Source

dome *doc* on the new variant behaviour

Stasik0 10 years ago
parent
commit
87441d99a4
1 changed files with 8 additions and 0 deletions
  1. 8 0
      include/ua_types.h

+ 8 - 0
include/ua_types.h

@@ -407,6 +407,14 @@ UA_StatusCode UA_EXPORT UA_LocalizedText_copycstring(char const *src, UA_Localiz
 
 /* Variant */
 
+/**
+ * Variant semantics:
+ *  - arrayLength = -1 && dataPtr == NULL: empty variant
+ *  - arrayLength = -1 && dataPtr == !NULL: variant holds a single element (a scalar)
+ *  - arrayLength >= 0: variant holds an array of the appropriate length
+ *                    : dataPtr can be NULL if arrayLength == 0
+ */
+
 /**
  * Copy the variant, but use only a subset of the (multidimensional) array. Returns an error code if
  * the variant is no array or if the indicated range does not fit.