projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change QApplication::translate to tr, removing deprecated UTF8 parameter
[pulseview.git]
/
pv
/
data
/
analogsnapshot.h
diff --git
a/pv/data/analogsnapshot.h
b/pv/data/analogsnapshot.h
index 8eec2797f1a4aa77b5945ccf31f2eef926600dce..b60c2ce72580c4fdf51d84940f0e836216759bae 100644
(file)
--- a/
pv/data/analogsnapshot.h
+++ b/
pv/data/analogsnapshot.h
@@
-26,18
+26,31
@@
#include <utility>
#include <vector>
#include <utility>
#include <vector>
+namespace AnalogSnapshotTest {
+class Basic;
+}
+
namespace pv {
namespace data {
class AnalogSnapshot : public Snapshot
{
namespace pv {
namespace data {
class AnalogSnapshot : public Snapshot
{
-p
rivate
:
+p
ublic
:
struct EnvelopeSample
{
float min;
float max;
};
struct EnvelopeSample
{
float min;
float max;
};
+ struct EnvelopeSection
+ {
+ uint64_t start;
+ unsigned int scale;
+ uint64_t length;
+ EnvelopeSample *samples;
+ };
+
+private:
struct Envelope
{
uint64_t length;
struct Envelope
{
uint64_t length;
@@
-53,15
+66,19
@@
private:
static const uint64_t EnvelopeDataUnit;
public:
static const uint64_t EnvelopeDataUnit;
public:
- AnalogSnapshot(
const sr_datafeed_analog &analog
);
+ AnalogSnapshot(
uint64_t expected_num_samples = 0
);
virtual ~AnalogSnapshot();
virtual ~AnalogSnapshot();
- void append_payload(const sr_datafeed_analog &analog);
+ void append_interleaved_samples(const float *data,
+ size_t sample_count, size_t stride);
const float* get_samples(int64_t start_sample,
int64_t end_sample) const;
const float* get_samples(int64_t start_sample,
int64_t end_sample) const;
+ void get_envelope_section(EnvelopeSection &s,
+ uint64_t start, uint64_t end, float min_length) const;
+
private:
void reallocate_envelope(Envelope &l);
private:
void reallocate_envelope(Envelope &l);
@@
-69,6
+86,10
@@
private:
private:
struct Envelope _envelope_levels[ScaleStepCount];
private:
struct Envelope _envelope_levels[ScaleStepCount];
+
+ friend class AnalogSnapshotTest::Basic;
+};
+
} // namespace data
} // namespace pv
} // namespace data
} // namespace pv