-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBladeRfDevicesManager.hpp
More file actions
executable file
·55 lines (40 loc) · 1.04 KB
/
BladeRfDevicesManager.hpp
File metadata and controls
executable file
·55 lines (40 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#include <QObject>
#include <QMap>
class BladeRfDeviceController;
class BladeRfDevicesManager : public QObject
{
Q_OBJECT
struct Device
{
Device() = default;
Device(BladeRfDeviceController* handle)
: handle(handle) {}
BladeRfDeviceController* handle = nullptr;
bool captureState = false;
};
signals:
void initialized();
void deinitialized();
void errorOccured();
void started();
void stopped();
public:
explicit BladeRfDevicesManager(QObject* parent = nullptr);
~BladeRfDevicesManager();
QList<BladeRfDeviceController*> devices() const;
BladeRfDeviceController* device(SdrDeviceType type) const;
public slots:
void init();
void startCapture(const SessionRadioSettings& config);
void stopCapture();
private slots:
void onDeviceOpened();
void onDeviceClosed();
void onDeviceError();
void onCaptureStarted();
void onCaptureStopped();
private:
QMap<SdrDeviceType, Device> mDevices;
int mDevicesCount = 0;
};