FACT++  1.0
void ConnectionBias::HandleRampTimer ( const bs::error_code &  error)
inlineprivate

Definition at line 803 of file biasctrl.cc.

References Error(), and str.

Referenced by ScheduleRampStep().

804  {
805  if (error==ba::error::basic_errors::operation_aborted)
806  {
807  Warn("Ramping aborted...");
808  fIsRamping = false;
809  return;
810  }
811 
812  if (error)
813  {
814  ostringstream str;
815  str << "Ramping timer: " << error.message() << " (" << error << ")";// << endl;
816  Error(str);
817 
818  fIsRamping = false;
819  CloseImp(-1);
820  return;
821  }
822 
823  if (!is_open())
824  {
825  Warn("Ramping in progress, but disconnected.");
826  fIsRamping = false;
827  return;
828  }
829 
830  if (!fIsRamping)
831  {
832  Error("Ramp handler called although no ramping in progress.");
833  return;
834  }
835 
836  // Check whether the deadline has passed. We compare the deadline
837  // against the current time since a new asynchronous operation
838  // may have moved the deadline before this actor had a chance
839  // to run.
840  if (fRampTimer.expires_at() > ba::deadline_timer::traits_type::now())
841  return;
842 
844  }
void CloseImp(int64_t delay=0)
char str[80]
Definition: test_client.c:7
bool RampOneStep()
Definition: biasctrl.cc:759
int Error(const std::string &str)
Definition: MessageImp.h:49
int Warn(const std::string &str)
Definition: MessageImp.h:48
bool fIsRamping
Definition: biasctrl.cc:60
boost::asio::deadline_timer fRampTimer
Definition: biasctrl.cc:35

+ Here is the call graph for this function:

+ Here is the caller graph for this function: