FACT++  1.0
int StateMachineRateScan::HandleFtmStateChange ( )
inlineprivate

Definition at line 277 of file ratescan.cc.

References data, FTM::State::kConfigured1, RateScan::State::kConfiguring, RateScan::State::kInProgress, RateScan::State::kPaused, Dim::SendCommandNB(), DimState::state(), and Time::UnixTime().

Referenced by StateMachineRateScan().

278  {
279  // ftmctrl connected to FTM
281  return GetCurrentState();
282 
284  return GetCurrentState();
285 
286  const int32_t data[2] = { -1, fThresholdMin };
287 
288  Dim::SendCommandNB("FTM_CONTROL/RESET_CONFIGURE");
290 
292  fCounter = -2;
293 
294  const Time now;
295  fStartTime = trunc(now.UnixTime());
296 
297  /*
298  ofstream fout("ratescan.txt", ios::app);
299  fout << "# ----- " << now << " (" << fStartTime << ") -----\n";
300  fout << "# Command: " << fCommand << '\n';
301  fout << "# Reference: ";
302  switch (fReference)
303  {
304  case kCamera: fout << "Camera"; break;
305  case kBoard: fout << "Board #" << fReferenceIdx; break;
306  case kPatch: fout << "Patch #" << fReferenceIdx; break;
307  }
308  fout << '\n';
309  fout << "# -----" << endl;
310  */
311 
312  ostringstream msg;
313  msg << "Rate scan " << now << "(" << fStartTime << ") from " << fThresholdMin << " to ";
314  msg << fThresholdMax << " in steps of " << fThresholdStep;
315  msg << " with a resolution of " << fResolution ;
316  msg << " and max-wait " << fCounterMax ;
317  msg << " started.";
318  Message(msg);
319 
320  if (!fAutoPause)
322 
323  fAutoPause = false;
324 
326  }
uint64_t fStartTime
Definition: ratescan.cc:63
int GetCurrentState() const
return the current state of the machine
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
const int32_t & state() const
Definition: DimState.h:80
double UnixTime() const
Definition: Time.cc:195
void SendCommandNB(const std::string &command)
Definition: Dim.h:30
float data[4 *1440]
int Message(const std::string &str)
Definition: MessageImp.h:46
DimDescribedState fDimFTM
Definition: ratescan.cc:42

+ Here is the call graph for this function:

+ Here is the caller graph for this function: