

23:33, EET

February 8, 2014

8:25, EET

December 21, 2011

This sample is available in SampleConsoleServer.createStaticArrayVariable:
NodeId dataType, Object initialValue) throws StatusException {
final NodeId nodeId = new NodeId(complianceNamespaceIndex, dataTypeName);
UaType type = server.getNodeManagerRoot().getType(dataType);
UaVariableNode node = new CacheVariable(complianceNodeManager, nodeId,
dataTypeName, Locale.ENGLISH);
node.setDataType(type);
node.setTypeDefinition(type);
node.setValueRank(ValueRanks.OneDimension);
node.setArrayDimensions(new UnsignedInteger[] { UnsignedInteger
.valueOf(Array.getLength(initialValue)) });
node.setValue(new DataValue(new Variant(initialValue), StatusCode.GOOD,
new DateTime(), new DateTime()));
staticArrayVariableFolder.addReference(node, Identifiers.HasComponent,
false);
}
and it is called from createComplianceNodes, e.g.
new Boolean[] { true, false, true, false, false });
createStaticArrayVariable(
"ByteArray",
Identifiers.Byte,
new UnsignedByte[] { UnsignedByte.valueOf(1),
UnsignedByte.valueOf(2), UnsignedByte.valueOf(3),
UnsignedByte.valueOf(4), UnsignedByte.valueOf(5) });
18:24, EEST

June 29, 2017

Hello,
I am using the code above ( createStaticArrayVariable ) to generate a UaVariableNode but as an Identifiers.Int16 data type. When updating the value I can see that the value was changed, but subscribing (via UaExpert) doesn’t work (i.e. the initial value is shown but is not updated). Is this a general issue with array types or am I missing something? I tried UaVariableNode.setValue as well as UaVariableNode.updateValue.
16:03, EEST

April 17, 2013

Hello Sergej,
The above code should still work despite being 4 years old. And UaExpert should be able to create subscriptions to Array variables without issues.
How have you confirmed that the value was updated correctly on the server side?
Do you think you could compose an example project showing the issue so that we could reproduce this? I tested the above code snippets and UaExpert and I cannot find anything going wrong.
18:45, EEST

June 29, 2017

Most Users Ever Online: 1919
Currently Online:
20 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 90
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 743
Moderators: 8
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1544
Posts: 6513
Newest Members:
SamuelGed, Joseph, GregoryLet, CharlesDum, cbd gummies, Keithwearp, Williamcor, jodiexae492966, fayetozer72, anglea06o05589Moderators: Jouni Aro: 1029, Pyry: 1, Petri: 0, Bjarne Boström: 1044, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0, Elias: 0
Administrators: admin: 1