FACT++  1.0
void MainWindow::on_fMcpStartRun_clicked ( )
privateslot

Definition at line 172 of file MainWindow.cc.

References Dim::SendCommand(), time, and type.

173 {
174  struct Value
175  {
176  uint64_t time;
177  uint64_t nevts;
178  char type[];
179  };
180 
181  const int idx1 = fMcpRunType->currentIndex();
182  const int idx2 = fMcpTime->currentIndex();
183  const int idx3 = fMcpNumEvents->currentIndex();
184 
185  const int64_t v2 = fMcpTime->itemData(idx2).toInt();
186  const int64_t v3 = fMcpNumEvents->itemData(idx3).toInt();
187 
188  const QString rt = fMcpRunType->itemData(idx1).toString();
189 
190  const size_t len = sizeof(Value)+rt.length()+1;
191 
192  char *buf = new char[len];
193 
194  Value *val = reinterpret_cast<Value*>(buf);
195 
196  val->time = v2;
197  val->nevts = v3;
198 
199  strcpy(val->type, rt.toStdString().c_str());
200 
201  Dim::SendCommand("MCP/START", buf, len);
202 
203  delete [] buf;
204 
205 }
bool SendCommand(const std::string &command)
Definition: Dim.h:26
int type
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
Definition: smartfact.txt:92

+ Here is the call graph for this function: