Event Monitor - Existing events

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
rcpat
Full Member
Full Member
Posts: 5
Joined: 23 Jul 2015, 10:15

Event Monitor - Existing events

Post by rcpat »

Hello,

I have been following the getting started example code for handling events/alarms. However, it seems the code does not catch events/alarms that are active before the client application is started -- however UA Expert does catch these existing events.

Is there a way to do this using the SDK? Pointers would be much appreciated.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Event Monitor - Existing events

Post by Support Team »

Hi,

A client can only receive events fired after the client created a subscription.

But for Condition Events there is a ConditionRefresh method that can be called to force the server to repeat events for all conditions in an interesting state (Retain = true).

Best Regards,
Unified Automation Support Team

rcpat
Full Member
Full Member
Posts: 5
Joined: 23 Jul 2015, 10:15

Re: Event Monitor - Existing events

Post by rcpat »

Thanks. For anyone who has the same problem in future and finds this thread, ConditionRefresh on the server can be called from the client as below.

Code: Select all

NodeId conditionType = new NodeId(<id> , namespace); // In my case, NodeId(2782,0);
NodeId conditionRefresh = new NodeId(<id>,namespace); // in my case, NodeId(3875,0);
List<UnifiedAutomation.UaBase.Variant> l = new List<UnifiedAutomation.UaBase.Variant>();
List<UnifiedAutomation.UaBase.StatusCode> l2 = new List<UnifiedAutomation.UaBase.StatusCode>();
List<UnifiedAutomation.UaBase.Variant> l3 = new List<UnifiedAutomation.UaBase.Variant>();
l.Add( m_subscription.SubscriptionId);
m_session.Call(conditionType, conditionRefresh , l , new RequestSettings() , out l2 , out l3);
http://documentation.unified-automation ... 1779dd4804

Post Reply