while testing some base-functionallity, I'm trying to write some values to a sub array, but allways get the error "BadIndexRangeNoData".
UA_UInt32 arrayDims[2] = {2,2};
UA_Double zero[4] = {0.0, 0.0, 0.0, 0.0};Writing complete array using "UA_Client_Service_write" is correctly executed - no problem.
UA_UInt32 nodeValueDimension[1] = {2};
UA_Double myValue[2] = {99.0, 100.0 };
UA_Variant myVariantValue;
UA_Variant_init(&myVariantValue);
retval = UA_Variant_setArrayCopy(&myVariantValue, &myValue, 2, &UA_TYPES[UA_TYPES_DOUBLE]);
UA_WriteValue wValue;
UA_WriteValue_init(&wValue);
wValue.nodeId = UA_NODEID_STRING(1, (char*)"the.matrix"); // node to write to
wValue.attributeId = UA_ATTRIBUTEID_VALUE;
wValue.value.value = myVariantValue;
wValue.value.hasValue = true;
wValue.indexRange = UA_STRING((char*)"1");
UA_WriteRequest wReq;
UA_WriteRequest_init(&wReq);
wReq.nodesToWrite = &wValue;
wReq.nodesToWriteSize = 1;
UA_WriteResponse wResponse = UA_Client_Service_write(client, wReq);
retval = *wResponse.results;