Avatar
Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
AddNodesRequest
August 22, 2013
14:05, EEST
Avatar
jschmitt78
New Member
Members
Forum Posts: 1
Member Since:
August 22, 2013
sp_UserOfflineSmall Offline

I have the following problem:

I want to create a node at the UA-Server using a AddNodesRequest from a remote client:
—————
NodeAttributes attributes = new NodeAttributes();
attributes.setDescription(new LocalizedText(“test”,Locale.ENGLISH));
attributes.setDisplayName(new LocalizedText(“test2”,Locale.ENGLISH));
attributes.setUserWriteMask( UnsignedInteger.ZERO);
attributes.setWriteMask( UnsignedInteger.ZERO);
attributes.setSpecifiedAttributes(NodeAttributesMask.getMask(NodeAttributesMask.Description,NodeAttributesMask.DisplayName,NodeAttributesMask.UserWriteMask,NodeAttributesMask.WriteMask));
AddNodesItem item=new AddNodesItem(new ExpandedNodeId(NodeId.get(IdType.String, 2, “TestNodeB”)), Identifiers.Organizes, new ExpandedNodeId (NodeId.get(IdType.String, 2, “NewNode”)), new QualifiedName(“New Node”), NodeClass.Object, ExtensionObject.binaryEncode(attributes), new ExpandedNodeId(Identifiers.ObjectNode));
AddNodesRequest request=new AddNodesRequest(null, new AddNodesItem[]{item});
—————

Currently I get the following response/error:
—————
13356 WARN [Blocking-Work-Executor-29] com.prosysopc.ua.server.NodeManagementServiceHandler – com.prosysopc.ua.StatusException: Bad_NotSupported (0x803D0000) “The requested operation is not supported.” StatusCode=Bad_NotSupported (0x803D0000) “The requested operation is not supported.”
—————

Unfortunately I can’t find any example or reference implementation for that, so I need your help/support

Maybe a wrong ExtensionObject with NoteAttributes causes the problem / or a missing handler / or a missing feature of the SDK?

Where is the server informed about a new remotely create Node?
– I have tested a NodeManagerListener – where I assume that the event maybe calls the “onAddNode” Method
– or the “fireAddNode” at the Nodemanager itself

Thank you in advance for any help

August 23, 2013
8:31, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1068
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,
I already answered your mail, but I will post here also in case someone else needs this.

Node management operations are not enabled by default. They can be turned on by
uaServer.getNodeManagerTable().setNodeManagementEnabled(true)

The nodeAttributes parameter is a NodeAttributes sub-class, encoded using ExtensionObject, depending on the type of the new node:
DataTypeAttributes
MethodAttributes
ObjectAttributes
ObjectTypeAttributes
ReferenceTypeAttributes
VariableAttributes
VariableTypeAttributes
ViewAttributes
The SpecifiedAttributes parameter in constructors define which attributes are given, can be formed using NodeAttributesMask class.

NodeManager calls onAddNode for all NodeManagerListeners it has, when nodes are added.

You should not make the AddNodesRequest by yourself, but instead use uaClient.getAddressSpace().addNode/addNodes methods, this way the RequestHeader for the AddNodesRequest is build correctly.

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 59
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 100
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 773
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1558
Posts: 6567
Newest Members:
aracelyhaley4, raphaelschonell, Ashmag, kathyreimann56, brittanylemos, dorthycundiff76, PromotionToold, CHHinrichs, rodricklienhop, jose_Wanderlei
Moderators: Jouni Aro: 1039, Pyry: 1, Petri: 1, Bjarne Boström: 1054, Jimmy Ni: 26, Matti Siponen: 359, Lusetti: 0
Administrators: admin: 1