projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make member variable underscores a suffix instead of a prefix
[pulseview.git]
/
pv
/
data
/
analogsnapshot.h
diff --git
a/pv/data/analogsnapshot.h
b/pv/data/analogsnapshot.h
index 59c43187788e4c231dc85d652f0cb849ed5f7a91..9e2e782ae124838c336da09e55b96d3680582c0a 100644
(file)
--- a/
pv/data/analogsnapshot.h
+++ b/
pv/data/analogsnapshot.h
@@
-27,7
+27,7
@@
#include <vector>
namespace AnalogSnapshotTest {
#include <vector>
namespace AnalogSnapshotTest {
-
class
Basic;
+
struct
Basic;
}
namespace pv {
}
namespace pv {
@@
-35,13
+35,22
@@
namespace data {
class AnalogSnapshot : public Snapshot
{
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;
@@
-57,24
+66,28
@@
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);
void append_payload_to_envelope_levels();
private:
private:
void reallocate_envelope(Envelope &l);
void append_payload_to_envelope_levels();
private:
- struct Envelope
_envelope_levels
[ScaleStepCount];
+ struct Envelope
envelope_levels_
[ScaleStepCount];
- friend
class
AnalogSnapshotTest::Basic;
+ friend
struct
AnalogSnapshotTest::Basic;
};
} // namespace data
};
} // namespace data