AnsweredAssumed Answered

Raise event when server connection lost?

Question asked by andrew_Inwood on May 4, 2015
Latest reply on Jun 15, 2015 by gregor

I'm trying to set up an event that I can use to determine when the PI Server has disconnected (or more usefully, when I have lost the connection to the PI Server, for whatever reason).


Playing around in the SDK, I found this:



ServerDisconnectEvents _ServerDisconnect = new ServerDisconnectEvents();


public void SetServerWatcher()


     _ServerDisconnect.OnDisconnect += new _DServerDisconnectEvents_OnDisconnectEventHandler(disconnect_OnDisconnect);


void disconnect_OnDisconnect(Server pServer)


     throw new NotImplementedException();



Now, ignoring the fact that it is not immediately obvious how to set this to watch a given server (or does the SDK automatically sign-up to all connected servers?), I presume the auto-generaed code for the delegate means that this is not actually implemented?







Message was edited by: Andrew Inwood Having problems with the syntax editor, that chopped-out a bit of my code!