예제 #1
0
파일: Pinger.cs 프로젝트: MrrGoodCat/API-1
 /// <summary>
 /// Ping module.
 /// If module doesn't response, Agent thinks that module is down and sets connectivity to Error
 /// </summary>
 /// <param name="sender">
 /// sender object
 /// </param>
 /// <param name="e">
 /// event object
 /// </param>
 private void OnPing(object sender, ElapsedEventArgs e)
 {
     try
     {
         mPingService.Ping(); // ping the module
         AgentSingleton.Instance.SetModuleStatus(ModuleName, ModuleStatus.NoError, ModuleStatusSources.Connectivity, ProcessId);
     }
     catch (Exception)
     {
         // IsRunning = false;
         // _timerClock.Enabled = false;
         AgentSingleton.Instance.SetModuleStatus(ModuleName, ModuleStatus.Error, ModuleStatusSources.Connectivity, ProcessId);
     }
 }
 public void Ping()
 {
     pingable.Ping();
 }