Alarms, events, subscriptions, monitored items???

740 views
Skip to first unread message

Patrick Klos

unread,
Aug 17, 2016, 2:48:38 PM8/17/16
to open62541
Hello open62541 group,

I am working on an open62541 based OPC server running under Linux.  I have a working server that provides a bunch of variables and works fine with several OPC clients I've tried.  The customer wants the server to be able to produce "alarms" when certain events occur.

From reading through posts in this group, it appears some of the necessary components to implement subscriptions and/or monitored items are still not available in open62541?

Is there a document somewhere that explains what components are not present yet in open62541? And possible if they're being worked on (or if I should work on them myself)?

The second part of that question is does anyone know how to implement an "alarm"? 
  • How do I create an alarm in my server? 
  • Is it a special variable that I then create a subscription for?
  • Or is a subscription actually a collection of "monitored items"? 
  • Can any object / variable become a "monitored item" or do they need special support routines (i.e. to detect when the value has changed)?

It would seem that the server would need to maintain a list of monitored items to periodically check if they've changed so it can send appropriate responses to the client(s). 


Is any of this already in open62541?  What parts are missing?


Also, I noticed when I open the test client from the OPC Foundation (OPC UA Technology Sample Quickstart Alarm and Conditions Client) software, it seems to be doing some kind of "method" call for nodeId (0,2782) [ConditionType] and methodId (0,3875) [ConditionType_ConditionRefresh] and immediately fails.  Is that also part of what is missing on open62541?  I saw that the definition for 2782 (UA_NS0ID_CONDITIONTYPE) exists in src_generated/ua_nodeids.h, but there is nothing for 3875.


Sincerely,

Patrick Klos
Klos Technologies, Inc.

Julius Pfrommer

unread,
Aug 22, 2016, 9:29:24 AM8/22/16
to open62541
Hello Patrick,


From reading through posts in this group, it appears some of the necessary components to implement subscriptions and/or monitored items are still not available in open62541?

We have subscription implemented in the 0.2 branch and the last v0.2-rc1 release candidate. However, there are two types of notifications that can be emitted from a server.
DataChangeNotifications are used to monitor changes in node attributes. DataChangeNotifications are implemented.
Events are emitted by objects and may carry some complex payload. Events are not implemented in open62541 so far.
 
Is there a document somewhere that explains what components are not present yet in open62541? And possible if they're being worked on (or if I should work on them myself)?

We will document available features for the upcoming 0.2 release.
 
The second part of that question is does anyone know how to implement an "alarm"? 
  • How do I create an alarm in my server? 
  • Is it a special variable that I then create a subscription for?
  • Or is a subscription actually a collection of "monitored items"? 
  • Can any object / variable become a "monitored item" or do they need special support routines (i.e. to detect when the value has changed)?
Value changes can be monitored by creating a MonitoredItem. Every MonitoredItem is feeding notifications into a subscription. Subscriptions cyclically send the notifications that have accumulated.
 

It would seem that the server would need to maintain a list of monitored items to periodically check if they've changed so it can send appropriate responses to the client(s). 


That is exactly what MonitoredItems for DataChanges are for. They have a sample rate for checking the value. On the other hand, events don't have a sample rate.
So events can never be "missed" due to a large sample rate.
 

Also, I noticed when I open the test client from the OPC Foundation (OPC UA Technology Sample Quickstart Alarm and Conditions Client) software, it seems to be doing some kind of "method" call for nodeId (0,2782) [ConditionType] and methodId (0,3875) [ConditionType_ConditionRefresh] and immediately fails.  Is that also part of what is missing on open62541?  I saw that the definition for 2782 (UA_NS0ID_CONDITIONTYPE) exists in src_generated/ua_nodeids.h, but there is nothing for 3875.


The alarms from part 9 of the spec (can be downloaded on the OPC Foundation homepage) are objects that represent state machines and emit specialized events.
Part 9 § 5.5.7 says:
ConditionRefresh allows a Client to request a Refresh of all Condition instances that currently are in an interesting state (they have the Retain flag set).

However, we don't have events right now. Only datachange notifications.

If you interested in details of subscriptions, I suggest you take a look at the spec and /src/server/ua_subscriptions.c for our implementations.
If you have ideas for adding events to this, they are very welcome indeed.

Best regards,
Julius Pfrommer
Reply all
Reply to author
Forward
0 new messages