FACT++  1.0
template<class T>
int StateMachineFAD< T >::EnableSlot ( const EventImp evt,
bool  enable 
)
inlineprivate

Definition at line 1240 of file fadctrl.cc.

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

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

1241  {
1242  if (!CheckEventSize(evt.GetSize(), "EnableSlot", 2))
1243  return T::kSM_FatalError;
1244 
1245  const int16_t slot = evt.GetShort();
1246 
1247  const BoardList::iterator it = GetSlot(slot);
1248  if (it==fBoards.end())
1249  return T::GetCurrentState();
1250 
1251  EnableConnection(it->second, enable);
1252  ConnectSlot(it->first, enable ? it->second->GetEndpoint() : tcp::endpoint());
1253 
1254  return T::GetCurrentState();
1255  }
void ConnectSlot(unsigned int i, const tcp::endpoint &addr)
BoardList fBoards
Definition: fadctrl.cc:555
void EnableConnection(ConnectionFAD *ptr, bool enable=true)
Definition: fadctrl.cc:1208
const BoardList::iterator GetSlot(uint16_t slot)
Definition: fadctrl.cc:936
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: