projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch segment storage from single vector to vector of arrays
[pulseview.git]
/
pv
/
data
/
analogsegment.hpp
diff --git
a/pv/data/analogsegment.hpp
b/pv/data/analogsegment.hpp
index 6ab7a50b899aa311b8e26a8e4e767d7ea2ee9cdb..52d37a76c3e67fdfba671ae46030e390940e1355 100644
(file)
--- a/
pv/data/analogsegment.hpp
+++ b/
pv/data/analogsegment.hpp
@@
-14,12
+14,11
@@
* 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_ANALOGS
NAPSHO
T_HPP
-#define PULSEVIEW_PV_DATA_ANALOGS
NAPSHO
T_HPP
+#ifndef PULSEVIEW_PV_DATA_ANALOGS
EGMEN
T_HPP
+#define PULSEVIEW_PV_DATA_ANALOGS
EGMEN
T_HPP
#include "segment.hpp"
#include "segment.hpp"
@@
-33,6
+32,12
@@
struct Basic;
namespace pv {
namespace data {
namespace pv {
namespace data {
+typedef struct {
+ uint64_t sample_index, chunk_num, chunk_offs;
+ uint8_t* chunk;
+ float* value;
+} SegmentAnalogDataIterator;
+
class AnalogSegment : public Segment
{
public:
class AnalogSegment : public Segment
{
public:
@@
-66,7
+71,7
@@
private:
static const uint64_t EnvelopeDataUnit;
public:
static const uint64_t EnvelopeDataUnit;
public:
- AnalogSegment(uint64_t samplerate
, uint64_t expected_num_samples = 0
);
+ AnalogSegment(uint64_t samplerate);
virtual ~AnalogSegment();
virtual ~AnalogSegment();
@@
-76,11
+81,15
@@
public:
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;
+ SegmentAnalogDataIterator* begin_sample_iteration(uint64_t start) const;
+ void continue_sample_iteration(SegmentAnalogDataIterator* it, uint64_t increase) const;
+ void end_sample_iteration(SegmentAnalogDataIterator* it) const;
+
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();
void append_payload_to_envelope_levels();
@@
-93,4
+102,4
@@
private:
} // namespace data
} // namespace pv
} // namespace data
} // namespace pv
-#endif // PULSEVIEW_PV_DATA_ANALOGS
NAPSHO
T_HPP
+#endif // PULSEVIEW_PV_DATA_ANALOGS
EGMEN
T_HPP