Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] Alarm/Event Notifications triggers from OPC server

Subscribing to events work like this, assuming you have a Subscription already:

1. Find the ObjectNode in the server that is the source of events you're interested in. Its EventNotifier attribute will be set.

2. Create a MonitoredItem, pointing at that EventNotifier attribute, in MonitoringMode.Reporting, optionally specifying an EventFilter. How you define an EventFilter is talked about in part 4 of the spec, section 7.17.3. It's almost like you're building a SQL query with a select and where clause that determines what kinds of events and what fields from those events are delivered.

3. Set an EventConsumer on the UaMonitoredItem you created. That will be the callback invoked when the server delivers events that passed the EventFilter.

You shouldn't need to worry about receiving empty PublishResponses or null NotificationMessages (neither of those things should happen, except an empty PublishResponse when its a KeepAlive). If you're using the OpcUaClient then you don't ever interact directly with PublishRequest/PublishResponse in the first place - the subscription manager takes care of that and you just receive callbacks on the items you create.



On Thu, Nov 23, 2017 at 9:44 AM, Isuru Samaraweera <isuru@xxxxxxxx> wrote:
Hi All,

Normal procedure for receiving notification from server is

1.Create Subscription
2.Create MpnitoringParameters/MonitoredItemCreateRequest
3.createMonitoredItems

Once you do this PublishRequest/Response is used to receive notifications.

If we have to receive specific notifications/alarms instead of all the notifications from the server
The right way is to define a filter(DataChangeFilter,EventFilter etc) of type Extensible Parameter MonitoringFilter along with above 3 steps and
sentout notifications only if filter criteria is met?

If criteria is not met PublishResponse will be sent out with NotificationMessage set to null?

Or Is there a different way for condtionalNotifications/Alarms to be sent out without creating subscriptions,filters and monitoreditems and without sending empty PublishResponses ?

Please clarify.

Thanks,
Isuru

_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/milo-dev



Back to the top