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

Method feed_in_trigger

DSView/pv/sigsession.cpp:1157–1193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1155 }
1156
1157 void SigSession::feed_in_trigger(const ds_trigger_pos &trigger_pos)
1158 {
1159 _hw_replied = true;
1160
1161 if (_device_agent.get_work_mode() != DSO)
1162 {
1163 _trigger_flag = (trigger_pos.status & 0x01);
1164 if (_trigger_flag)
1165 {
1166 _capture_data->_trig_pos = trigger_pos.real_pos;
1167
1168 // Update trig position for current view.
1169 if (_capture_data == _view_data){
1170 _callback->receive_trigger(_capture_data->_trig_pos);
1171 }
1172 }
1173 }
1174 else
1175 {
1176 int probe_count = 0;
1177 int probe_en_count = 0;
1178
1179 for (const GSList *l = _device_agent.get_channels(); l; l = l->next)
1180 {
1181 const sr_channel *const probe = (const sr_channel *)l->data;
1182 if (probe->type == SR_CHANNEL_DSO)
1183 {
1184 probe_count++;
1185 if (probe->enabled)
1186 probe_en_count++;
1187 }
1188 }
1189
1190 _capture_data->_trig_pos = trigger_pos.real_pos * probe_count / probe_en_count;
1191 _callback->receive_trigger(_capture_data->_trig_pos);
1192 }
1193 }
1194
1195 void SigSession::feed_in_logic(const sr_datafeed_logic &o)
1196 {

Callers

nothing calls this directly

Calls 3

get_work_modeMethod · 0.80
get_channelsMethod · 0.80
receive_triggerMethod · 0.45

Tested by

no test coverage detected