(conversion_type_ == A2LConversionBySchmittTrigger)));
}
-void SignalBase::convert_single_segment_range(AnalogSegment *asegment,
- LogicSegment *lsegment, uint64_t start_sample, uint64_t end_sample)
+void SignalBase::convert_single_segment_range(shared_ptr<AnalogSegment> asegment,
+ shared_ptr<LogicSegment> lsegment, uint64_t start_sample, uint64_t end_sample)
{
if (end_sample > start_sample) {
tie(min_value_, max_value_) = asegment->get_min_max();
}
}
-void SignalBase::convert_single_segment(AnalogSegment *asegment, LogicSegment *lsegment)
+void SignalBase::convert_single_segment(shared_ptr<AnalogSegment> asegment,
+ shared_ptr<LogicSegment> lsegment)
{
uint64_t start_sample, end_sample, old_end_sample;
start_sample = end_sample = 0;
uint32_t segment_id = 0;
- AnalogSegment *asegment = analog_data->analog_segments().front().get();
+ shared_ptr<AnalogSegment> asegment = analog_data->analog_segments().front();
assert(asegment);
const shared_ptr<Logic> logic_data = dynamic_pointer_cast<Logic>(converted_data_);
logic_data->push_segment(new_segment);
}
- LogicSegment *lsegment = logic_data->logic_segments().front().get();
+ shared_ptr<LogicSegment> lsegment = logic_data->logic_segments().front();
assert(lsegment);
do {
segment_id++;
try {
- asegment = analog_data->analog_segments().at(segment_id).get();
+ asegment = analog_data->analog_segments().at(segment_id);
} catch (out_of_range&) {
qDebug() << "Conversion error for" << name() << ": no analog segment" \
<< segment_id << ", segments size is" << analog_data->analog_segments().size();
*logic_data.get(), segment_id, 1, asegment->samplerate());
logic_data->push_segment(new_segment);
- lsegment = logic_data->logic_segments().back().get();
+ lsegment = logic_data->logic_segments().back();
} else {
// No more samples/segments to process, wait for data or interrupt
if (!conversion_interrupt_) {
uint8_t convert_a2l_schmitt_trigger(float lo_thr, float hi_thr,
float value, uint8_t &state);
- void convert_single_segment_range(AnalogSegment *asegment,
- LogicSegment *lsegment, uint64_t start_sample, uint64_t end_sample);
- void convert_single_segment(pv::data::AnalogSegment *asegment,
- pv::data::LogicSegment *lsegment);
+ void convert_single_segment_range(shared_ptr<AnalogSegment> asegment,
+ shared_ptr<LogicSegment> lsegment, uint64_t start_sample, uint64_t end_sample);
+ void convert_single_segment(shared_ptr<AnalogSegment> asegment,
+ shared_ptr<LogicSegment> lsegment);
void conversion_thread_proc();
void stop_conversion();