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

Definition at line 1849 of file drivectrl.cc.

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

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

1850  {
1851  if (!CheckEventSize(evt.GetSize(), "SendSdo", 6+8))
1852  return T::kSM_FatalError;
1853 
1854  const uint16_t node = evt.Get<uint16_t>();
1855  const uint16_t index = evt.Get<uint16_t>(2);
1856  const uint16_t subidx = evt.Get<uint16_t>(4);
1857  const uint64_t value = evt.Get<uint64_t>(6);
1858 
1859  if (node!=1 && node!=3)
1860  {
1861  T::Error("Node id must be 1 (az) or 3 (zd).");
1862  return T::GetCurrentState();
1863  }
1864 
1865  if (subidx>0xff)
1866  {
1867  T::Error("Subindex must not be larger than 255.");
1868  return T::GetCurrentState();
1869  }
1870 
1871  fDrive.SendSdo(node, index, subidx, value);
1872 
1873  return T::GetCurrentState();
1874  }
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: