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

Hello

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
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 982
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

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:
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 75

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 707

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1465

Posts: 6252

Newest Members:

christi10l, ahamad1, Flores Frederick, ellenmoss, harriettscherer, shanonhumphreys, KupimotoblokfuB, tamhollander5, paulinafcf, bridgette18l

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

Administrators: admin: 1