FACT++  1.0
bool ConnectionFAD::CmdSetRoi ( int8_t  addr,
uint16_t  val 
)
inline

Definition at line 452 of file fadctrl.cc.

References i, kCmdWriteExecute, kCmdWriteRoi, kMaxRoiAddr, and kMaxRoiValue.

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

453  {
454  if (val>FAD::kMaxRoiValue)
455  return false;
456 
457  if (addr<0)
458  {
459  for (unsigned int i=0; i<=FAD::kMaxRoiAddr; i++)
460  {
461  fTargetRoi[i] = val;
462  PostCmd(FAD::kCmdWriteRoi + i, val);
463  }
465  return true;
466  }
467 
468  if (uint8_t(addr)>FAD::kMaxRoiAddr)
469  return false;
470 
471  fTargetRoi[addr] = val;
472 
473  PostCmd(FAD::kCmdWriteRoi + addr, val);
475  return true;
476  }
vector< uint16_t > fTargetRoi
Definition: fadctrl.cc:51
int i
Definition: db_dim_client.c:21
void PostCmd(std::vector< uint16_t > cmd)
Definition: fadctrl.cc:308

+ Here is the caller graph for this function: