FACT++  1.0
bool ConnectionBias::ExpertGlobalSetDac ( uint16_t  dac)
inline

Definition at line 1277 of file biasctrl.cc.

References buffer, Error(), and BIAS::kCmdGlobalSet.

1278  {
1279  if (fWaitingForAnswer>=0)
1280  {
1281  ostringstream msg;
1282  msg << "ExpertGlobalSetDac - Answer on last command (id=" << fWaitingForAnswer << ") not yet received.";
1283  Error(msg);
1284  return false;
1285  }
1286 
1287  if (!CheckDac(dac))
1288  return false;
1289 
1290  if (fGlobalDacCmd>=0)
1291  {
1292  Error("ExpertGlobalSetDac - Still waiting for previous answer to 'GlobalSet'");
1293  return false;
1294  }
1295 
1296  fGlobalDacCmd = dac;
1297 
1298  ostringstream msg;
1299  msg << "EXPERT MODE: Sending 'GlobalSet' (DAC=" << dac << ")";
1300  Warn(msg);
1301 
1302  PostMessage(GetCmd(kCmdGlobalSet, 0, dac));
1305 
1306  return true;
1307  }
vector< uint8_t > fBuffer
Definition: biasctrl.cc:38
void PostMessage(const void *msg, size_t s=0)
vector< char > GetCmd(uint16_t board, uint16_t channel, Command_t cmd, uint16_t dac=0)
Definition: biasctrl.cc:106
int16_t fGlobalDacCmd
Definition: biasctrl.cc:50
void AsyncRead(const boost::asio::mutable_buffers_1 buffers, int type=0, int counter=0)
int64_t fSendCounter
Definition: biasctrl.cc:48
int Error(const std::string &str)
Definition: MessageImp.h:49
int Warn(const std::string &str)
Definition: MessageImp.h:48
int buffer[BUFFSIZE]
Definition: db_dim_client.c:14
bool CheckDac(uint16_t dac)
Definition: biasctrl.cc:890
int fWaitingForAnswer
Definition: biasctrl.cc:61

+ Here is the call graph for this function: