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
Help - complete list of StatusCodes
July 11, 2023
10:52, EEST
Avatar
Francesco Zambon
Member
Members
Forum Posts: 81
Member Since:
December 20, 2021
sp_UserOfflineSmall Offline

Good morning,

Can you please send me the official documentation with the complete list of StatusCodes?

For example I can’t find in the OPC Foundation official documentation the definition of:
StatusCodes.Bad_DataUnavailable
The document “OPC Unified Architecture Part 6: Mappings” is not complete.

I would like to use the most correct status code to handle certain server side error cases.

From the OPC UA specification it is discouraged to create your own error codes.

Thanks,

Best regards.

Francesco.

July 11, 2023
11:10, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Yes, only the specification itself can define the codes, because the OPC Foundation does add new ones time-to-time and thus any custom codes would conflict potential future codes.

The StatusCodes class is generated from the resource files provided by the OPC Foundation. That file can be found in https://github.com/OPCFoundation/UA-Nodeset/blob/latest/Schema/StatusCode.csv (and the NodeSet2 xml for the core namespace + services is also in that folder, i.e. the majority of the actual stuff is defined by these files, e.g. core namespace NodeIds and so on). Though, note that the current SDK as of 4.x uses the 1.04 resources (different branch in the repo) and once we release 5.x it will use 1.05. The spec does link to the csv, but it is hard to find (https://reference.opcfoundation.org/Core/Part6/v104/docs/A.2 and it doesn’t link to github, but that is anyway where SDK vendors do get it).

So, here e.g. “BadDataUnavailable 0x809E0000 Expected data is unavailable for the requested time range due to an un-mounted volume, an off-line archive or tape, or similar reason for temporary unavailability.”

I do not at least at the moment remember is there any better place i.e. “all statuscodes” list other than this. Using Search on https://reference.opcfoundation.org/ might help sometimes when trying to find more about the usage of a statuscode.

We do generate the text explanation as (using BadDataUnavailable as examlpe) @Description(“Expected data is unavailable for the requested time range due to an un-mounted volume, an off-line archive or tape, or similar reason for temporary unavailability.”) annotation, since it is used programmatically in toString of StatusCode. Though, at some point it might make sense to generate it also as javadoc. Eclipse would seem to show the annotation on mouse hover, but it is not as useful as javadocs that would show during autocomplete.

P.S.
Sometimes there like might be a statuscode not used by the core spec, some might have been defined for some companion specification or other common purposes. There might not sometimes be better info than the oneliner in the csv.

July 12, 2023
10:38, EEST
Avatar
Francesco Zambon
Member
Members
Forum Posts: 81
Member Since:
December 20, 2021
sp_UserOfflineSmall Offline

Thanks!

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
16 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: 684

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

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

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