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: 1032
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: 1919

Currently Online:
32 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 726

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_gallery

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1