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

Definition at line 978 of file feedback.cc.

References EventImp::GetSize(), and EventImp::GetUShort().

Referenced by StateMachineFeedback().

979  {
980  if (!CheckEventSize(evt.GetSize(), "SetMoonMode", 2))
981  return kSM_FatalError;
982 
983  fMoonMode = evt.GetUShort();
984  if (fMoonMode>3)
985  fMoonMode=3;
986 
987  Info("New moon mode: "+to_string(fMoonMode));
988 
989  return GetCurrentState();
990  }
int GetCurrentState() const
return the current state of the machine
bool CheckEventSize(size_t has, const char *name, size_t size)
Definition: feedback.cc:103
Fatal error: stop program.
uint16_t GetUShort() const
Definition: EventImp.h:92
int Info(const std::string &str)
Definition: MessageImp.h:47
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: