I inherited some C# opc ua client code. I see we loose subscription time to time.
m_Subscription = new Subscription(session);
m_Subscription.PublishingEnabled = true;
m_Subscription.PublishingInterval = publishingInterval;
m_Subscription.DataChanged += SubscriptionOnDataChanged;
m_Subscription.NewEvents += SubscriptionOnNewEvents;
m_Subscription.StatusChanged += SubscriptionOnStatusChanged;
m_Subscription.Lifetime = 10000;
m_Subscription.MaxKeepAliveTime = 10000;
m_Subscription.Create();
With the above code, I lost subscription time to time meaning SubscriptionOnDataChanged is not called. I am not explicitly calling to stop publish. To get the working subscription back what I should do?
What does it mean for C# client? Can any body show or explain me?
OPC UA C# client subscription issue
Moderator: uasdknet
-
- Sr. Member
- Posts: 13
- Joined: 18 Feb 2016, 21:47
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: OPC UA C# client subscription issue
Hello,
Is SubscriptionOnStatusChanged EventHandler called? Is the connection established the whole time, or is the client in a reconnect loop?
Is SubscriptionOnStatusChanged EventHandler called? Is the connection established the whole time, or is the client in a reconnect loop?
Best regards
Unified Automation Support Team
Unified Automation Support Team