ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
acquisitionworker.h
Go to the documentation of this file.
1
26
27#ifndef ACQUISITIONWORKER_H
28#define ACQUISITIONWORKER_H
29
30#include <peak/data_stream/peak_data_stream.hpp>
31
32#include <QObject>
33
34class AcquisitionWorker : public QObject
35{
36 Q_OBJECT
37
38public:
39 AcquisitionWorker() = default;
40 ~AcquisitionWorker() override = default;
41
42 void Start();
43 void Stop();
44 void Pause();
45 void Resume();
46 void SetDataStream(std::shared_ptr<peak::core::DataStream>);
53
55
56private:
57 std::shared_ptr<peak::core::DataStream> m_dataStream;
58
59 unsigned int m_frameCounter{};
60 unsigned int m_errorCounter{};
61
63
64signals:
65 void bufferReceived(std::shared_ptr<peak::core::Buffer> buffer);
66 void counterChanged(const unsigned int, const unsigned int);
67 void finished();
68};
69
70Q_DECLARE_METATYPE(std::shared_ptr<peak::core::Buffer>)
71
72#endif // ACQUISITIONWORKER_H
Definition acquisitionworker.h:41
WorkerState currentState()
Definition acquisitionworker.cpp:37
void Resume()
Definition acquisitionworker.cpp:96
unsigned int m_frameCounter
Definition acquisitionworker.h:62
AcquisitionWorker()=default
std::shared_ptr< peak::core::DataStream > m_dataStream
Definition acquisitionworker.h:56
void counterChanged(const unsigned int, const unsigned int)
void SetDataStream(std::shared_ptr< peak::core::DataStream >)
void bufferReceived(std::shared_ptr< peak::core::Buffer > buffer)
unsigned int m_errorCounter
Definition acquisitionworker.h:63
WorkerState
Definition acquisitionworker.h:48
@ IDLE
Definition acquisitionworker.h:49
@ PAUSED
Definition acquisitionworker.h:51
@ RUNNING
Definition acquisitionworker.h:50
WorkerState m_state
Definition acquisitionworker.h:62
void Pause()
Definition acquisitionworker.cpp:91
~AcquisitionWorker() override=default