-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDataFeeder.h
More file actions
44 lines (33 loc) · 1.19 KB
/
DataFeeder.h
File metadata and controls
44 lines (33 loc) · 1.19 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
#ifndef DATA_FEEDER
#define DATA_FEEDER
#include <libsigrokcxx/libsigrokcxx.hpp>
class wxEvtHandler;
class DataFeeder
{
public:
enum SourceType {
NetworkAnalyzer,
AnalogTimeSeries,
DigitalTimeSeries
};
DataFeeder(wxEvtHandler *handler, SourceType sourceType);
~DataFeeder() = default;
void data_feed_callback(std::shared_ptr<sigrok::Device> device, std::shared_ptr<sigrok::Packet> packet);
protected:
void data_feed_callback_sa(std::shared_ptr<sigrok::Device> device, std::shared_ptr<sigrok::Packet> packet);
void data_feed_callback_na(std::shared_ptr<sigrok::Device> device, std::shared_ptr<sigrok::Packet> packet);
void data_feed_callback_ats(std::shared_ptr<sigrok::Device> device, std::shared_ptr<sigrok::Packet> packet);
void data_feed_callback_dts(std::shared_ptr<sigrok::Device> device, std::shared_ptr<sigrok::Packet> packet);
void clear_x_trace();
void clear_y_trace();
void clear_z_trace();
const SourceType sourceType_;
unsigned int sweep_points_x;
unsigned int sweep_points_y;
unsigned int sweep_points_z;
double *x_vals;
float *y_vals;
double *z_vals;
wxEvtHandler *evtHandler_;
};
#endif