Please consider registering

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
Retrieving all alarm nodes from the server
September 16, 2022
13:17, EEST
New Member
Forum Posts: 1
Member Since:
September 16, 2022
sp_UserOfflineSmall Offline


My goal is to retrieve all alarm nodes (their addresses) from the server. These nodes are characterized by having HasTypeDefinition reference pointing towards the ObjectType named AlarmType.

Our existing solution is very slow and most likely suboptimal. Currently it works by searching the whole tree and comparing each node with custom expression, in this case, checking if the nodes reference table contains reference named AlarmType.

I don’t think this is the right direction to solve this problem and I doubt how much it is possible to speed up this proccess. My idea was to use the AlarmType reference and by reversing it reaching the desired nodes. Instead this reference pointed back not at these nodes, but to different SubTypes of AlarmType. These SubTypes have matching BrowseName/DisplayName to the target alarm nodes but are not connected in any way to them. Overall, this solution failed.

What would be the optimal way of achieving my goal?

September 16, 2022
14:04, EEST
Bjarne Boström
Forum Posts: 970
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline


Can you tell why you need them? Because maybe you dont i.e. there could be another more “OPC UA way” to do whay you want? For example, if you just want to monitor all alarms on a server you simply make a MonitoredEventItem and give the Server NodeId (Identifiers.Server)

Anyway, if you really do need the nodes the only way is to literally recursively Browse the entire tree below Objects. The inverse references “trick” you mentioned should be ignored, that only works with our SDK due to how we have implemented them and it is in fact something we should disable as it is more of a problem if you have any larger amount of nodes. Plus you need to check as you noted that are they subtypes of the AlarmConditionType. If you use the UaNodes via client.getAddressSpace().getNode it is somewhat easy to do, but I’ll return to this if you really needed this. In general it would not be the “OPC UA way”, but it basically doesn’t have one good way (there is Query, but as far as I’m aware no server implements that, nor our own nor the SDK).

Also since you say “names” I should note that the index/namespace on the BrowseNames matter, any other information model can reuse the names in different namespaces (e.g. I could make a new type called AlarmType, just in a different namespace).

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 130

pramanj: 86

Francesco Zambon: 78

ibrahim: 75

rocket science: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 731

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1450

Posts: 6201

Newest Members:

jadadibdin6, DiianaZof, antoniettakarn, Tor, Arktistync, floybateson9, inilarythikibia, celinamcguire5, helenblodo

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

Administrators: admin: 1