21 #ifndef PULSEVIEW_PV_DATA_DECODERSTACK_HPP
22 #define PULSEVIEW_PV_DATA_DECODERSTACK_HPP
27 #include <condition_variable>
33 #include <boost/optional.hpp>
43 struct srd_decoder_annotation_row;
45 struct srd_proto_data;
49 struct TwoDecoderStack;
83 const srd_decoder *
const decoder);
87 const std::list< std::shared_ptr<decode::Decoder> >&
stack()
const;
88 void push(std::shared_ptr<decode::Decoder> decoder);
89 void remove(
int index);
103 std::vector<pv::data::decode::Annotation> &dest,
105 uint64_t end_sample)
const;
119 const unsigned int unit_size, srd_session *
const session);
150 std::list< std::shared_ptr<decode::Decoder> >
stack_;
162 std::map<const decode::Row, decode::RowData>
rows_;
177 #endif // PULSEVIEW_PV_DATA_DECODERSTACK_HPP
static void annotation_callback(srd_proto_data *pdata, void *decoder)
void decode_data(const int64_t sample_count, const unsigned int unit_size, srd_session *const session)
void push(std::shared_ptr< decode::Decoder > decoder)
static std::mutex global_decode_mutex_
double samplerate() const
pv::util::Timestamp start_time_
void get_annotation_subset(std::vector< pv::data::decode::Annotation > &dest, const decode::Row &row, uint64_t start_sample, uint64_t end_sample) const
std::thread decode_thread_
static const double DecodeThreshold
DecoderStack(pv::Session &session_, const srd_decoder *const decoder)
uint64_t max_sample_count() const
std::shared_ptr< pv::data::LogicSegment > segment_
static const double DecodeMargin
boost::optional< int64_t > wait_for_data() const
const std::list< std::shared_ptr< decode::Decoder > > & stack() const
static const int64_t DecodeChunkLength
std::map< const decode::Row, decode::RowData > rows_
std::atomic< bool > interrupt_
std::list< std::shared_ptr< decode::Decoder > > stack_
int64_t samples_decoded() const
boost::multiprecision::number< boost::multiprecision::cpp_dec_float< 24 >, boost::multiprecision::et_off > Timestamp
Timestamp type providing yoctosecond resolution.
static const unsigned int DecodeNotifyPeriod
friend struct DecoderStackTest::TwoDecoderStack
std::map< std::pair< const srd_decoder *, int >, decode::Row > class_rows_
std::vector< decode::Row > get_visible_rows() const
std::condition_variable input_cond_
const pv::util::Timestamp & start_time() const