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
Do you have a manual or document for numeric identifiers of Node's attributes?‏
November 29, 2012
21:01, EET
Avatar
maahirx
Member
Members
Forum Posts: 13
Member Since:
November 29, 2012
sp_UserOfflineSmall Offline

Hi,
I am using Prosys OPC UA java SDK. In console client after connecting to OPC UA demo server at opc.tcp://demo.ascolab.com:4841, when i read the node-class attribute of a node, it gives me a numeric value like this “Value: 2”.
How can i know about the node-class attribute of that node with this value?
Is there a manual or document to interpret this value?
Same is the case with Datatype, Access-level, User-Access-level attributes.
Kindly help me out here, i am kinda stuck here.

Regards,

Shahzad

November 29, 2012
21:16, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

The attribute values are defined in the ‘Attributes’ class.

DataType is a NodeId. All standard NodeIds are defined in the Identifiers class. But it may be best to look up the respective DataType node, which you can get from UaCilent.getAddressSpace().getType() (you can cast the result to a UaDataType).

AccessLevel defines the enumeration the access level attributes – the integer value defines an EnumSet and there are respective methods to convert the integer to the EnumSet.

November 30, 2012
8:08, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

All the above mentioned classes (Attributes, Identifiers, AccessLevel) are in the org.opcfoundation.ua.core package.

November 30, 2012
11:33, EET
Avatar
maahirx
Member
Members
Forum Posts: 13
Member Since:
November 29, 2012
sp_UserOfflineSmall Offline

Thank you very much, it helped a lot!

December 8, 2012
18:38, EET
Avatar
maahirx
Member
Members
Forum Posts: 13
Member Since:
November 29, 2012
sp_UserOfflineSmall Offline

Jouni Aro said

The attribute values are defined in the ‘Attributes’ class.

DataType is a NodeId. All standard NodeIds are defined in the Identifiers class. But it may be best to look up the respective DataType node, which you can get from UaCilent.getAddressSpace().getType() (you can cast the result to a UaDataType).

AccessLevel defines the enumeration the access level attributes – the integer value defines an EnumSet and there are respective methods to convert the integer to the EnumSet.

Could you provide that methods to convert the integer value to EnumSet. I cannot find it in org.opcfoundation.ua.core package.

December 8, 2012
20:34, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

maahirx said

Jouni Aro said

The attribute values are defined in the ‘Attributes’ class.

DataType is a NodeId. All standard NodeIds are defined in the Identifiers class. But it may be best to look up the respective DataType node, which you can get from UaCilent.getAddressSpace().getType() (you can cast the result to a UaDataType).

AccessLevel defines the enumeration the access level attributes – the integer value defines an EnumSet and there are respective methods to convert the integer to the EnumSet.

Could you provide that methods to convert the integer value to EnumSet. I cannot find it in org.opcfoundation.ua.core package.

AccessLevel.getSet() – and AccessLevel.getMask() for the other direction.

December 9, 2012
22:47, EET
Avatar
maahirx
Member
Members
Forum Posts: 13
Member Since:
November 29, 2012
sp_UserOfflineSmall Offline

Alright, i get it. But that is not enough. Let me put it that way:
During browsing address space, at one node i called a method to get all the attributes of that node using following code
DataValue[] value = null;
UnsignedInteger attributeId[];
attributeId={Attributes.NodeId,Attributes.NodeClass,Attributes.BrowseName,Attributes.DisplayName,Attributes.Description,Attributes.WriteMask,Attributes.UserWriteMask,
Attributes.IsAbstract,Attributes.Symmetric,Attributes.InverseName,Attributes.ContainsNoLoops,Attributes.EventNotifier,Attributes.Value,Attributes.DataType,Attributes.ValueRank,Attributes.ArrayDimensions,Attributes.AccessLevel,Attributes.UserAccessLevel,Attributes.MinimumSamplingInterval,Attributes.Historizing,Attributes.Executable,Attributes.UserExecutable};

value = client.readAttributes(node, attributeId);

Now in return it gives me the following values.(A loop prints all the values.null values are omitted)
0: NodeId ns=2;s=MyLevel
1: NodeClass 2
2: BrowseName 2:MyLevel
3: DisplayName (en) MyLevel
5: WriteMask 0
6: UserWriteMask 2097151
12: Value 38.0
13: DataType class org.opcfoundation.ua.builtintypes.DataValue
i=11
14: ValueRank -1
16: AccessLevel 7
17: UserAccessLevel 7
18: MinimumSamplingInterval -1.0
19: Historizing true

What i am asking is a method to convert that integer value to a string message or user understandable form. Like in Node class attribute,2 represent it is a variable node-class. I studied the OPC UA address space, but i cant interpret the other attributes like, DataType,UserWriteMask,ValueRank,AccessLevel,UserAccesLevel,
MinimumSamplingInterval. There is a lot variety of data types.

I think i made my point, i simply need a method or methods to convert these return values to a string or User readable form. And sorry for my explanation, it is pretty confusing!!

Regards:
Shahzad

December 10, 2012
8:34, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yes, that is a bit complicated. There are various enum types and some of the integers are just defined as constants.

Perhaps easiest is to use AddressSpace.getNode() and according to the actual type, convert the node to a specific type, e.g.

UaNode node = client.getAddressSpace().getNode(nodeId);
if (node instanceof UaVariable) {
UaVariable variable = ((UaVariable)node);
// Use the fields of UaVariable
}
// etc.

Otherwise you will need to convert each attribute by your own – we do not have a common conversion function for that.

Otherwise, you may also browse through the supported attributes for a node with

for (UnsignedInteger attributeId : node.getSupportedAttributes()) {
String attributeNameStr = AttributesUtil.toString(attributeId);
DataValue dataValue = node.readAttribute(attributeId);
// …
}

But you still get the pure values for each.

These classes will help in converting to strings if you go this route: WriteAccess, AccessLevel. ValueRanks contains the used constants but there is no string conversion defined.

December 11, 2012
15:54, EET
Avatar
maahirx
Member
Members
Forum Posts: 13
Member Since:
November 29, 2012
sp_UserOfflineSmall Offline

Ok, Thanks a lot.
There is another question, can we save an object of a class of UaClient?
if yes, then what is the the appropriate way to save it?
I have searched many ways, but none of them work.
Please help me out here!

Regards:
Shahzad

December 12, 2012
8:03, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

UaClient is not serializable and there is not yet anything to help you there. We might add something in future, but now you must save it yourself by just copying the property values with your own code. Where do you want to save it?

December 12, 2012
9:53, EET
Avatar
maahirx
Member
Members
Forum Posts: 13
Member Since:
November 29, 2012
sp_UserOfflineSmall Offline

We want save it either on Sq Lite Database or in Shared preferences. Once the connection is done and UaClient Object is created, we want to save the object so next time we don’t have to create the client. That is what we are thinking, but only if it is possible. That is why we asked.

December 12, 2012
10:50, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

OK. I was just curious, in regard to what we might be able to provide in future. But as said, at the moment we don’t have a solution to that.

December 12, 2012
21:04, EET
Avatar
maahirx
Member
Members
Forum Posts: 13
Member Since:
November 29, 2012
sp_UserOfflineSmall Offline

Well thanks a lot!

December 21, 2012
5:36, EET
Avatar
maahirx
Member
Members
Forum Posts: 13
Member Since:
November 29, 2012
sp_UserOfflineSmall Offline

Hello,
sorry to disturb you again, i want to show simulation and show a lay man the values changing in a server.
can you suggest me any software that will integrate with your Java SDK console server and show it on any HMI.

December 21, 2012
19:32, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

If you are looking for a GUI client, you can check our new OPC UA Java Client, which is available for downloads, although it’s still at beta development phase.

Or you can check UaExpert, from Unified Automation.

If you need to show the data in a Control Center, the best ones have an OPC UA client as well. All of them should have an OPC Client, in which case, you can use UaGateway to connect them to the OPC UA Server.

December 21, 2012
20:52, EET
Avatar
maahirx
Member
Members
Forum Posts: 13
Member Since:
November 29, 2012
sp_UserOfflineSmall Offline

Ok

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 680

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule

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

Administrators: admin: 1