decoder_inst_(nullptr)
{
// Query the decoder outputs
- uint8_t i = 0;
+ uint32_t i = 0;
for (GSList *l = dec->binary; l; l = l->next) {
char **bin_class = (char**)l->data;
char *name = bin_class[0];
decoder_inst_ = nullptr;
}
-uint8_t Decoder::get_binary_class_count() const
+uint32_t Decoder::get_binary_class_count() const
{
return bin_classes_.size();
}
-const DecodeBinaryClassInfo* Decoder::get_binary_class(uint8_t id) const
+const DecodeBinaryClassInfo* Decoder::get_binary_class(uint32_t id) const
{
return &(bin_classes_.at(id));
}
struct DecodeBinaryClassInfo
{
- uint8_t bin_class_id;
+ uint32_t bin_class_id;
char* name;
char* description;
};
srd_decoder_inst* create_decoder_inst(srd_session *session);
void invalidate_decoder_inst();
- uint8_t get_binary_class_count() const;
- const DecodeBinaryClassInfo* get_binary_class(uint8_t id) const;
+ uint32_t get_binary_class_count() const;
+ const DecodeBinaryClassInfo* get_binary_class(uint32_t id) const;
private:
const srd_decoder *const decoder_;
}
uint32_t DecodeSignal::get_binary_data_chunk_count(uint32_t segment_id,
- const Decoder* dec, uint8_t bin_class_id) const
+ const Decoder* dec, uint32_t bin_class_id) const
{
try {
const DecodeSegment *segment = &(segments_.at(segment_id));
}
void DecodeSignal::get_binary_data_chunk(uint32_t segment_id,
- const Decoder* dec, uint8_t bin_class_id, uint32_t chunk_id,
+ const Decoder* dec, uint32_t bin_class_id, uint32_t chunk_id,
const vector<uint8_t> **dest, uint64_t *size)
{
try {
}
void DecodeSignal::get_binary_data_chunks_merged(uint32_t segment_id,
- const Decoder* dec, uint8_t bin_class_id, uint64_t start_sample,
+ const Decoder* dec, uint32_t bin_class_id, uint64_t start_sample,
uint64_t end_sample, vector<uint8_t> *dest) const
{
assert(dest != nullptr);
}
const DecodeBinaryClass* DecodeSignal::get_binary_data_class(uint32_t segment_id,
- const data::decode::Decoder* dec, uint8_t bin_class_id) const
+ const data::decode::Decoder* dec, uint32_t bin_class_id) const
{
try {
const DecodeSegment *segment = &(segments_.at(segment_id));
// Prepare our binary output classes
for (const shared_ptr<decode::Decoder>& dec : stack_) {
- uint8_t n = dec->get_binary_class_count();
+ uint32_t n = dec->get_binary_class_count();
- for (uint8_t i = 0; i < n; i++)
+ for (uint32_t i = 0; i < n; i++)
segments_.back().binary_classes.push_back(
{dec.get(), dec->get_binary_class(i), vector<DecodeBinaryDataChunk>()});
}
uint32_t segment_id, uint64_t start_sample, uint64_t end_sample) const;
uint32_t get_binary_data_chunk_count(uint32_t segment_id,
- const data::decode::Decoder* dec, uint8_t bin_class_id) const;
+ const data::decode::Decoder* dec, uint32_t bin_class_id) const;
void get_binary_data_chunk(uint32_t segment_id, const data::decode::Decoder* dec,
- uint8_t bin_class_id, uint32_t chunk_id, const vector<uint8_t> **dest,
+ uint32_t bin_class_id, uint32_t chunk_id, const vector<uint8_t> **dest,
uint64_t *size);
void get_binary_data_chunks_merged(uint32_t segment_id, const data::decode::Decoder* dec,
- uint8_t bin_class_id, uint64_t start_sample, uint64_t end_sample,
+ uint32_t bin_class_id, uint64_t start_sample, uint64_t end_sample,
vector<uint8_t> *dest) const;
const DecodeBinaryClass* get_binary_data_class(uint32_t segment_id,
- const data::decode::Decoder* dec, uint8_t bin_class_id) const;
+ const data::decode::Decoder* dec, uint32_t bin_class_id) const;
virtual void save_settings(QSettings &settings) const;
if (signal_) {
// Populate binary class selector
- uint8_t bin_classes = decoder_->get_binary_class_count();
- for (uint8_t i = 0; i < bin_classes; i++) {
+ uint32_t bin_classes = decoder_->get_binary_class_count();
+ for (uint32_t i = 0; i < bin_classes; i++) {
const data::decode::DecodeBinaryClassInfo* class_info = decoder_->get_binary_class(i);
class_selector_->addItem(class_info->name, QVariant::fromValue(i));
}
void View::on_selected_class_changed(int index)
{
- bin_class_id_ = class_selector_->itemData(index).value<uint8_t>();
+ bin_class_id_ = class_selector_->itemData(index).value<uint32_t>();
update_data();
}
data::DecodeSignal *signal_;
const data::decode::Decoder *decoder_;
- uint8_t bin_class_id_;
+ uint32_t bin_class_id_;
};
} // namespace decoder_output