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

Definition at line 1846 of file ftmctrl.cc.

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

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

1847  {
1848  if (!CheckEventSize(evt.GetSize(), "SetClockFrequency", 2))
1849  return T::kSM_FatalError;
1850 
1851  const map<uint16_t,array<uint64_t, 8>>::const_iterator it =
1852  fClockCondSetup.find(evt.GetUShort());
1853 
1854  if (it==fClockCondSetup.end())
1855  {
1856  T::Warn("SetClockFrequency - Frequency not supported.");
1857  return T::GetCurrentState();
1858  }
1859 
1860  if (!fFTM.SetClockRegister(it->second.data()))
1861  T::Warn("SetClockFrequency - Register values out of range.");
1862 
1863  return T::GetCurrentState();
1864  }
bool CheckEventSize(size_t has, const char *name, size_t size)
Definition: ftmctrl.cc:1467
uint16_t GetUShort() const
Definition: EventImp.h:92
map< uint16_t, array< uint64_t, 8 > > fClockCondSetup
Definition: ftmctrl.cc:2459
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: