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

Definition at line 1822 of file drivectrl.cc.

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

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

1823  {
1824  // FIXME: STop telescope
1825  if (!CheckEventSize(evt.GetSize(), "RequestSdo", 6))
1826  return T::kSM_FatalError;
1827 
1828  const uint16_t node = evt.Get<uint16_t>();
1829  const uint16_t index = evt.Get<uint16_t>(2);
1830  const uint16_t subidx = evt.Get<uint16_t>(4);
1831 
1832  if (node!=1 && node !=3)
1833  {
1834  T::Error("Node id must be 1 (az) or 3 (zd).");
1835  return T::GetCurrentState();
1836  }
1837 
1838  if (subidx>0xff)
1839  {
1840  T::Error("Subindex must not be larger than 255.");
1841  return T::GetCurrentState();
1842  }
1843 
1844  fDrive.RequestSdo(node, index, subidx);
1845 
1846  return T::GetCurrentState();
1847  }
Definition: dns.c:26
Error()
Definition: HeadersFTM.h:197
T Get(size_t offset=0) const
Definition: EventImp.h:66
bool CheckEventSize(size_t has, const char *name, size_t size)
Definition: cosyctrl.cc:804
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: