FACT++  1.0
template<class T , class S >
int StateMachineDrive< T, S >::TakeTPoint ( const EventImp evt)
inlineprivate

Definition at line 1096 of file cosyctrl.cc.

References EventImp::Get(), EventImp::GetSize(), mag, EventImp::Ptr(), and Dim::SendCommand().

Referenced by StateMachineDrive< T, S >::StateMachineDrive().

1097  {
1098  if (evt.GetSize()<=4)
1099  {
1100  ostringstream msg;
1101  msg << "TakePoint - Received event has " << evt.GetSize() << " bytes, but expected at least 5.";
1102  T::Fatal(msg);
1103  return T::kSM_FatalError;
1104  }
1105 
1106  const float mag = evt.Get<float>();
1107  const char *ptr = evt.Ptr<char>(4);
1108 
1109  string src(ptr);
1110 
1111  while (src.find_first_of(' ')!=string::npos)
1112  src.erase(src.find_first_of(' '), 1);
1113 
1114  SendCommand("TPOIN "+src+" "+to_string(mag));;
1115 
1116  return T::GetCurrentState();
1117  }
float mag
Definition: HeadersSQM.h:89
int SendCommand(const string &str)
Definition: cosyctrl.cc:843
T Get(size_t offset=0) const
Definition: EventImp.h:66
const T * Ptr(size_t offset=0) const
Definition: EventImp.h:74
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: