]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decodesignal.cpp
Shift more methods to DecodeSignal
[pulseview.git] / pv / data / decodesignal.cpp
index bc453d21b0fcc55608c81e0acf70970278d179cd..253e3a987c6dbeb59e1f6344deff7d76c5aa4692 100644 (file)
 
 #include <pv/binding/decoder.hpp>
 #include <pv/data/decode/decoder.hpp>
 
 #include <pv/binding/decoder.hpp>
 #include <pv/data/decode/decoder.hpp>
+#include <pv/data/decode/row.hpp>
 #include <pv/data/decoderstack.hpp>
 #include <pv/session.hpp>
 
 using std::make_shared;
 using std::shared_ptr;
 using pv::data::decode::Decoder;
 #include <pv/data/decoderstack.hpp>
 #include <pv/session.hpp>
 
 using std::make_shared;
 using std::shared_ptr;
 using pv::data::decode::Decoder;
+using pv::data::decode::Row;
 
 namespace pv {
 namespace data {
 
 namespace pv {
 namespace data {
@@ -58,6 +60,11 @@ shared_ptr<pv::data::DecoderStack> DecodeSignal::decoder_stack() const
        return decoder_stack_;
 }
 
        return decoder_stack_;
 }
 
+const list< shared_ptr<Decoder> >& DecodeSignal::decoder_stack_list() const
+{
+       return decoder_stack_->stack();
+}
+
 void DecodeSignal::stack_decoder(srd_decoder *decoder)
 {
        assert(decoder);
 void DecodeSignal::stack_decoder(srd_decoder *decoder)
 {
        assert(decoder);
@@ -92,6 +99,25 @@ bool DecodeSignal::toggle_decoder_visibility(int index)
        return state;
 }
 
        return state;
 }
 
+QString DecodeSignal::error_message() const
+{
+       return decoder_stack_->error_message();
+}
+
+vector<Row> DecodeSignal::visible_rows() const
+{
+       return decoder_stack_->get_visible_rows();
+}
+
+void DecodeSignal::get_annotation_subset(
+       vector<pv::data::decode::Annotation> &dest,
+       const decode::Row &row, uint64_t start_sample,
+       uint64_t end_sample) const
+{
+       return decoder_stack_->get_annotation_subset(dest, row,
+               start_sample, end_sample);
+}
+
 void DecodeSignal::on_new_annotations()
 {
        // Forward the signal to the frontend
 void DecodeSignal::on_new_annotations()
 {
        // Forward the signal to the frontend