projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
manual: install manual conversion result files generated by cmake
[pulseview.git]
/
pv
/
data
/
analogsegment.hpp
diff --git
a/pv/data/analogsegment.hpp
b/pv/data/analogsegment.hpp
index 1a91b8b7a411eaeca048f1a3065e1d4045c8e923..df25f0b74a669109663a08e0df4dbeff3b5a7641 100644
(file)
--- a/
pv/data/analogsegment.hpp
+++ b/
pv/data/analogsegment.hpp
@@
-14,8
+14,7
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PULSEVIEW_PV_DATA_ANALOGSEGMENT_HPP
*/
#ifndef PULSEVIEW_PV_DATA_ANALOGSEGMENT_HPP
@@
-26,6
+25,10
@@
#include <utility>
#include <vector>
#include <utility>
#include <vector>
+#include <QObject>
+
+using std::pair;
+
namespace AnalogSegmentTest {
struct Basic;
}
namespace AnalogSegmentTest {
struct Basic;
}
@@
-33,8
+36,12
@@
struct Basic;
namespace pv {
namespace data {
namespace pv {
namespace data {
+class Analog;
+
class AnalogSegment : public Segment
{
class AnalogSegment : public Segment
{
+ Q_OBJECT
+
public:
struct EnvelopeSample
{
public:
struct EnvelopeSample
{
@@
-66,27
+73,34
@@
private:
static const uint64_t EnvelopeDataUnit;
public:
static const uint64_t EnvelopeDataUnit;
public:
- AnalogSegment(
uint64_t samplerate, uint64_t expected_num_samples = 0
);
+ AnalogSegment(
Analog& owner, uint32_t segment_id, uint64_t samplerate
);
virtual ~AnalogSegment();
void append_interleaved_samples(const float *data,
size_t sample_count, size_t stride);
virtual ~AnalogSegment();
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;
+ void get_samples(int64_t start_sample, int64_t end_sample, float* dest) const;
+
+ const pair<float, float> get_min_max() const;
+
+ float* get_iterator_value_ptr(SegmentDataIterator* it);
void get_envelope_section(EnvelopeSection &s,
uint64_t start, uint64_t end, float min_length) const;
private:
void get_envelope_section(EnvelopeSection &s,
uint64_t start, uint64_t end, float min_length) const;
private:
- void reallocate_envelope(Envelope &
l
);
+ void reallocate_envelope(Envelope &
e
);
void append_payload_to_envelope_levels();
private:
void append_payload_to_envelope_levels();
private:
+ Analog& owner_;
+
struct Envelope envelope_levels_[ScaleStepCount];
struct Envelope envelope_levels_[ScaleStepCount];
+ float min_value_, max_value_;
+
friend struct AnalogSegmentTest::Basic;
};
friend struct AnalogSegmentTest::Basic;
};