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: 836
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: 267

Currently Online:
7 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 122

pramanj: 86

ibrahim: 74

rocket science: 65

kapsl: 57

gjevremovic: 49

Sabari: 46

Xavier: 42

fred: 41

TimK: 41

Member Stats:

Guest Posters: 0

Members: 3344

Moderators: 17

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1300

Posts: 5561

Newest Members:

UPtato42, fblvicky6629601, elliebloomer44, Manuelagibe, justinafavenc54, sarlaman9, nancymcneal1, elztaim591797, JeffreyAidet, sameisenhower7

Moderators: Jouni Aro: 946, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 836, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 25, Teppo Uimonen: 21, Markus Johansson: 41, Niklas Nurminen: 0, Matti Siponen: 221, Lusetti: 0

Administrators: admin: 1