FACT++  1.0
void ConnectionBias::HandleSyncTimer ( int  counter,
const bs::error_code &  error 
)
inlineprivate

Definition at line 554 of file biasctrl.cc.

References Error(), and str.

Referenced by ScheduleSync().

555  {
556  if (error==ba::error::basic_errors::operation_aborted)
557  {
558  if (fIsInitializing==1)
559  Warn("Synchronization aborted...");
560  // case 0 and 2 should not happen
561  return;
562  }
563 
564  if (error)
565  {
566  ostringstream str;
567  str << "Synchronization timer: " << error.message() << " (" << error << ")";// << endl;
568  Error(str);
569 
570  CloseImp(-1);
571  return;
572  }
573 
574  if (!is_open())
575  {
576  Warn("Synchronization in progress, but disconnected.");
577  return;
578  }
579 
580  ostringstream msg;
581  msg << "Synchronization time expired (" << counter << ")";
582  Info(msg);
583 
584  if (fIsInitializing)
585  {
586  PostMessage("\0", 1);
587 
588  if (counter==2)
589  {
590  Error("Synchronization attempt timed out.");
591  CloseImp(-1);
592  return;
593  }
594 
595  ScheduleSync(counter+1);
596  return;
597  }
598 
599  Info("Synchronisation successfull.");
600  }
void PostMessage(const void *msg, size_t s=0)
void CloseImp(int64_t delay=0)
char str[80]
Definition: test_client.c:7
int Error(const std::string &str)
Definition: MessageImp.h:49
int Warn(const std::string &str)
Definition: MessageImp.h:48
int fIsInitializing
Definition: biasctrl.cc:59
int counter
Definition: db_dim_client.c:19
int Info(const std::string &str)
Definition: MessageImp.h:47
void ScheduleSync(int counter=0)
Definition: biasctrl.cc:602

+ Here is the call graph for this function:

+ Here is the caller graph for this function: