FACT++  1.0
template<class T>
int StateMachineFAD< T >::SetEventTimeoutSec ( const EventImp evt)
inlineprivate

Definition at line 814 of file fadctrl.cc.

References Error(), EventImp::GetShort(), and EventImp::GetSize().

Referenced by StateMachineFAD< T >::StateMachineFAD().

815  {
816  if (!CheckEventSize(evt.GetSize(), "SetEventTimeoutSec", 2))
817  return T::kSM_FatalError;
818 
819  const int16_t sec = evt.GetShort();
820 
821  if (sec<=0)
822  {
823  ostringstream msg;
824  msg << hex << "Value " << sec << " out of range.";
825  T::Error(msg);
826  return T::GetCurrentState();
827  }
828 
829  SetEventTimeout(sec);
830 
831  return T::GetCurrentState();
832  }
void SetEventTimeout(uint16_t to) const
Error()
Definition: HeadersFTM.h:197
int16_t GetShort() const
Definition: EventImp.h:91
bool CheckEventSize(size_t has, const char *name, size_t size)
Definition: fadctrl.cc:562
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: