FACT++  1.0
void ConnectionBias::SetAllChannels ( const vector< uint16_t > &  dac,
bool  special = false 
)
inlineprivate

Definition at line 718 of file biasctrl.cc.

References buffer, data, BIAS::kCmdChannelSet, kNumChannels, and BIAS::kResetChannels.

719  {
720  if (fIsDummyMode)
721  {
722  PrintCommandDac(dac);
723  return;
724  }
725 
726  vector<char> data;
727  data.reserve(kNumChannels*3);
728 
729  for (int ch=0; ch<kNumChannels; ch++)
730  {
731  // FIXME: dac[ch] += calib_offset
732  const vector<char> cmd = GetCmd(kCmdChannelSet, ch, dac[ch]);
733  data.insert(data.end(), cmd.begin(), cmd.end());
734 
735  fDacCommand[ch] = dac[ch];
736  }
737 
739 
740  PostMessage(data);
741  AsyncRead(ba::buffer(special ? fBuffer : fBufferRamp, kNumChannels*3),
743 
744  if (special)
746  }
void PrintCommandDac(const vector< uint16_t > &dac)
Definition: biasctrl.cc:696
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
vector< uint8_t > fBufferRamp
Definition: biasctrl.cc:39
void AsyncRead(const boost::asio::mutable_buffers_1 buffers, int type=0, int counter=0)
bool fIsDummyMode
Definition: biasctrl.cc:43
int64_t fSendCounter
Definition: biasctrl.cc:48
int buffer[BUFFSIZE]
Definition: db_dim_client.c:14
float data[4 *1440]
int fWaitingForAnswer
Definition: biasctrl.cc:61
vector< uint16_t > fDacCommand
Definition: biasctrl.cc:100