FACT++  1.0
int StateMachineFeedback::Start ( const EventImp evt)
inlineprivate

Definition at line 1022 of file feedback.cc.

References EventImp::GetFloat(), EventImp::GetSize(), BIAS::kNumChannels, and Feedback::State::kWaitingForData.

Referenced by StateMachineFeedback().

1023  {
1024  if (!CheckEventSize(evt.GetSize(), "Start", 4))
1025  return kSM_FatalError;
1026 
1027  /*
1028  if (fDimBias.state()==BIAS::State::kRamping)
1029  {
1030  Warn("Feedback can not be started when biasctrl is in state Ramping.");
1031  return GetCurrentState();
1032  }*/
1033 
1034  fUserOffset = evt.GetFloat()-1.1;
1035  fVoltageReduction = 0;
1036 
1037  fCursorCur = 0;
1038 
1039  fCurrentsAvg.assign(BIAS::kNumChannels, 0);
1040  fCurrentsRms.assign(BIAS::kNumChannels, 0);
1041 
1042  ostringstream out;
1043  out << "Starting feedback with an offset of " << fUserOffset << "V";
1044  Message(out);
1045 
1046  if (fMoonMode>0)
1047  Message("Moon mode "+to_string(fMoonMode)+" turned on.");
1048 
1050  }
float GetFloat() const
Definition: EventImp.h:97
bool CheckEventSize(size_t has, const char *name, size_t size)
Definition: feedback.cc:103
Fatal error: stop program.
vector< int64_t > fCurrentsAvg
Definition: feedback.cc:49
vector< int64_t > fCurrentsRms
Definition: feedback.cc:50
double fVoltageReduction
Definition: feedback.cc:68
int Message(const std::string &str)
Definition: MessageImp.h:46
uint16_t fMoonMode
Definition: feedback.cc:77
virtual size_t GetSize() const
Definition: EventImp.h:55

+ Here is the call graph for this function:

+ Here is the caller graph for this function: