X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fsegment.cpp;h=9b18c6499a1b32cf03362dc67e835f410acb9159;hp=8745e8740dc582f8a53d33ae7ed8e81d36a87398;hb=85a702806a15852f3684645dffdc38cb30274481;hpb=4d08da71e288c7b7be6c0455c0bb6834d4b318fd diff --git a/pv/data/segment.cpp b/pv/data/segment.cpp index 8745e874..9b18c649 100644 --- a/pv/data/segment.cpp +++ b/pv/data/segment.cpp @@ -33,7 +33,8 @@ namespace data { const uint64_t Segment::MaxChunkSize = 10 * 1024 * 1024; /* 10MiB */ -Segment::Segment(uint64_t samplerate, unsigned int unit_size) : +Segment::Segment(uint32_t segment_id, uint64_t samplerate, unsigned int unit_size) : + segment_id_(segment_id), sample_count_(0), start_time_(0), samplerate_(samplerate), @@ -90,6 +91,11 @@ unsigned int Segment::unit_size() const return unit_size_; } +uint32_t Segment::segment_id() const +{ + return segment_id_; +} + void Segment::set_complete() { is_complete_ = true;