Hello,
I am implementing Ua Client using UA-.NETStandardLibrary @ GitHub sdk,
I can connect the Ua Server using endpoint url and created a session. Furthermore I want to detect when Ua Server disconnects from client and/or closes the Ua Server (may be by user).
I am doing following:
Session session = await Session.Create(_AppConfiguration,
configuredEndpoint,
true,
true,
_AppConfiguration.ApplicationName,
15000,
new UserIdentity(new AnonymousIdentityToken()),
null);
session.SessionClosing += OnSessionClosingHandler;
private static void OnSessionClosingHandler(object sender, EventArgs e)
{ //have inserted breakpoint to debug the execution
//some handling - not available for instance
}
I am manually closing the connected Ua Server and expecting that the SessionClosing event will be raised and it calls the OnSessionClosingHandler method.
However, I have observed the method is not executed. Is it a correct way that I have implemented above? Please guide me.
Thanks,
Jayesh
Mr. Jayesh Thamke
Student - Master of Science
Electrical Engineering and Information Technology - Automation
Hochschule Darmstadt, Darmstadt, Germany
The moderators of this forum have good knowledge of the OPC UA standard but not necessarily of the implementations.
Thank you for replay Mr. Deiretsbacher,
Ok I will put this as issue at GitHub .NETStandard Library OPC Foundation repo.
I would like to know whether it is the right approach for detecting SessionClosing event?
Thank you,
Mr. Jayesh Thamke
Student - Master of Science
Electrical Engineering and Information Technology - Automation
Hochschule Darmstadt, Darmstadt, Germany
1 Guest(s)