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
Moderator
Members

Moderators
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: 983
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: 983
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
Moderator
Members

Moderators
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: 518

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 682

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, 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