BioSignalPi  v2
ecgcapture.h
Go to the documentation of this file.
1 #ifndef ECGCAPTURE_H
2 #define ECGCAPTURE_H
3 
4 #include <QObject>
5 #include <QVector>
6 #include <QPointF>
7 
24 class EcgCapture: QObject
25 {
26  Q_OBJECT
27 
28 public:
29 
35  };
36 
37  enum Frequency {
41  };
42 
43  enum leadFormat {
46  };
47 
48  EcgCapture();
61  void start();
67  void stop();
68  void testDevice();
69 
70  const QVector<double> readFrame();
71 
72 private:
73  void spiInit();
74  void csEnable();
75  void csDisable();
76  void enableRegisterWrite();
77  bool setReg(QByteArray);
78  double ecgVoltageConversion(int ADCDecimal, leadFormat format);
79  double respVoltageConversion(int);
80 
81  int test;
82  OperatingMode mode;
83  leadFormat leadMode;
84  QVector<QPointF> privateSamples;
85 };
88 #endif // ECGCAPTURE_H
const QVector< double > readFrame()
Reads a single frame.
Definition: ecgcapture.cpp:400
void testDevice()
Method used to test if the device is working properly.
Definition: ecgcapture.cpp:257
Responsible for communication with ADAS.
Definition: ecgcapture.h:24
void start()
Start capturing frames from the ADAS1000.
Definition: ecgcapture.cpp:353
void init(OperatingMode, Frequency)
Initiate the device by configuring the registers depending on operating mode and sampling frequency...
Definition: ecgcapture.cpp:26
void stop()
stop capture
Definition: ecgcapture.cpp:362