Explorar o código

dome *doc* on the new variant behaviour

Stasik0 %!s(int64=10) %!d(string=hai) anos
pai
achega
87441d99a4
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  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.