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: 523
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: 267

Currently Online:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 100

pramanj: 86

ibrahim: 70

kapsl: 57

gjevremovic: 49

TimK: 41

Fransua33: 39

fred: 37

Rainer Versteeg: 32

Thomas Reuther: 26

Member Stats:

Guest Posters: 0

Members: 1058

Moderators: 14

Admins: 1

Forum Stats:

Groups: 3

Forums: 14

Topics: 981

Posts: 4145

Newest Members:

mats989, Sebastien Petitrenaud, sting2005, Ron Hoppe, Seb, p.devito, g.ilengo, MohamedLazrek, brittr83165991, martintinsley9

Moderators: Jouni Aro: 846, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 523, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 20, Markus Johansson: 18, Matti Siponen: 31, Lusetti: 0

Administrators: admin: 0