microCOR Lab SDK  1.7
 All Classes Files Functions Enumerations Enumerator Modules
microCORLab.h
Go to the documentation of this file.
1 /* Copyright (C) 2015 Infron Ltd. - All Rights Reserved
2  *
3  * Redistribution of this file without permission is prohibited.
4  *
5  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
6  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
8  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
9  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
10  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
11  * IN THE SOFTWARE.
12  */
13 
22 #ifndef MICROCORLAB_H
23 #define MICROCORLAB_H
24 
25 #include <QObject>
26 #include "microCORLabGlobal.h"
27 #include "States.h"
28 #include "Logger.h"
29 
30 
31 class microCORLabPrivate;
32 
33 
34 
35 
36 class MICROCORLABSHARED_EXPORT microCORLab : public QObject
37 {
38  Q_OBJECT
39 
40 public:
42  DefaultReferenceMode = 0,
44 
45  ReferenceModeMin = DefaultReferenceMode,
46  ReferenceModeMax = EkgReferenceMode
47  };
48 
49 public:
50  explicit microCORLab(QObject *parent = 0);
51  virtual ~microCORLab();
52 
53  const UsbDevState & usbDevState() const;
54  const GatewayState & gatewayState() const;
55  const TerminalState & terminalState() const;
56  const TerminalRunningState & terminalRunningState() const;
57  const BatteryState & batteryState() const;
58  const SamplingState & samplingState() const;
59 
60  bool setSerialNo(const QString & serialNo);
61  const QString & serialNo() const;
62 
63  void setTriggerEnabled(bool enabled);
64  bool isTriggerEnabled() const;
65 
66  void setReferenceMode(ReferenceMode rm);
67  ReferenceMode referenceMode() const;
68  static QString referenceMode(int id);
69 
70  double getBatteryValue() const;
71 
72  bool setResolution(uchar res);
73  uchar resolution() const;
74 
75  void setAutoShutdown(int minutes);
76  int autoShutdown() const;
77 
78  void shutdownDevices(bool closeTerm);
79 
80  bool setFirmware(const QString & fileName);
81  const QString & firmware() const;
82 
83  double firmwareUpdateProgress() const;
84 
85  QString firmwareVersion() const;
86  QString bootloaderVersion() const;
87 
88  quint8 terminalType() const;
89  static QString terminalType(quint8 dt);
90 
91  Logger & logger();
92 
93  static bool isNaN(double value);
94 
95 public slots:
96  bool start();
97  void stop();
98 
99 signals:
100  void dataAcquired(double * d, size_t sz, bool trigger);
101  void dataInterrupted();
102 
103  void batteryLevelChanged(double);
104 
105  void firmwareUpdateProgressChanged(double);
106  void terminalTypeChanged(qint8);
107 
108 private:
109  microCORLabPrivate * const d_ptr;
110  Q_DECLARE_PRIVATE(microCORLab)
111  Q_DISABLE_COPY(microCORLab)
112 };
113 
114 #endif // MICROCORLAB_H
115 
116 
117  // end of microCORLabCPPApi
Log class.
Definition: Logger.h:32
The Gateway State class.
Definition: States.h:233
The Terminal State class.
Definition: States.h:247
microCORLab device management class
Definition: microCORLab.h:36
The Sampling State class.
Definition: States.h:261
The Battery State class.
Definition: States.h:55
ReferenceMode
Hardware reference mode.
Definition: microCORLab.h:41
The Usb Device State class.
Definition: States.h:111
The Terminal Running State class.
Definition: States.h:329
Ekg reference mode.
Definition: microCORLab.h:43