public void EventProcessingLoop() { startSemaphore.WaitOne(); while (!stopped) { // Have a timer that signals the semaphore also callbackSemaphore.WaitOne(); if (!stopped && !startupError) { EHPMError result = SessionManager.Session.SessionProcess(); int iSeconds = 0; if (result == EHPMError.ConnectionLost) { do { logger.Warning("The connection to the Hansoft server was lost. A reconnection attempt will be made in 10 seconds."); Thread.Sleep(10000); iSeconds += 10; }while (!SessionManager.Instance.Reconnect()); logger.Information("The connection to the Hansoft server was restored after " + iSeconds + " seconds."); } else if (result != EHPMError.NoError) { logger.Warning("SessionProcess returned an error code: " + result.ToString()); } } else { SessionManager.Instance.CloseSession(); } } }
/// <summary> /// This function is internal to the Jean for Hansoft framework and should not be called directly. /// </summary> /// <param name="_Error"></param> public override void On_ProcessError(EHPMError _Error) { if (ProcessError != null) { ProcessError(this, new ProcessErrorEventArgs(_Error)); } }
public override void On_ProcessError(EHPMError _Error) { Console.Write("On_ProcessError: " + HPMSdkSession.ErrorToStr(_Error) + "\r\n"); m_Program.m_bBrokenConnection = true; }
public override void On_ProcessError(EHPMError error) { }
internal ProcessErrorEventArgs(EHPMError error) { this.error = error; }
/// <summary> /// This function is internal to the Jean for Hansoft framework and should not be called directly. /// </summary> /// <param name="_Error"></param> public override void On_ProcessError(EHPMError _Error) { if (ProcessError != null) ProcessError(this, new ProcessErrorEventArgs(_Error)); }
public override void On_ProcessError(EHPMError error) { Logger.Error("On_ProcessError: " + HPMSdkSession.ErrorToStr(error)); }