ua_services_attribute.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. #include "ua_server_internal.h"
  2. #include "ua_types_generated.h"
  3. #include "ua_services.h"
  4. #include "ua_statuscodes.h"
  5. #include "ua_nodestore.h"
  6. #include "ua_util.h"
  7. #include "stdio.h"
  8. #define CHECK_NODECLASS(CLASS) \
  9. if(!(node->nodeClass & (CLASS))) { \
  10. v->hasStatus = UA_TRUE; \
  11. v->status = UA_STATUSCODE_BADNOTREADABLE; \
  12. break; \
  13. }
  14. /** Reads a single attribute from a node in the nodestore. */
  15. static void readValue(UA_Server *server, const UA_ReadValueId *id, UA_DataValue *v) {
  16. UA_Node const *node = UA_NodeStore_get(server->nodestore, &(id->nodeId));
  17. if(!node) {
  18. v->hasStatus = UA_TRUE;
  19. v->status = UA_STATUSCODE_BADNODEIDUNKNOWN;
  20. return;
  21. }
  22. UA_StatusCode retval = UA_STATUSCODE_GOOD;
  23. switch(id->attributeId) {
  24. case UA_ATTRIBUTEID_NODEID:
  25. v->hasVariant = UA_TRUE;
  26. retval |= UA_Variant_copySetValue(&v->value, &node->nodeId, UA_TYPES_NODEID);
  27. break;
  28. case UA_ATTRIBUTEID_NODECLASS:
  29. v->hasVariant = UA_TRUE;
  30. retval |= UA_Variant_copySetValue(&v->value, &node->nodeClass, UA_TYPES_INT32);
  31. break;
  32. case UA_ATTRIBUTEID_BROWSENAME:
  33. v->hasVariant = UA_TRUE;
  34. retval |= UA_Variant_copySetValue(&v->value, &node->browseName, UA_TYPES_QUALIFIEDNAME);
  35. break;
  36. case UA_ATTRIBUTEID_DISPLAYNAME:
  37. retval |= UA_Variant_copySetValue(&v->value, &node->displayName, UA_TYPES_LOCALIZEDTEXT);
  38. if(retval == UA_STATUSCODE_GOOD)
  39. v->hasVariant = UA_TRUE;
  40. break;
  41. case UA_ATTRIBUTEID_DESCRIPTION:
  42. v->hasVariant = UA_TRUE;
  43. retval |= UA_Variant_copySetValue(&v->value, &node->description, UA_TYPES_LOCALIZEDTEXT);
  44. break;
  45. case UA_ATTRIBUTEID_WRITEMASK:
  46. v->hasVariant = UA_TRUE;
  47. retval |= UA_Variant_copySetValue(&v->value, &node->writeMask, UA_TYPES_UINT32);
  48. break;
  49. case UA_ATTRIBUTEID_USERWRITEMASK:
  50. v->hasVariant = UA_TRUE;
  51. retval |= UA_Variant_copySetValue(&v->value, &node->userWriteMask, UA_TYPES_UINT32);
  52. break;
  53. case UA_ATTRIBUTEID_ISABSTRACT:
  54. CHECK_NODECLASS(UA_NODECLASS_REFERENCETYPE | UA_NODECLASS_OBJECTTYPE | UA_NODECLASS_VARIABLETYPE |
  55. UA_NODECLASS_DATATYPE);
  56. v->hasVariant = UA_TRUE;
  57. retval |= UA_Variant_copySetValue(&v->value, &((const UA_ReferenceTypeNode *)node)->isAbstract,
  58. UA_TYPES_BOOLEAN);
  59. break;
  60. case UA_ATTRIBUTEID_SYMMETRIC:
  61. CHECK_NODECLASS(UA_NODECLASS_REFERENCETYPE);
  62. v->hasVariant = UA_TRUE;
  63. retval |= UA_Variant_copySetValue(&v->value, &((const UA_ReferenceTypeNode *)node)->symmetric,
  64. UA_TYPES_BOOLEAN);
  65. break;
  66. case UA_ATTRIBUTEID_INVERSENAME:
  67. CHECK_NODECLASS(UA_NODECLASS_REFERENCETYPE);
  68. v->hasVariant = UA_TRUE;
  69. retval |= UA_Variant_copySetValue(&v->value, &((const UA_ReferenceTypeNode *)node)->inverseName,
  70. UA_TYPES_LOCALIZEDTEXT);
  71. break;
  72. case UA_ATTRIBUTEID_CONTAINSNOLOOPS:
  73. CHECK_NODECLASS(UA_NODECLASS_VIEW);
  74. v->hasVariant = UA_TRUE;
  75. retval |= UA_Variant_copySetValue(&v->value, &((const UA_ViewNode *)node)->containsNoLoops,
  76. UA_TYPES_BOOLEAN);
  77. break;
  78. case UA_ATTRIBUTEID_EVENTNOTIFIER:
  79. CHECK_NODECLASS(UA_NODECLASS_VIEW | UA_NODECLASS_OBJECT);
  80. v->hasVariant = UA_TRUE;
  81. retval |= UA_Variant_copySetValue(&v->value, &((const UA_ViewNode *)node)->eventNotifier,
  82. UA_TYPES_BYTE);
  83. break;
  84. case UA_ATTRIBUTEID_VALUE:
  85. CHECK_NODECLASS(UA_NODECLASS_VARIABLE | UA_NODECLASS_VARIABLETYPE);
  86. {
  87. const UA_VariableNode *vn = (const UA_VariableNode*)node;
  88. if(vn->variableType == UA_VARIABLENODETYPE_VARIANT) {
  89. retval = UA_Variant_copy(&vn->variable.variant, &v->value);
  90. if(retval == UA_STATUSCODE_GOOD){
  91. v->hasVariant = UA_TRUE;
  92. v->hasServerTimestamp = UA_TRUE;
  93. v->serverTimestamp = UA_DateTime_now();
  94. }
  95. } else {
  96. UA_DataValue val;
  97. UA_DataValue_init(&val);
  98. retval |= vn->variable.dataSource.read(vn->variable.dataSource.handle, &val);
  99. if(retval != UA_STATUSCODE_GOOD)
  100. break;
  101. retval |= UA_DataValue_copy(&val, v);
  102. vn->variable.dataSource.release(vn->variable.dataSource.handle, &val);
  103. if(retval != UA_STATUSCODE_GOOD)
  104. break;
  105. v->hasServerTimestamp = UA_TRUE;
  106. v->serverTimestamp = UA_DateTime_now();
  107. }
  108. }
  109. break;
  110. case UA_ATTRIBUTEID_DATATYPE:
  111. CHECK_NODECLASS(UA_NODECLASS_VARIABLE | UA_NODECLASS_VARIABLETYPE);
  112. v->hasVariant = UA_TRUE;
  113. if(node->nodeClass == UA_NODECLASS_VARIABLETYPE)
  114. retval |= UA_Variant_copySetValue(&v->value,
  115. &((const UA_VariableTypeNode *)node)->value.type->typeId,
  116. UA_TYPES_NODEID);
  117. else {
  118. const UA_VariableNode *vn = (const UA_VariableNode*)node;
  119. if(vn->variableType == UA_VARIABLENODETYPE_VARIANT)
  120. retval |= UA_Variant_copySetValue(&v->value, &vn->variable.variant.type->typeId,
  121. UA_TYPES_NODEID);
  122. else {
  123. UA_DataValue val;
  124. UA_DataValue_init(&val);
  125. retval |= vn->variable.dataSource.read(vn->variable.dataSource.handle, &val);
  126. if(retval != UA_STATUSCODE_GOOD)
  127. break;
  128. retval |= UA_Variant_copySetValue(&v->value, &val.value.type->typeId, UA_TYPES_NODEID);
  129. vn->variable.dataSource.release(vn->variable.dataSource.handle, &val);
  130. if(retval != UA_STATUSCODE_GOOD)
  131. break;
  132. }
  133. }
  134. break;
  135. case UA_ATTRIBUTEID_VALUERANK:
  136. CHECK_NODECLASS(UA_NODECLASS_VARIABLE | UA_NODECLASS_VARIABLETYPE);
  137. v->hasVariant = UA_TRUE;
  138. retval |= UA_Variant_copySetValue(&v->value, &((const UA_VariableTypeNode *)node)->valueRank,
  139. UA_TYPES_INT32);
  140. break;
  141. case UA_ATTRIBUTEID_ARRAYDIMENSIONS:
  142. CHECK_NODECLASS(UA_NODECLASS_VARIABLE | UA_NODECLASS_VARIABLETYPE);
  143. {
  144. const UA_VariableNode *vn = (const UA_VariableNode *)node;
  145. if(vn->variableType == UA_VARIABLENODETYPE_VARIANT) {
  146. retval = UA_Variant_copySetArray(&v->value, vn->variable.variant.arrayDimensions,
  147. vn->variable.variant.arrayDimensionsSize, UA_TYPES_INT32);
  148. if(retval == UA_STATUSCODE_GOOD)
  149. v->hasVariant = UA_TRUE;
  150. } else {
  151. UA_DataValue val;
  152. UA_DataValue_init(&val);
  153. retval |= vn->variable.dataSource.read(vn->variable.dataSource.handle, &val);
  154. if(retval != UA_STATUSCODE_GOOD)
  155. break;
  156. if(!val.hasVariant) {
  157. vn->variable.dataSource.release(vn->variable.dataSource.handle, &val);
  158. retval = UA_STATUSCODE_BADNOTREADABLE;
  159. break;
  160. }
  161. retval = UA_Variant_copySetArray(&v->value, val.value.arrayDimensions,
  162. val.value.arrayDimensionsSize, UA_TYPES_INT32);
  163. vn->variable.dataSource.release(vn->variable.dataSource.handle, &val);
  164. }
  165. }
  166. break;
  167. case UA_ATTRIBUTEID_ACCESSLEVEL:
  168. CHECK_NODECLASS(UA_NODECLASS_VARIABLE);
  169. v->hasVariant = UA_TRUE;
  170. retval |= UA_Variant_copySetValue(&v->value, &((const UA_VariableNode *)node)->accessLevel,
  171. UA_TYPES_BYTE);
  172. break;
  173. case UA_ATTRIBUTEID_USERACCESSLEVEL:
  174. CHECK_NODECLASS(UA_NODECLASS_VARIABLE);
  175. v->hasVariant = UA_TRUE;
  176. retval |= UA_Variant_copySetValue(&v->value, &((const UA_VariableNode *)node)->userAccessLevel,
  177. UA_TYPES_BYTE);
  178. break;
  179. case UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL:
  180. CHECK_NODECLASS(UA_NODECLASS_VARIABLE);
  181. v->hasVariant = UA_TRUE;
  182. retval |= UA_Variant_copySetValue(&v->value, &((const UA_VariableNode *)node)->minimumSamplingInterval,
  183. UA_TYPES_DOUBLE);
  184. break;
  185. case UA_ATTRIBUTEID_HISTORIZING:
  186. CHECK_NODECLASS(UA_NODECLASS_VARIABLE);
  187. v->hasVariant = UA_TRUE;
  188. retval |= UA_Variant_copySetValue(&v->value, &((const UA_VariableNode *)node)->historizing,
  189. UA_TYPES_BOOLEAN);
  190. break;
  191. case UA_ATTRIBUTEID_EXECUTABLE:
  192. CHECK_NODECLASS(UA_NODECLASS_METHOD);
  193. v->hasVariant = UA_TRUE;
  194. retval |= UA_Variant_copySetValue(&v->value, &((const UA_MethodNode *)node)->executable,
  195. UA_TYPES_BOOLEAN);
  196. break;
  197. case UA_ATTRIBUTEID_USEREXECUTABLE:
  198. CHECK_NODECLASS(UA_NODECLASS_METHOD);
  199. v->hasVariant = UA_TRUE;
  200. retval |= UA_Variant_copySetValue(&v->value, &((const UA_MethodNode *)node)->userExecutable,
  201. UA_TYPES_BOOLEAN);
  202. break;
  203. default:
  204. v->hasStatus = UA_TRUE;
  205. v->status = UA_STATUSCODE_BADATTRIBUTEIDINVALID;
  206. break;
  207. }
  208. UA_NodeStore_release(node);
  209. if(v->hasVariant && v->value.type == UA_NULL) {
  210. printf("%i", id->attributeId);
  211. UA_assert(UA_FALSE);
  212. }
  213. if(retval != UA_STATUSCODE_GOOD) {
  214. v->hasStatus = UA_TRUE;
  215. v->status = UA_STATUSCODE_BADNOTREADABLE;
  216. }
  217. }
  218. void Service_Read(UA_Server *server, UA_Session *session, const UA_ReadRequest *request,
  219. UA_ReadResponse *response) {
  220. if(request->nodesToReadSize <= 0) {
  221. response->responseHeader.serviceResult = UA_STATUSCODE_BADNOTHINGTODO;
  222. return;
  223. }
  224. response->results = UA_Array_new(&UA_TYPES[UA_TYPES_DATAVALUE], request->nodesToReadSize);
  225. if(!response->results) {
  226. response->responseHeader.serviceResult = UA_STATUSCODE_BADOUTOFMEMORY;
  227. return;
  228. }
  229. /* ### Begin External Namespaces */
  230. UA_Boolean *isExternal = UA_alloca(sizeof(UA_Boolean) * request->nodesToReadSize);
  231. UA_memset(isExternal, UA_FALSE, sizeof(UA_Boolean)*request->nodesToReadSize);
  232. UA_UInt32 *indices = UA_alloca(sizeof(UA_UInt32) * request->nodesToReadSize);
  233. for(UA_Int32 j = 0;j<server->externalNamespacesSize;j++) {
  234. UA_UInt32 indexSize = 0;
  235. for(UA_Int32 i = 0;i < request->nodesToReadSize;i++) {
  236. if(request->nodesToRead[i].nodeId.namespaceIndex != server->externalNamespaces[j].index)
  237. continue;
  238. isExternal[i] = UA_TRUE;
  239. indices[indexSize] = i;
  240. indexSize++;
  241. }
  242. if(indexSize == 0)
  243. continue;
  244. UA_ExternalNodeStore *ens = &server->externalNamespaces[j].externalNodeStore;
  245. ens->readNodes(ens->ensHandle, &request->requestHeader, request->nodesToRead,
  246. indices, indexSize, response->results, UA_FALSE, response->diagnosticInfos);
  247. }
  248. /* ### End External Namespaces */
  249. response->resultsSize = request->nodesToReadSize;
  250. for(UA_Int32 i = 0;i < response->resultsSize;i++) {
  251. if(!isExternal[i])
  252. readValue(server, &request->nodesToRead[i], &response->results[i]);
  253. }
  254. #ifdef EXTENSION_STATELESS
  255. if(session==&anonymousSession){
  256. /* expiry header */
  257. UA_ExtensionObject additionalHeader;
  258. UA_ExtensionObject_init(&additionalHeader);
  259. additionalHeader.encoding = UA_EXTENSIONOBJECT_ENCODINGMASK_BODYISBYTESTRING;
  260. UA_Variant variant;
  261. UA_Variant_init(&variant);
  262. variant.type = &UA_TYPES[UA_TYPES_DATETIME];
  263. variant.arrayLength = request->nodesToReadSize;
  264. UA_DateTime* expireArray = UA_NULL;
  265. expireArray = UA_Array_new(&UA_TYPES[UA_TYPES_DATETIME], request->nodesToReadSize);
  266. variant.dataPtr = expireArray;
  267. UA_ByteString str;
  268. UA_ByteString_init(&str);
  269. /*expires in 20 seconds*/
  270. for(UA_Int32 i = 0;i < response->resultsSize;i++) {
  271. expireArray[i] = UA_DateTime_now() + 20 * 100 * 1000 * 1000;
  272. }
  273. size_t offset = 0;
  274. str.data = UA_malloc(UA_Variant_calcSizeBinary(&variant));
  275. str.length = UA_Variant_calcSizeBinary(&variant);
  276. UA_Variant_encodeBinary(&variant, &str, &offset);
  277. additionalHeader.body = str;
  278. response->responseHeader.additionalHeader = additionalHeader;
  279. }
  280. #endif
  281. }
  282. static UA_StatusCode writeValue(UA_Server *server, UA_WriteValue *wvalue) {
  283. UA_StatusCode retval = UA_STATUSCODE_GOOD;
  284. // we might repeat writing, e.g. when the node got replaced mid-work
  285. UA_Boolean done = UA_FALSE;
  286. while(!done) {
  287. const UA_Node *node = UA_NodeStore_get(server->nodestore, &wvalue->nodeId);
  288. if(!node)
  289. return UA_STATUSCODE_BADNODEIDUNKNOWN;
  290. switch(wvalue->attributeId) {
  291. case UA_ATTRIBUTEID_NODEID:
  292. case UA_ATTRIBUTEID_NODECLASS:
  293. case UA_ATTRIBUTEID_BROWSENAME:
  294. case UA_ATTRIBUTEID_DISPLAYNAME:
  295. case UA_ATTRIBUTEID_DESCRIPTION:
  296. case UA_ATTRIBUTEID_WRITEMASK:
  297. case UA_ATTRIBUTEID_USERWRITEMASK:
  298. case UA_ATTRIBUTEID_ISABSTRACT:
  299. case UA_ATTRIBUTEID_SYMMETRIC:
  300. case UA_ATTRIBUTEID_INVERSENAME:
  301. case UA_ATTRIBUTEID_CONTAINSNOLOOPS:
  302. case UA_ATTRIBUTEID_EVENTNOTIFIER:
  303. retval = UA_STATUSCODE_BADWRITENOTSUPPORTED;
  304. break;
  305. case UA_ATTRIBUTEID_VALUE:
  306. if(node->nodeClass == UA_NODECLASS_VARIABLE) {
  307. const UA_VariableNode *vn = (const UA_VariableNode*)node;
  308. if(vn->variableType == UA_VARIABLENODETYPE_DATASOURCE) {
  309. if(!vn->variable.dataSource.write) {
  310. retval = UA_STATUSCODE_BADWRITENOTSUPPORTED;
  311. break;
  312. }
  313. retval = vn->variable.dataSource.write(vn->variable.dataSource.handle, &wvalue->value.value);
  314. done = UA_TRUE;
  315. break;
  316. }
  317. // array sizes are not checked to match
  318. if(!wvalue->value.hasVariant || !UA_NodeId_equal(&vn->variable.variant.type->typeId,
  319. &wvalue->value.value.type->typeId)) {
  320. retval = UA_STATUSCODE_BADWRITENOTSUPPORTED;
  321. break;
  322. }
  323. UA_VariableNode *newVn = UA_VariableNode_new();
  324. if(!newVn) {
  325. retval = UA_STATUSCODE_BADOUTOFMEMORY;
  326. break;
  327. }
  328. retval = UA_VariableNode_copy(vn, newVn);
  329. if(retval != UA_STATUSCODE_GOOD) {
  330. UA_VariableNode_delete(newVn);
  331. break;
  332. }
  333. retval = UA_Variant_copy(&wvalue->value.value, &newVn->variable.variant);
  334. if(retval != UA_STATUSCODE_GOOD) {
  335. UA_VariableNode_delete(newVn);
  336. break;
  337. }
  338. if(UA_NodeStore_replace(server->nodestore, node, (UA_Node*)newVn,
  339. UA_NULL) == UA_STATUSCODE_GOOD)
  340. done = UA_TRUE;
  341. else
  342. UA_VariableNode_delete(newVn);
  343. } else if(node->nodeClass == UA_NODECLASS_VARIABLETYPE) {
  344. const UA_VariableTypeNode *vtn = (const UA_VariableTypeNode*)node;
  345. if(!wvalue->value.hasVariant || !UA_NodeId_equal(&vtn->value.type->typeId,
  346. &wvalue->value.value.type->typeId)) {
  347. retval = UA_STATUSCODE_BADWRITENOTSUPPORTED;
  348. break;
  349. }
  350. UA_VariableTypeNode *newVtn = UA_VariableTypeNode_new();
  351. if(!newVtn) {
  352. retval = UA_STATUSCODE_BADOUTOFMEMORY;
  353. break;
  354. }
  355. retval = UA_VariableTypeNode_copy(vtn, newVtn);
  356. if(retval != UA_STATUSCODE_GOOD) {
  357. UA_VariableTypeNode_delete(newVtn);
  358. break;
  359. }
  360. retval = UA_Variant_copy(&wvalue->value.value, &newVtn->value);
  361. if(retval != UA_STATUSCODE_GOOD) {
  362. UA_VariableTypeNode_delete(newVtn);
  363. break;
  364. }
  365. if(UA_NodeStore_replace(server->nodestore, node, (UA_Node*)newVtn,
  366. UA_NULL) == UA_STATUSCODE_GOOD)
  367. done = UA_TRUE;
  368. else
  369. UA_VariableTypeNode_delete(newVtn);
  370. } else {
  371. retval = UA_STATUSCODE_BADWRITENOTSUPPORTED;
  372. }
  373. break;
  374. case UA_ATTRIBUTEID_DATATYPE:
  375. case UA_ATTRIBUTEID_VALUERANK:
  376. case UA_ATTRIBUTEID_ARRAYDIMENSIONS:
  377. case UA_ATTRIBUTEID_ACCESSLEVEL:
  378. case UA_ATTRIBUTEID_USERACCESSLEVEL:
  379. case UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL:
  380. case UA_ATTRIBUTEID_HISTORIZING:
  381. case UA_ATTRIBUTEID_EXECUTABLE:
  382. case UA_ATTRIBUTEID_USEREXECUTABLE:
  383. retval = UA_STATUSCODE_BADWRITENOTSUPPORTED;
  384. break;
  385. default:
  386. retval = UA_STATUSCODE_BADATTRIBUTEIDINVALID;
  387. break;
  388. }
  389. if(retval != UA_STATUSCODE_GOOD)
  390. break;
  391. UA_NodeStore_release(node);
  392. }
  393. return retval;
  394. }
  395. void Service_Write(UA_Server *server, UA_Session *session,
  396. const UA_WriteRequest *request, UA_WriteResponse *response) {
  397. UA_assert(server != UA_NULL && session != UA_NULL && request != UA_NULL && response != UA_NULL);
  398. response->results = UA_Array_new(&UA_TYPES[UA_TYPES_STATUSCODE], request->nodesToWriteSize);
  399. if(!response->results) {
  400. response->responseHeader.serviceResult = UA_STATUSCODE_BADOUTOFMEMORY;
  401. return;
  402. }
  403. /* ### Begin External Namespaces */
  404. UA_Boolean *isExternal = UA_alloca(sizeof(UA_Boolean) * request->nodesToWriteSize);
  405. UA_memset(isExternal, UA_FALSE, sizeof(UA_Boolean)*request->nodesToWriteSize);
  406. UA_UInt32 *indices = UA_alloca(sizeof(UA_UInt32) * request->nodesToWriteSize);
  407. for(UA_Int32 j = 0;j<server->externalNamespacesSize;j++) {
  408. UA_UInt32 indexSize = 0;
  409. for(UA_Int32 i = 0;i < request->nodesToWriteSize;i++) {
  410. if(request->nodesToWrite[i].nodeId.namespaceIndex !=
  411. server->externalNamespaces[j].index)
  412. continue;
  413. isExternal[i] = UA_TRUE;
  414. indices[indexSize] = i;
  415. indexSize++;
  416. }
  417. if(indexSize == 0)
  418. continue;
  419. UA_ExternalNodeStore *ens = &server->externalNamespaces[j].externalNodeStore;
  420. ens->writeNodes(ens->ensHandle, &request->requestHeader, request->nodesToWrite,
  421. indices, indexSize, response->results, response->diagnosticInfos);
  422. }
  423. /* ### End External Namespaces */
  424. response->resultsSize = request->nodesToWriteSize;
  425. for(UA_Int32 i = 0;i < request->nodesToWriteSize;i++) {
  426. if(!isExternal[i])
  427. response->results[i] = writeValue(server, &request->nodesToWrite[i]);
  428. }
  429. }