RTXI  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
system_control_panel.cpp
Go to the documentation of this file.
1 /*
2  The Real-Time eXperiment Interface (RTXI)
3  Copyright (C) 2011 Georgia Institute of Technology, University of Utah, Weill Cornell Medical College
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  */
19 
20 #include <debug.h>
21 #include <daq.h>
22 #include <math.h>
23 #include <rt.h>
24 #include <system_control.h>
25 #include <system_control_panel.h>
26 #include <main_window.h>
27 
28 struct find_daq_t
29 {
30  int index;
32 };
33 
34 static void findDAQDevice(DAQ::Device *dev,void *arg)
35 {
36  struct find_daq_t *info = static_cast<struct find_daq_t *>(arg);
37  if(!info->index)
38  info->device = dev;
39  info->index--;
40 }
41 
42 static void buildDAQDeviceList(DAQ::Device *dev,void *arg)
43 {
44  QComboBox *deviceList = static_cast<QComboBox *>(arg);
45  deviceList->addItem(QString::fromStdString(dev->getName()));
46 }
47 
48 SystemControlPanel::SystemControlPanel(QWidget *parent) : QWidget(parent)
49 {
50 
51  setWhatsThis(
52  "<p><b>System Control Panel:</b><br>This control panel allows you to configure "
53  "the channels on your DAQ card. RTXI automatically detects the number and types "
54  "of channels that are available. You should set the \"Scale\" of the channel "
55  "to be the inverse of the gain that is applied to the signal through the "
56  "combination of hardware and software that you are using. To acquire data from "
57  "a channel, you must set it to be Active using the toggle button. Any parameter "
58  "settings such as the \"Range\" or \"Scale\" must be set by clicking the \"Apply\" "
59  "button.<br><br> The \"Thread\" tab allows you to set the period for real-time "
60  "execution. You must click \"Apply\" to change this setting and propagate it "
61  "to other user modules such as the Data Recorder. Custom user modules can "
62  "execute special code when the real-time period is changed using the update(PERIOD) "
63  "flag.</p>");
64  rateUpdate = false;
65 
66  // Make Mdi
67  subWindow = new QMdiSubWindow;
68  subWindow->setWindowIcon(QIcon("/usr/local/share/rtxi/RTXI-widget-icon.png"));
69  subWindow->setAttribute(Qt::WA_DeleteOnClose);
70  subWindow->setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint |
71  Qt::WindowMinimizeButtonHint);
73 
74  // Create main layout
75  QGridLayout *layout = new QGridLayout;
76 
77  // Create child widget and layout for device block
78  deviceGroup = new QGroupBox(tr("DAQ Setup"));
79  QGridLayout *deviceLayout = new QGridLayout;
80 
81  // Create elements for device block
82  deviceLayout->addWidget(new QLabel(tr("Device:")), 0, 0);
83 
84  deviceList = new QComboBox;
85  deviceLayout->addWidget(deviceList, 0, 1, 1, 5);
86  DAQ::Manager::getInstance()->foreachDevice(buildDAQDeviceList,deviceList);
87  QObject::connect(deviceList,SIGNAL(activated(int)),this,SLOT(updateDevice(void)));
88 
89  // Frequency box
90  deviceLayout->addWidget(new QLabel(tr("Frequency:")), 1, 0);
91  freqEdit = new QLineEdit;
92  deviceLayout->addWidget(freqEdit, 1, 1);
93  freqEdit->setText("1000");
94  QObject::connect(freqEdit,SIGNAL(textChanged(const QString &)),this,SLOT(updatePeriod(void)));
95  freqUnitList = new QComboBox;
96  freqUnitList->setFixedWidth(50);
97  freqUnitList->addItem(" Hz");
98  freqUnitList->addItem("kHz");
99  deviceLayout->addWidget(freqUnitList, 1, 2);
100  QObject::connect(freqUnitList,SIGNAL(activated(int)),this,SLOT(updatePeriod(void)));
101 
102  // Period box
103  deviceLayout->addWidget(new QLabel(tr("Period:")), 1, 3);
104  periodEdit = new QLineEdit;
105  deviceLayout->addWidget(periodEdit, 1, 4);
106  QObject::connect(periodEdit,SIGNAL(textChanged(const QString &)),this,SLOT(updateFreq(void)));
107  periodUnitList = new QComboBox;
108  deviceLayout->addWidget(periodUnitList, 1, 5);
109  periodUnitList->setFixedWidth(50);
110  periodUnitList->addItem(" s");
111  periodUnitList->addItem("ms");
112  periodUnitList->addItem("us");
113  periodUnitList->addItem("ns");
114  QObject::connect(periodUnitList,SIGNAL(activated(int)),this,SLOT(updateFreq(void)));
115  updatePeriod();
116 
117  // Assign layout to child widget
118  deviceGroup->setLayout(deviceLayout);
119 
120  // Create child widget and layout for Analog block
121  analogGroup = new QGroupBox(tr("Analog Channels"));
122  QGridLayout *analogLayout = new QGridLayout;
123 
124  // Create elements for analog block
125  analogLayout->addWidget(new QLabel(tr("Channel:")), 1, 0);
126 
127  analogSubdeviceList = new QComboBox;
128  analogSubdeviceList->addItem("Input");
129  analogSubdeviceList->addItem("Output");
130  QObject::connect(analogSubdeviceList,SIGNAL(activated(int)),this,SLOT(updateDevice(void)));
131  analogLayout->addWidget(analogSubdeviceList, 1, 1);
132 
133  analogChannelList = new QComboBox;
134  QObject::connect(analogChannelList,SIGNAL(activated(int)),this,SLOT(display(void)));
135  analogLayout->addWidget(analogChannelList, 1, 2);
136 
137  analogActiveButton = new QPushButton("Active");
138  analogActiveButton->setCheckable(true);
139  analogLayout->addWidget(analogActiveButton, 1, 3);
140 
141  analogLayout->addWidget(new QLabel(tr("Range:")), 2, 0, 1, 1);
142  analogRangeList = new QComboBox;
143  analogLayout->addWidget(analogRangeList, 2, 1, 1, 2);
144 
145  analogReferenceList = new QComboBox;
146  analogLayout->addWidget(analogReferenceList, 2, 3, 1, 2);
147 
148  analogLayout->addWidget(new QLabel(tr("Scale:")), 3, 0);
149  analogGainEdit = new QLineEdit;
150  analogGainEdit->setAlignment(Qt::AlignRight);
151  analogLayout->addWidget(analogGainEdit, 3, 1);
152 
153  analogUnitPrefixList = new QComboBox;
154  analogUnitPrefixList->addItem("yotta-");
155  analogUnitPrefixList->addItem("zetta-");
156  analogUnitPrefixList->addItem("exa-");
157  analogUnitPrefixList->addItem("peta-");
158  analogUnitPrefixList->addItem("tera-");
159  analogUnitPrefixList->addItem("giga-");
160  analogUnitPrefixList->addItem("mega-");
161  analogUnitPrefixList->addItem("kilo-");
162  analogUnitPrefixList->addItem("");
163  analogUnitPrefixList->addItem("milli-");
164  analogUnitPrefixList->addItem("micro-");
165  analogUnitPrefixList->addItem("nano-");
166  analogUnitPrefixList->addItem("pico-");
167  analogUnitPrefixList->addItem("femto-");
168  analogUnitPrefixList->addItem("atto-");
169  analogUnitPrefixList->addItem("zepto-");
170  analogUnitPrefixList->addItem("yocto-");
171  analogLayout->addWidget(analogUnitPrefixList, 3, 2);
172 
173  analogUnitList = new QComboBox;
174  analogLayout->addWidget(analogUnitList, 3, 3);
175  analogLayout->addWidget(new QLabel(tr(" / Volt")), 3, 4);
176 
177  analogLayout->addWidget(new QLabel(tr("Offset:")), 4, 0);
178  analogZeroOffsetEdit = new QLineEdit;
179  analogZeroOffsetEdit->setText("0");
180  analogZeroOffsetEdit->setAlignment(Qt::AlignRight);
181  analogLayout->addWidget(analogZeroOffsetEdit, 4, 1);
182 
183  // Prefixes for offset
184  analogUnitPrefixList2 = new QComboBox;
185  analogUnitPrefixList2->addItem("yotta-");
186  analogUnitPrefixList2->addItem("zetta-");
187  analogUnitPrefixList2->addItem("exa-");
188  analogUnitPrefixList2->addItem("peta-");
189  analogUnitPrefixList2->addItem("tera-");
190  analogUnitPrefixList2->addItem("giga-");
191  analogUnitPrefixList2->addItem("mega-");
192  analogUnitPrefixList2->addItem("kilo-");
193  analogUnitPrefixList2->addItem("");
194  analogUnitPrefixList2->addItem("milli-");
195  analogUnitPrefixList2->addItem("micro-");
196  analogUnitPrefixList2->addItem("nano-");
197  analogUnitPrefixList2->addItem("pico-");
198  analogUnitPrefixList2->addItem("femto-");
199  analogUnitPrefixList2->addItem("atto-");
200  analogUnitPrefixList2->addItem("zepto-");
201  analogUnitPrefixList2->addItem("yocto-");
202  analogLayout->addWidget(analogUnitPrefixList2, 4, 2, 1, 1);
203  analogLayout->addWidget(new QLabel(tr(" Volt/Amps")), 4, 3);
204 
205  analogLayout->addWidget(new QLabel(tr("Downsample:")), 5, 0);
206  analogDownsampleList = new QComboBox;
207  analogDownsampleList->addItem("1");
208  analogDownsampleList->addItem("2");
209  analogDownsampleList->addItem("4");
210  analogDownsampleList->addItem("6");
211  analogDownsampleList->addItem("8");
212  analogDownsampleList->addItem("10");
213  analogLayout->addWidget(analogDownsampleList, 5, 1);
214 
215  // Assign layout to child widget
216  analogGroup->setLayout(analogLayout);
217 
218  // Create child widget and layout for digital block
219  digitalGroup = new QGroupBox(tr("Digital I/O"));
220  QGridLayout *digitalLayout = new QGridLayout;
221 
222  // Create elements for digital block
223  digitalLayout->addWidget(new QLabel(tr("Channel:")), 1, 0, 1, 1);
224 
225  digitalSubdeviceList = new QComboBox;
226  digitalSubdeviceList->addItem("I/O");
227  QObject::connect(digitalSubdeviceList,SIGNAL(activated(int)),this,SLOT(updateDevice(void)));
228  digitalLayout->addWidget(digitalSubdeviceList, 1, 1, 1, 1);
229 
230  digitalChannelList = new QComboBox;
231  QObject::connect(digitalChannelList,SIGNAL(activated(int)),this,SLOT(display(void)));
232  digitalLayout->addWidget(digitalChannelList, 1, 2, 1, 1);
233 
234  digitalDirectionList = new QComboBox;
235  digitalDirectionList->addItem("Input");
236  digitalDirectionList->addItem("Output");
237  digitalLayout->addWidget(digitalDirectionList, 1, 3, 1, 1);
238 
239  digitalActiveButton = new QPushButton("Active");
240  digitalActiveButton->setCheckable(true);
241  digitalLayout->addWidget(digitalActiveButton, 1, 4, 1, 1);
242 
243  // Assign layout to child widget
244  digitalGroup->setLayout(digitalLayout);
245 
246  // Create child widget
247  buttonGroup = new QGroupBox;
248  QHBoxLayout *buttonLayout = new QHBoxLayout;
249 
250  // Create elements for buttons
251  QPushButton *applyButton = new QPushButton("Apply");
252  QObject::connect(applyButton,SIGNAL(released(void)),this,SLOT(apply(void)));
253  buttonLayout->addWidget(applyButton);
254  QPushButton *cancelButton = new QPushButton("Close");
255  QObject::connect(cancelButton,SIGNAL(released(void)),subWindow,SLOT(close()));
256  buttonLayout->addWidget(cancelButton);
257 
258  // Assign layout to child widget
259  buttonGroup->setLayout(buttonLayout);
260 
261  // Attach child widget to parent widget
262  layout->addWidget(deviceGroup, 1, 0);
263  layout->addWidget(analogGroup, 2, 0);
264  layout->addWidget(digitalGroup, 3, 0);
265  layout->addWidget(buttonGroup, 4, 0);
266 
267  // Attach layout to widget
268  setLayout(layout);
269  setWindowTitle("System Control Panel");
270 
271  // Set layout to Mdi
272  subWindow->setWidget(this);
273  subWindow->setFixedSize(subWindow->minimumSizeHint());
274 
275  // Updates settings for device and builds lists of channels
276  updateDevice();
277  display();
278  show();
279 }
280 
282 {
284 }
285 
287 {
288  // Apply channel settings
289  DAQ::Device *dev;
290  {
291  struct find_daq_t info = { deviceList->currentIndex(), 0, };
292  DAQ::Manager::getInstance()->foreachDevice(findDAQDevice, &info);
293  dev = info.device;
294  }
295 
296  if(dev)
297  {
298  DAQ::index_t a_chan = analogChannelList->currentIndex();
299  DAQ::type_t a_type = static_cast<DAQ::type_t>(analogSubdeviceList->currentIndex());
300  double a_gain = analogGainEdit->text().toDouble()*pow(10,-3*(analogUnitPrefixList->currentIndex()-8));
301  double a_zerooffset = analogZeroOffsetEdit->text().toDouble()*pow(10,-3*(analogUnitPrefixList2->currentIndex()-8));
302 
303  dev->setChannelActive(a_type,a_chan,analogActiveButton->isChecked());
304  dev->setAnalogGain(a_type,a_chan,a_gain);
305  dev->setAnalogZeroOffset(a_type,a_chan,a_zerooffset);
306  dev->setAnalogRange(a_type,a_chan,analogRangeList->currentIndex());
307  dev->setAnalogReference(a_type,a_chan,analogReferenceList->currentIndex());
308  dev->setAnalogUnits(a_type,a_chan,analogUnitList->currentIndex());
309  dev->setAnalogDownsample(a_type,a_chan,(analogDownsampleList->itemData(analogDownsampleList->currentIndex(),Qt::DisplayRole)).toInt());
310  dev->setAnalogCounter(a_type,a_chan);
311 
312  DAQ::index_t d_chan = digitalChannelList->currentIndex();
313  DAQ::type_t d_type = static_cast<DAQ::type_t>(digitalSubdeviceList->currentIndex()+DAQ::DIO);
314  DAQ::direction_t d_dir = static_cast<DAQ::direction_t>(digitalDirectionList->currentIndex());
315 
316  // Write digital channel configuration to DAQ
317  dev->setChannelActive(d_type,d_chan,digitalActiveButton->isChecked());
318  if(d_type == DAQ::DIO)
319  dev->setDigitalDirection(d_chan,d_dir);
320  }
321 
322  // Apply thread settings
323  double period = periodEdit->text().toDouble();
324  period *= pow(10,3*(3-periodUnitList->currentIndex()));
325  RT::System::getInstance()->setPeriod(static_cast<long long>(period));
326  display();
327 }
328 
330 {
331  DAQ::Device *dev;
332  DAQ::type_t type;
333  {
334  struct find_daq_t info = { deviceList->currentIndex(), 0, };
335  DAQ::Manager::getInstance()->foreachDevice(findDAQDevice,&info);
336  dev = info.device;
337  }
338 
339  if(!dev)
340  return;
341 
342  analogChannelList->clear();
343  digitalChannelList->clear();
344 
345  type = static_cast<DAQ::type_t>(analogSubdeviceList->currentIndex());
346  for(size_t i=0; i<dev->getChannelCount(type); ++i)
347  {
348  analogChannelList->addItem(QString::number(i));
349  }
350 
351  type = static_cast<DAQ::type_t>(digitalSubdeviceList->currentIndex()+DAQ::DIO);
352  for(size_t i=0; i<dev->getChannelCount(type); ++i)
353  {
354  digitalChannelList->addItem(QString::number(i));
355  }
356 
357  display();
358 }
359 
361 {
362  int i = 0;
363  double freq;
364  double period;
365 
366  /* This is to prevent recursive updates, not to provide mutual exclusion */
367  if(rateUpdate)
368  return;
369  else
370  rateUpdate = true;
371 
372  /* Determine the Period */
373  period = periodEdit->text().toDouble();
374  period *= pow(10,-3*periodUnitList->currentIndex());
375  freq = 1 / period;
376 
377  if(freq > 1000)
378  {
379  freq /= 1000;
380  i = 1;
381  }
382 
383  freqEdit->setText(QString::number(freq));
384  freqUnitList->setCurrentIndex(i);
385  rateUpdate = false;
386 }
387 
389 {
390  int i = 0;
391  double freq, period;
392 
393  if(rateUpdate)
394  return;
395  else
396  rateUpdate = true;
397 
398  // Determine the Frequency
399  freq = freqEdit->text().toDouble();
400  if(freqUnitList->currentIndex())
401  freq *= 1000;
402 
403  period = 1 / freq;
404 
405  while(period < .001 && (i < 4))
406  {
407  period *= 1000;
408  i++;
409  }
410 
411  periodEdit->setText(QString::number(period));
412  periodUnitList->setCurrentIndex(i);
413  rateUpdate = false;
414 }
415 
417 {
418  // Display channel info
419  DAQ::Device *dev;
420  {
421  struct find_daq_t info = {deviceList->currentIndex(), 0, };
422  DAQ::Manager::getInstance()->foreachDevice(findDAQDevice,&info);
423  dev = info.device;
424  }
425 
426  // Check to make sure DAQ is of the right type
427  // if not, disable functions, else set
428  if(!dev)
429  {
430  deviceList->setEnabled(false);
431  analogSubdeviceList->setEnabled(false);
432  digitalSubdeviceList->setEnabled(false);
433  }
434 
435  if(!dev || !analogChannelList->count())
436  {
437  analogActiveButton->setChecked(false);
438  analogActiveButton->setEnabled(false);
439  analogActiveButton->setChecked(false);
440  analogChannelList->setEnabled(false);
441  analogRangeList->setEnabled(false);
442  analogDownsampleList->setEnabled(false);
443  analogReferenceList->setEnabled(false);
444  analogGainEdit->setEnabled(false);
445  analogZeroOffsetEdit->setEnabled(false);
446  analogUnitPrefixList->setEnabled(false);
447  analogUnitPrefixList2->setEnabled(false);
448  analogUnitList->setEnabled(false);
449 
450  }
451  else
452  {
453  DAQ::type_t type = static_cast<DAQ::type_t>(analogSubdeviceList->currentIndex());
454  DAQ::index_t chan = static_cast<DAQ::index_t>(analogChannelList->currentIndex());
455 
456  // Downsample is only enabled for AI
457  if(type == DAQ::AI)
458  analogDownsampleList->setEnabled(true);
459  else
460  analogDownsampleList->setEnabled(false);
461 
462  analogActiveButton->setEnabled(true);
463  analogChannelList->setEnabled(true);
464  analogRangeList->setEnabled(true);
465  analogReferenceList->setEnabled(true);
466  analogGainEdit->setEnabled(true);
467  analogZeroOffsetEdit->setEnabled(true);
468  analogUnitPrefixList->setEnabled(true);
469  analogUnitPrefixList2->setEnabled(true);
470  analogUnitList->setEnabled(true);
471 
472  analogRangeList->clear();
473  for(size_t i=0; i < dev->getAnalogRangeCount(type,chan); ++i)
474  analogRangeList->addItem(QString::fromStdString(dev->getAnalogRangeString(type,chan,i)));
475  analogReferenceList->clear();
476  for(size_t i=0; i < dev->getAnalogReferenceCount(type,chan); ++i)
477  analogReferenceList->addItem(QString::fromStdString(dev->getAnalogReferenceString(type,chan,i)));
478  analogUnitList->clear();
479  for(size_t i=0; i < dev->getAnalogUnitsCount(type,chan); ++i)
480  {
481  analogUnitList->addItem(QString::fromStdString(dev->getAnalogUnitsString(type,chan,i)));
482  }
483  analogActiveButton->setChecked(dev->getChannelActive(type,chan));
484  analogRangeList->setCurrentIndex(dev->getAnalogRange(type,chan));
485  analogDownsampleList->setCurrentIndex(analogDownsampleList->findData(QVariant::fromValue(dev->getAnalogDownsample(type,chan)),Qt::DisplayRole));
486  analogReferenceList->setCurrentIndex(dev->getAnalogReference(type,chan));
487  analogUnitList->setCurrentIndex(dev->getAnalogUnits(type,chan));
488 
489  // Determine the correct prefix for analog gain
490  int i = 8;
491  double tmp;
492  bool sign = true;
493  if(dev->getAnalogGain(type,chan) < 0.0)
494  sign = false; // Negative value
495  tmp = fabs(dev->getAnalogGain(type,chan));
496  if(tmp != 0.0)
497  while(((tmp >= 1000)&&(i > 0))||((tmp < 1)&&(i < 16)))
498  {
499  if(tmp >= 1000)
500  {
501  tmp /= 1000;
502  i--;
503  }
504  else
505  {
506  tmp *= 1000;
507  i++;
508  }
509  }
510  if(sign)
511  analogGainEdit->setText(QString::number(tmp));
512  else
513  analogGainEdit->setText(QString::number(-tmp));
514 
515  // Set gain prefix to computed index
516  analogUnitPrefixList->setCurrentIndex(i);
517 
518  // Determine the correct prefix for analog offset
519  i = 8;
520  sign = true;
521  if(dev->getAnalogZeroOffset(type,chan) < 0.0)
522  sign = false; // Negative value
523  tmp = fabs(dev->getAnalogZeroOffset(type,chan));
524  if(tmp != 0.0)
525  while(((tmp >= 1000) && (i > 0)) || ((tmp < 1) && (i < 16)))
526  {
527  if(tmp >= 1000)
528  {
529  tmp /= 1000;
530  i--;
531  }
532  else
533  {
534  tmp *= 1000;
535  i++;
536  }
537  }
538  if(sign)
539  analogZeroOffsetEdit->setText(QString::number(tmp));
540  else
541  analogZeroOffsetEdit->setText(QString::number(-tmp));
542 
543  // Set offset prefix to computed index
544  analogUnitPrefixList2->setCurrentIndex(i);
545  }
546 
547  if(!dev || !digitalChannelList->count())
548  {
549  digitalActiveButton->setChecked(false);
550  digitalActiveButton->setEnabled(false);
551  digitalChannelList->setEnabled(false);
552  digitalDirectionList->setEnabled(false);
553  }
554  else
555  {
556  DAQ::type_t type = static_cast<DAQ::type_t>(digitalSubdeviceList->currentIndex()+DAQ::DIO);
557  DAQ::index_t chan = static_cast<DAQ::index_t>(digitalChannelList->currentIndex());
558 
559  digitalActiveButton->setEnabled(true);
560  digitalChannelList->setEnabled(true);
561  if(type == DAQ::DIO)
562  digitalDirectionList->setEnabled(true);
563  else
564  digitalDirectionList->setEnabled(false);
565 
566  digitalActiveButton->setChecked(dev->getChannelActive(type,chan));
567 
568  if(type == DAQ::DIO)
569  {
570  digitalDirectionList->setEnabled(true);
571  digitalDirectionList->setCurrentIndex(dev->getDigitalDirection(chan));
572  }
573  else
574  digitalDirectionList->setEnabled(false);
575  }
576 
577  // Display thread info
578  int i = 3;
579  long long tmp = RT::System::getInstance()->getPeriod();
580  while((tmp >= 1000)&&(i))
581  {
582  tmp /= 1000;
583  i--;
584  }
585  periodEdit->setText(QString::number(static_cast<unsigned long>(tmp)));
586  periodUnitList->setCurrentIndex(i);
587  updateFreq();
588 }
589 
591 {
592  if(event->getName() == Event::RT_POSTPERIOD_EVENT)
593  {
594  display();
595  }
596 
598  event->getName() == Event::SETTINGS_OBJECT_REMOVE_EVENT)
599  {
600  deviceList->clear();
601  DAQ::Manager::getInstance()->foreachDevice(buildDAQDeviceList,deviceList);
602  updateDevice();
603  }
604 }
static MainWindow * getInstance(void)
long long getPeriod(void) const
Definition: rt.h:392
QComboBox * digitalChannelList
QComboBox * analogSubdeviceList
virtual direction_t getDigitalDirection(index_t index) const =0
virtual int setChannelActive(type_t type, index_t index, bool state)=0
virtual double getAnalogZeroOffset(type_t type, index_t index) const =0
Definition: daq.h:42
unsigned long index_t
Definition: daq.h:49
virtual index_t getAnalogUnits(type_t type, index_t index) const =0
virtual ~SystemControlPanel(void)
virtual size_t getAnalogRangeCount(type_t type, index_t index) const =0
virtual int setAnalogUnits(type_t type, index_t index, index_t units)=0
const char * SETTINGS_OBJECT_INSERT_EVENT
Definition: event.cpp:38
virtual size_t getAnalogDownsample(type_t type, index_t index) const =0
virtual index_t getAnalogRange(type_t type, index_t index) const =0
double arg(const complex _z)
Definition: complex.h:133
QLineEdit * analogZeroOffsetEdit
static SystemControl * getInstance(void)
QComboBox * analogUnitPrefixList
virtual size_t getAnalogUnitsCount(type_t type, index_t index) const =0
virtual int setAnalogRange(type_t type, index_t index, index_t range)=0
void receiveEvent(const Event::Object *)
void foreachDevice(void(*callback)(Device *, void *), void *param)
Definition: daq.cpp:43
DAQ::Device * device
QPushButton * digitalActiveButton
QMdiSubWindow * subWindow
QComboBox * digitalDirectionList
direction_t
Definition: daq.h:57
Definition: daq.h:40
virtual bool getChannelActive(type_t type, index_t index) const =0
void createMdi(QMdiSubWindow *)
virtual int setAnalogZeroOffset(type_t type, index_t index, double offset)=0
virtual int setAnalogGain(type_t type, index_t index, double gain)=0
std::string getName(void) const
Definition: io.h:214
const char * SETTINGS_OBJECT_REMOVE_EVENT
Definition: event.cpp:39
virtual index_t getAnalogReference(type_t type, index_t index) const =0
static Manager * getInstance(void)
Definition: daq.cpp:129
const char * RT_POSTPERIOD_EVENT
Definition: event.cpp:26
virtual size_t getAnalogReferenceCount(type_t type, index_t index) const =0
virtual std::string getAnalogReferenceString(type_t type, index_t index, index_t reference) const =0
QPushButton * analogActiveButton
QComboBox * analogUnitPrefixList2
int setPeriod(long long period)
Definition: rt.cpp:188
virtual int setDigitalDirection(index_t index, direction_t direction)=0
QComboBox * analogDownsampleList
virtual std::string getAnalogRangeString(type_t type, index_t index, index_t range) const =0
static System * getInstance(void)
Definition: rt.cpp:361
QComboBox * analogReferenceList
type_t
Definition: daq.h:38
QComboBox * digitalSubdeviceList
virtual int setAnalogCounter(type_t type, index_t index)=0
virtual size_t getChannelCount(type_t type) const =0
virtual double getAnalogGain(type_t type, index_t index) const =0
virtual int setAnalogDownsample(type_t type, index_t index, size_t downsample)=0
virtual std::string getAnalogUnitsString(type_t type, index_t index, index_t units) const =0
virtual int setAnalogReference(type_t type, index_t index, index_t reference)=0
const char * getName(void) const
Definition: event.h:136
void removeControlPanel(SystemControlPanel *)