FACT++  1.0
void ConnectionDrive::HandleSdo ( const uint8_t &  node,
const uint16_t &  idx,
const uint8_t &  subidx,
const uint32_t &  val,
const Time tv 
)
inlineprivate

Definition at line 587 of file drivectrl.cc.

References str.

589  {
590  if (fVerbosity>0)
591  {
592  ostringstream out;
593  out << hex;
594  out << "SDO[" << int(node) << "] " << idx << "/" << int(subidx) << ": " << val << dec;
595  Out() << out.str() << endl;
596  }
597 
598  switch (idx)
599  {
600  case kReqArmed:
601  //fArmed = val==1;
602  return;
603 
604  case kReqErrStat:
605  {
606  fErrCode[node/2] = (val>>8);
608  }
609  return;
610 
611  case kReqSoftVer:
612  //fSoftVersion = val;
613  return;
614 
615  case kReqKeepAlive:
616  // Do not display, this is used for CheckConnection
617  fIsInitialized[node/2] = true;
618  return;
619 
620  case kReqVel:
621  //fVel = val;
622  return;
623 
624  case kReqPos:
625  switch (subidx)
626  {
627  case 0:
628  fPdoPos1[node/2] = val;
629  fPdoTime1[node/2] = tv;
630  fHasChangedPos1[node/2] = true;
631  return;
632  case 1:
633  fPdoPos2[node/2] = val;
634  fPdoTime2[node/2] = tv;
635  fHasChangedPos2[node/2] = true;
636  return;
637  }
638  break;
639 
640  case kReqVelRes:
641  fVelRes[node/2] = val;
642  return;
643 
644  case kReqVelMax:
645  fVelMax[node/2] = val;
646  return;
647 
648  case kReqPosRes:
649  fPosRes[node/2] = val;
650  return;
651  }
652 
653  ostringstream str;
654  str << "HandleSDO: Idx=0x"<< hex << idx << "/" << (int)subidx;
655  str << ", val=0x" << val;
656  Warn(str);
657  }
Time fPdoTime1[2]
Definition: drivectrl.cc:741
Definition: dns.c:26
bool fHasChangedPos2[2]
Definition: drivectrl.cc:746
char str[80]
Definition: test_client.c:7
uint32_t fPosRes[2]
Definition: drivectrl.cc:583
Time fPdoTime2[2]
Definition: drivectrl.cc:743
std::ostream & Out()
Definition: Connection.h:51
int32_t fPdoPos2[2]
Definition: drivectrl.cc:739
bool fHasChangedPos1[2]
Definition: drivectrl.cc:745
void LogErrorCode(uint32_t node)
Definition: drivectrl.cc:953
int32_t fPdoPos1[2]
Definition: drivectrl.cc:738
int Warn(const std::string &str)
Definition: MessageImp.h:48
uint32_t fVelRes[2]
Definition: drivectrl.cc:581
uint16_t fVerbosity
Definition: drivectrl.cc:484
uint32_t fErrCode[2]
Definition: drivectrl.cc:585
bool fIsInitialized[2]
Definition: drivectrl.cc:1152
uint32_t fVelMax[2]
Definition: drivectrl.cc:582