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.
Event Monitor - Existing events
Moderator: uasdknet
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re: Event Monitor - Existing events
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
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
-
- Full Member
- Posts: 5
- Joined: 23 Jul 2015, 10:15
Re: Event Monitor - Existing events
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.
http://documentation.unified-automation ... 1779dd4804
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);