MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / attach_data_to_signal

Method attach_data_to_signal

DSView/pv/sigsession.cpp:2383–2408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2381 }
2382
2383 void SigSession::attach_data_to_signal(SessionData *data)
2384 {
2385 assert(data);
2386
2387 view::LogicSignal *s1;
2388 view::AnalogSignal *s2;
2389 view::DsoSignal *s3;
2390
2391 for (auto sig : _signals){
2392 int type = sig->signal_type();
2393 switch(type){
2394 case SR_CHANNEL_LOGIC:
2395 s1 = (view::LogicSignal*)sig;
2396 s1->set_data(data->get_logic());
2397 break;
2398 case SR_CHANNEL_ANALOG:
2399 s2 = (view::AnalogSignal*)sig;
2400 s2->set_data(data->get_analog());
2401 break;
2402 case SR_CHANNEL_DSO:
2403 s3 = (view::DsoSignal*)sig;
2404 s3->set_data(data->get_dso());
2405 break;
2406 }
2407 }
2408 }
2409
2410 void SigSession::clear_signals()
2411 {

Callers

nothing calls this directly

Calls 5

signal_typeMethod · 0.80
get_logicMethod · 0.80
get_analogMethod · 0.80
get_dsoMethod · 0.80
set_dataMethod · 0.45

Tested by

no test coverage detected