FACT++  1.0
void ConnectionBias::ReadAllChannels ( bool  special = false)
inline

Definition at line 1124 of file biasctrl.cc.

References buffer, data, Error(), BIAS::kCmdRead, kNumChannels, and BIAS::kUpdate.

Referenced by StateMachineBias< T, S >::StateMachineBias().

1125  {
1126  if (!special && fWaitingForAnswer>=0)
1127  {
1128  ostringstream msg;
1129  msg << "ReadAllChannels - Answer on last command (id=" << fWaitingForAnswer << ") not yet received.";
1130  Error(msg);
1131  return;
1132  }
1133 
1134  vector<char> data;
1135  data.reserve(kNumChannels*3);
1136 
1137  for (int ch=0; ch<kNumChannels; ch++)
1138  {
1139  const vector<char> cmd = GetCmd(kCmdRead, ch);
1140  data.insert(data.end(), cmd.begin(), cmd.end());
1141  }
1142 
1144 
1145  PostMessage(data);
1146  AsyncRead(ba::buffer(special ? fBufferUpdate : fBuffer, kNumChannels*3),
1147  special ? kUpdate : kCmdRead, fSendCounter);
1148 
1149  if (!special)
1151  }
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)
vector< uint8_t > fBufferUpdate
Definition: biasctrl.cc:40
int64_t fSendCounter
Definition: biasctrl.cc:48
int Error(const std::string &str)
Definition: MessageImp.h:49
int buffer[BUFFSIZE]
Definition: db_dim_client.c:14
float data[4 *1440]
int fWaitingForAnswer
Definition: biasctrl.cc:61

+ Here is the call graph for this function:

+ Here is the caller graph for this function: