MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / get_traces

Method get_traces

DSView/pv/view/view.cpp:371–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371void View::get_traces(int type, std::vector<Trace*> &traces)
372{
373 assert(_session);
374
375 auto &sigs = _session->get_signals();
376
377 const auto &decode_sigs = _session->get_decode_signals();
378
379 const auto &spectrums = _session->get_spectrum_traces();
380
381 for(auto t : sigs) {
382 if (type == ALL_VIEW || _trace_view_map[t->get_type()] == type)
383 traces.push_back(t);
384 }
385
386 for(auto t : decode_sigs) {
387 if (type == ALL_VIEW || _trace_view_map[t->get_type()] == type)
388 traces.push_back(t);
389 }
390
391 for(auto t : spectrums) {
392 if (type == ALL_VIEW || _trace_view_map[t->get_type()] == type)
393 traces.push_back(t);
394 }
395
396 auto lissajous = _session->get_lissajous_trace();
397 if (lissajous && lissajous->enabled() &&
398 (type == ALL_VIEW || _trace_view_map[lissajous->get_type()] == type)){
399 traces.push_back(lissajous);
400 }
401
402 auto math = _session->get_math_trace();
403 if (math && math->enabled() &&
404 (type == ALL_VIEW || _trace_view_map[math->get_type()] == type)){
405 traces.push_back(math);
406 }
407
408 sort(traces.begin(), traces.end(), compare_trace_v_offsets);
409}
410
411bool View::compare_trace_v_offsets(const Trace *a, const Trace *b)
412{

Callers 10

get_mTraceMethod · 0.80
paintEventMethod · 0.80
mouseDoubleClickEventMethod · 0.80
mousePressEventMethod · 0.80
mouseReleaseEventMethod · 0.80
wheelEventMethod · 0.80
get_total_heightMethod · 0.80
doPaintMethod · 0.80
paintSignalsMethod · 0.80
onDsoMouseReleaseMethod · 0.80

Calls 5

get_lissajous_traceMethod · 0.80
get_math_traceMethod · 0.80
get_typeMethod · 0.45
enabledMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected