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
attribute ID's
February 11, 2016
11:21, EET
Avatar
pramanj
Member
Members
Forum Posts: 86
Member Since:
October 21, 2014
sp_UserOfflineSmall Offline

Are the attribute ID’s for nodes (e.g. no 13 for Value attribute etc) fixed by OPC spec or they are server implementation dependent?

February 11, 2016
12:09, EET
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hi,

The attribute IDs are fixed in the OPC UA specification. For complete list, see specification part 6, version 1.03, page 51. You can download the specifications from https://opcfoundation.org/developer-tools/specifications-unified-architecture

February 11, 2016
16:23, EET
Avatar
pramanj
Member
Members
Forum Posts: 86
Member Since:
October 21, 2014
sp_UserOfflineSmall Offline

How to check if a string “s” is valid NodeId or not? Is the code “NodeId.parseNodeId(s)!= null” OK for checking it? As I don’t know what parseNode returns (no documentation for this method).

February 12, 2016
7:37, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

That class is part of the STACK, not SDK. Javadoc for the STACK is included in non-eval versions.

February 12, 2016
10:05, EET
Avatar
pramanj
Member
Members
Forum Posts: 86
Member Since:
October 21, 2014
sp_UserOfflineSmall Offline

But how to check if a string “s” is valid NodeId or not? Is the code “NodeId.parseNodeId(s)!= null” OK for checking it?
regards
PRAMANJ

February 12, 2016
10:43, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

The NodeId.parseNodeId will throw IllegalArgumentException if it cannot parse the string. So does NodeId’s constructors if given values are out of range (based on the specification Part 3, section 8.2.4.)

– Bjarne

February 13, 2016
10:53, EET
Avatar
pramanj
Member
Members
Forum Posts: 86
Member Since:
October 21, 2014
sp_UserOfflineSmall Offline

Dear Sir,

Its doesn’t give illegalArgumentException but it gives com.prosysopc.ua.StatusException ! Its serving my purpose as I am able to catch any exception and proceed, but is it OK as per the spec to get StatusException rather than illegalArgumentException ?

regards
PRAMANJ

February 15, 2016
7:39, EET
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hi,

Are you getting this exception from NodeId.parseNodeId method? Probably the exception is being thrown from some other method, where you use the NodeId that you made with NodeId.parseNodeId.

You can make any NodeId object that you like with the method NodeId.parseNodeId as long as the method can parse the string. This will not check whether or not the NodeId exist in the server.

You can check that the Node exists in the server for example by making a read request. Reading attribute with client.readAttribute(new NodeId(0, “n”), Attributes.NodeClass) will result in StatusException being thrown with StatusCode Bad_NodeIdUnknown.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online: mithun
20 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 738

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6450

Newest Members:

jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1