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

Method reload

DSView/pv/sigsession.cpp:965–1087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

963 }
964
965 void SigSession::reload()
966 {
967 if (_device_agent.have_instance() == false)
968 {
969 assert(false);
970 }
971
972 if (_is_working)
973 return;
974
975 std::vector<view::Signal *> sigs;
976 view::Signal *signal = NULL;
977 int logic_chan_num = 0;
978 int dso_chan_num = 0;
979 int start_view_dex = -1;
980
981 set_cur_snap_samplerate(_device_agent.get_sample_rate());
982 set_cur_samplelimits(_device_agent.get_sample_limit());
983
984 int mode = _device_agent.get_work_mode();
985
986 // Make the logic probe list
987 for (GSList *l = _device_agent.get_channels(); l; l = l->next)
988 {
989 sr_channel *probe = (sr_channel *)l->data;
990
991 signal = NULL;
992
993 if (mode == LOGIC && probe->type != SR_CHANNEL_LOGIC){
994 continue;
995 }
996
997 if (mode == ANALOG && probe->type != SR_CHANNEL_ANALOG){
998 continue;
999 }
1000
1001 switch (probe->type)
1002 {
1003 case SR_CHANNEL_LOGIC:
1004 if (probe->enabled)
1005 {
1006 logic_chan_num++;
1007
1008 auto i = _signals.begin();
1009
1010 while (i != _signals.end())
1011 {
1012 if ((*i)->get_index() == probe->index)
1013 {
1014 if ((*i)->signal_type() == SR_CHANNEL_LOGIC){
1015 view::LogicSignal *logicSig = (view::LogicSignal*)(*i);
1016 signal = new view::LogicSignal(logicSig, _view_data->get_logic(), probe);
1017 if (logicSig->get_view_index() < start_view_dex || start_view_dex == -1)
1018 start_view_dex = logicSig->get_view_index();
1019 }
1020
1021 break;
1022 }

Callers

nothing calls this directly

Calls 15

have_instanceMethod · 0.80
get_sample_limitMethod · 0.80
get_work_modeMethod · 0.80
get_channelsMethod · 0.80
signal_typeMethod · 0.80
get_logicMethod · 0.80
get_view_indexMethod · 0.80
get_analogMethod · 0.80
emptyMethod · 0.80
sizeMethod · 0.80
set_view_indexMethod · 0.80
get_sample_rateMethod · 0.45

Tested by

no test coverage detected