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

Definition at line 1021 of file fadctrl.cc.

References EventImp::Get(), EventImp::GetSize(), i, and EventImp::Ptr().

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

1022  {
1023  if (!CheckEventSize(evt.GetSize(), "SetIgnoreSlots", 5))
1024  return T::kSM_FatalError;
1025 
1026  const int16_t *slot = evt.Ptr<int16_t>();
1027  const bool block = evt.Get<uint8_t>(4);
1028 
1029  if (slot[0]<0 || slot[1]>39 || slot[0]>slot[1])
1030  {
1031  T::Warn("Slot out of range.");
1032  return T::GetCurrentState();
1033  }
1034 
1035  for (int i=slot[0]; i<=slot[1]; i++)
1036  SetIgnore(i, block);
1037 
1038  return T::GetCurrentState();
1039  }
int i
Definition: db_dim_client.c:21
T Get(size_t offset=0) const
Definition: EventImp.h:66
void SetIgnore(int i, bool b) const
bool CheckEventSize(size_t has, const char *name, size_t size)
Definition: fadctrl.cc:562
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: