#include <logicsegment.hpp>
|
| LogicSegment (pv::data::Logic &owner, uint32_t segment_id, unsigned int unit_size, uint64_t samplerate) |
|
virtual | ~LogicSegment () |
|
shared_ptr< const LogicSegment > | get_shared_ptr () const |
|
void | append_payload (shared_ptr< sigrok::Logic > logic) |
|
void | append_payload (void *data, uint64_t data_size) |
|
void | append_subsignal_payload (unsigned int index, void *data, uint64_t data_size, vector< uint8_t > &destination) |
|
void | get_samples (int64_t start_sample, int64_t end_sample, uint8_t *dest) const |
|
void | get_subsampled_edges (vector< EdgePair > &edges, uint64_t start, uint64_t end, float min_length, int sig_index, bool first_change_only=false) |
|
void | get_surrounding_edges (vector< EdgePair > &dest, uint64_t origin_sample, float min_length, int sig_index) |
|
| Segment (uint32_t segment_id, 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 |
|
uint32_t | segment_id () const |
|
void | set_complete () |
|
bool | is_complete () const |
|
void | free_unused_memory () |
|
|
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_unpacked_sample (uint64_t index) const |
|
template<class T > |
void | downsampleTmain (const T *&in, T &acc, T &prev) |
|
template<class T > |
void | downsampleT (const uint8_t *in, uint8_t *&out, uint64_t len) |
|
void | downsampleGeneric (const uint8_t *in, uint8_t *&out, uint64_t len) |
|
uint64_t | get_subsample (int level, uint64_t offset) const |
|
template<> |
void | downsampleTmain (const uint8_t *&in, uint8_t &acc, uint8_t &prev) |
|
template<> |
void | downsampleTmain (const uint16_t *&in, uint16_t &acc, uint16_t &prev) |
|
|
static uint64_t | pow2_ceil (uint64_t x, unsigned int power) |
|
Definition at line 51 of file logicsegment.hpp.
struct pv::data::LogicSegment::MipMapLevel |
Definition at line 65 of file logicsegment.hpp.
Class Members |
void * |
data |
|
uint64_t |
data_length |
|
uint64_t |
length |
|
pv::data::LogicSegment::LogicSegment |
( |
pv::data::Logic & |
owner, |
|
|
uint32_t |
segment_id, |
|
|
unsigned int |
unit_size, |
|
|
uint64_t |
samplerate |
|
) |
| |
pv::data::LogicSegment::~LogicSegment |
( |
| ) |
|
|
virtual |
void pv::data::LogicSegment::append_payload |
( |
shared_ptr< sigrok::Logic > |
logic | ) |
|
void pv::data::LogicSegment::append_payload |
( |
void * |
data, |
|
|
uint64_t |
data_size |
|
) |
| |
void pv::data::LogicSegment::append_payload_to_mipmap |
( |
| ) |
|
|
private |
void pv::data::LogicSegment::append_subsignal_payload |
( |
unsigned int |
index, |
|
|
void * |
data, |
|
|
uint64_t |
data_size, |
|
|
vector< uint8_t > & |
destination |
|
) |
| |
Appends sample data for a single channel where each byte represents one sample - if it's 0 the state is low, if 1 high. Other values are not permitted. Assumes that all channels are having samples added and in the order of 0..n, not n..0. Also assumes the the number of samples added for each channel is constant for every invokation for 0..n. The number of samples hence may only change when index is 0.
Definition at line 366 of file logicsegment.cpp.
void pv::data::LogicSegment::downsampleGeneric |
( |
const uint8_t * |
in, |
|
|
uint8_t *& |
out, |
|
|
uint64_t |
len |
|
) |
| |
|
private |
template<class T >
void pv::data::LogicSegment::downsampleT |
( |
const uint8_t * |
in, |
|
|
uint8_t *& |
out, |
|
|
uint64_t |
len |
|
) |
| |
|
private |
template<>
void pv::data::LogicSegment::downsampleTmain |
( |
const uint8_t *& |
in, |
|
|
uint8_t & |
acc, |
|
|
uint8_t & |
prev |
|
) |
| |
|
private |
template<>
void pv::data::LogicSegment::downsampleTmain |
( |
const uint16_t *& |
in, |
|
|
uint16_t & |
acc, |
|
|
uint16_t & |
prev |
|
) |
| |
|
private |
template<class T >
void pv::data::LogicSegment::downsampleTmain |
( |
const T *& |
in, |
|
|
T & |
acc, |
|
|
T & |
prev |
|
) |
| |
|
private |
void pv::data::LogicSegment::get_samples |
( |
int64_t |
start_sample, |
|
|
int64_t |
end_sample, |
|
|
uint8_t * |
dest |
|
) |
| const |
shared_ptr< const LogicSegment > pv::data::LogicSegment::get_shared_ptr |
( |
| ) |
const |
uint64_t pv::data::LogicSegment::get_subsample |
( |
int |
level, |
|
|
uint64_t |
offset |
|
) |
| const |
|
private |
void pv::data::LogicSegment::get_subsampled_edges |
( |
vector< EdgePair > & |
edges, |
|
|
uint64_t |
start, |
|
|
uint64_t |
end, |
|
|
float |
min_length, |
|
|
int |
sig_index, |
|
|
bool |
first_change_only = false |
|
) |
| |
Parses a logic data segment to generate a list of transitions in a time interval to a given level of detail.
- Parameters
-
[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 406 of file logicsegment.cpp.
void pv::data::LogicSegment::get_surrounding_edges |
( |
vector< EdgePair > & |
dest, |
|
|
uint64_t |
origin_sample, |
|
|
float |
min_length, |
|
|
int |
sig_index |
|
) |
| |
uint64_t pv::data::LogicSegment::get_unpacked_sample |
( |
uint64_t |
index | ) |
const |
|
private |
void pv::data::LogicSegment::pack_sample |
( |
uint8_t * |
ptr, |
|
|
uint64_t |
value |
|
) |
| |
|
inlineprivate |
uint64_t pv::data::LogicSegment::pow2_ceil |
( |
uint64_t |
x, |
|
|
unsigned int |
power |
|
) |
| |
|
staticprivate |
void pv::data::LogicSegment::reallocate_mipmap_level |
( |
MipMapLevel & |
m | ) |
|
|
private |
uint64_t pv::data::LogicSegment::unpack_sample |
( |
const uint8_t * |
ptr | ) |
const |
|
inlineprivate |
friend struct LogicSegmentTest::Basic |
|
friend |
friend struct LogicSegmentTest::LargeData |
|
friend |
friend struct LogicSegmentTest::LongPulses |
|
friend |
friend struct LogicSegmentTest::Pow2 |
|
friend |
friend struct LogicSegmentTest::Pulses |
|
friend |
uint64_t pv::data::LogicSegment::last_append_accumulator_ |
|
private |
uint64_t pv::data::LogicSegment::last_append_extra_ |
|
private |
uint64_t pv::data::LogicSegment::last_append_sample_ |
|
private |
const uint64_t pv::data::LogicSegment::MipMapDataUnit = 64 * 1024 |
|
static |
const int pv::data::LogicSegment::MipMapScalePower = 4 |
|
static |
Logic& pv::data::LogicSegment::owner_ |
|
private |
const unsigned int pv::data::LogicSegment::ScaleStepCount = 10 |
|
static |
The documentation for this class was generated from the following files: