FACT++  1.0
bool ConnectionBias::ExpertChannelSetDac ( uint16_t  ch,
uint16_t  dac 
)
inline

Definition at line 1245 of file biasctrl.cc.

References buffer, Error(), BIAS::kCmdChannelSet, and BIAS::kExpertChannelSet.

1246  {
1247  if (fWaitingForAnswer>=0)
1248  {
1249  ostringstream msg;
1250  msg << "ExpertChannelSetDac - Answer on last command (id=" << fWaitingForAnswer << ") not yet received.";
1251  Error(msg);
1252  return false;
1253  }
1254 
1255  if (!CheckDac(dac))
1256  return false;
1257 
1258  fDacCommand[ch] = dac;
1259 
1260  ostringstream msg;
1261  msg << "EXPERT MODE: Sending 'ChannelSet' (set ch " << ch << " to DAC=" << dac << ")";
1262  Warn(msg);
1263 
1264  // FIXME: dac += calib_offset
1265  PostMessage(GetCmd(kCmdChannelSet, ch, dac));
1268 
1269  return true;
1270  }
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
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
vector< uint16_t > fDacCommand
Definition: biasctrl.cc:100

+ Here is the call graph for this function: