Avatar

Please consider registering
guest

sp_LogInOut Log In sp_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 RSS sp_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: 982
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: 518

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 75

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 707

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1466

Posts: 6253

Newest Members:

christi10l, ahamad1, Flores Frederick, ellenmoss, harriettscherer, shanonhumphreys, KupimotoblokfuB, tamhollander5, paulinafcf, bridgette18l

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 982, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 319, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1