using pv::data::DecodeSignal;
using pv::data::SignalBase;
using pv::data::decode::Decoder;
-using pv::util::TimeUnit;
using pv::util::Timestamp;
-using std::dynamic_pointer_cast;
-using std::numeric_limits;
using std::shared_ptr;
namespace pv {
"Binary",
"Hex Dump, plain",
"Hex Dump, with offset",
- "Hex Dump, complete"
+ "Hex Dump, canonical"
};
reset_view_state();
}
-View::~View()
-{
-}
-
ViewType View::get_type() const
{
return ViewTypeDecoderOutput;
pair<size_t, size_t> selection = hex_view_->get_selection();
vector<uint8_t> data;
+ data.resize(selection.second - selection.first + 1);
+
signal_->get_merged_binary_data_chunks_by_offset(current_segment_, decoder_,
bin_class_id_, selection.first, selection.second, &data);
pair<size_t, size_t> selection = hex_view_->get_selection();
vector<uint8_t> data;
+ data.resize(selection.second - selection.first + 1);
+
signal_->get_merged_binary_data_chunks_by_offset(current_segment_, decoder_,
bin_class_id_, selection.first, selection.second, &data);
QTextStream out_stream(&file);
uint64_t offset = selection.first;
- unsigned int n = hex_view_->get_bytes_per_line();
+ uint64_t n = hex_view_->get_bytes_per_line();
QString s;
while (offset < selection.second) {
- size_t end = std::min(selection.second, offset + n);
+ size_t end = std::min((uint64_t)(selection.second), offset + n);
offset = hex_view_->create_hex_line(offset, end, &s, with_offset, with_ascii);
out_stream << s << endl;
}
void View::perform_delayed_view_update()
{
- if (!binary_data_exists_)
+ if (signal_ && !binary_data_exists_)
if (signal_->get_binary_data_chunk_count(current_segment_, decoder_, bin_class_id_))
binary_data_exists_ = true;