PulseView
0.3.0
A Qt-based sigrok GUI
|
#include <logicsegment.hpp>
Classes | |
struct | MipMapLevel |
Public Types | |
typedef std::pair< int64_t, bool > | EdgePair |
Public Member Functions | |
LogicSegment (std::shared_ptr< sigrok::Logic > logic, uint64_t samplerate, uint64_t expected_num_samples=0) | |
virtual | ~LogicSegment () |
void | append_payload (std::shared_ptr< sigrok::Logic > logic) |
void | get_samples (uint8_t *const data, int64_t start_sample, int64_t end_sample) const |
void | get_subsampled_edges (std::vector< EdgePair > &edges, uint64_t start, uint64_t end, float min_length, int sig_index) |
Public Member Functions inherited from pv::data::Segment | |
Segment (uint64_t samplerate, unsigned int unit_size) | |
virtual | ~Segment () |
uint64_t | get_sample_count () const |
const pv::util::Timestamp & | start_time () const |
double | samplerate () const |
void | set_samplerate (double samplerate) |
unsigned int | unit_size () const |
void | set_capacity (uint64_t new_capacity) |
Increase the capacity of the segment. More... | |
uint64_t | capacity () const |
Get the current capacity of the segment. More... | |
Private Member Functions | |
uint64_t | unpack_sample (const uint8_t *ptr) const |
void | pack_sample (uint8_t *ptr, uint64_t value) |
void | reallocate_mipmap_level (MipMapLevel &m) |
void | append_payload_to_mipmap () |
uint64_t | get_sample (uint64_t index) const |
uint64_t | get_subsample (int level, uint64_t offset) const |
Static Private Member Functions | |
static uint64_t | pow2_ceil (uint64_t x, unsigned int power) |
Private Attributes | |
struct MipMapLevel | mip_map_ [ScaleStepCount] |
uint64_t | last_append_sample_ |
Static Private Attributes | |
static const unsigned int | ScaleStepCount = 10 |
static const int | MipMapScalePower = 4 |
static const int | MipMapScaleFactor = 1 << MipMapScalePower |
static const float | LogMipMapScaleFactor = logf(MipMapScaleFactor) |
static const uint64_t | MipMapDataUnit = 64*1024 |
Friends | |
struct | LogicSegmentTest::Pow2 |
struct | LogicSegmentTest::Basic |
struct | LogicSegmentTest::LargeData |
struct | LogicSegmentTest::Pulses |
struct | LogicSegmentTest::LongPulses |
Additional Inherited Members | |
Protected Member Functions inherited from pv::data::Segment | |
void | append_data (void *data, uint64_t samples) |
Protected Attributes inherited from pv::data::Segment | |
std::recursive_mutex | mutex_ |
std::vector< uint8_t > | data_ |
uint64_t | sample_count_ |
pv::util::Timestamp | start_time_ |
double | samplerate_ |
uint64_t | capacity_ |
unsigned int | unit_size_ |
Definition at line 44 of file logicsegment.hpp.
struct pv::data::LogicSegment::MipMapLevel |
Definition at line 47 of file logicsegment.hpp.
Class Members | ||
---|---|---|
void * | data | |
uint64_t | data_length | |
uint64_t | length |
typedef std::pair<int64_t, bool> pv::data::LogicSegment::EdgePair |
Definition at line 62 of file logicsegment.hpp.
pv::data::LogicSegment::LogicSegment | ( | std::shared_ptr< sigrok::Logic > | logic, |
uint64_t | samplerate, | ||
uint64_t | expected_num_samples = 0 |
||
) |
|
virtual |
Definition at line 61 of file logicsegment.cpp.
void pv::data::LogicSegment::append_payload | ( | std::shared_ptr< sigrok::Logic > | logic | ) |
Definition at line 142 of file logicsegment.cpp.
|
private |
Definition at line 185 of file logicsegment.cpp.
|
private |
Definition at line 262 of file logicsegment.cpp.
void pv::data::LogicSegment::get_samples | ( | uint8_t *const | data, |
int64_t | start_sample, | ||
int64_t | end_sample | ||
) | const |
Definition at line 156 of file logicsegment.cpp.
|
private |
Definition at line 443 of file logicsegment.cpp.
void pv::data::LogicSegment::get_subsampled_edges | ( | std::vector< EdgePair > & | edges, |
uint64_t | start, | ||
uint64_t | end, | ||
float | min_length, | ||
int | sig_index | ||
) |
Parses a logic data segment to generate a list of transitions in a time interval to a given level of detail.
[out] | edges | The vector to place the edges into. |
[in] | start | The start sample index. |
[in] | end | The end sample index. |
[in] | min_length | The minimum number of samples that can be resolved at this level of detail. |
[in] | sig_index | The index of the signal. |
Definition at line 269 of file logicsegment.cpp.
|
private |
|
staticprivate |
|
private |
|
private |
|
friend |
Definition at line 110 of file logicsegment.hpp.
|
friend |
Definition at line 111 of file logicsegment.hpp.
|
friend |
Definition at line 113 of file logicsegment.hpp.
|
friend |
Definition at line 109 of file logicsegment.hpp.
|
friend |
Definition at line 112 of file logicsegment.hpp.
|
private |
Definition at line 107 of file logicsegment.hpp.
|
staticprivate |
Definition at line 58 of file logicsegment.hpp.
|
private |
Definition at line 106 of file logicsegment.hpp.
|
staticprivate |
Definition at line 59 of file logicsegment.hpp.
|
staticprivate |
Definition at line 57 of file logicsegment.hpp.
|
staticprivate |
Definition at line 56 of file logicsegment.hpp.
|
staticprivate |
Definition at line 55 of file logicsegment.hpp.