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

Method feed_in_logic

DSView/pv/sigsession.cpp:1195–1242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1193 }
1194
1195 void SigSession::feed_in_logic(const sr_datafeed_logic &o)
1196 {
1197 if (_capture_data->get_logic()->memory_failed())
1198 {
1199 dsv_err("Unexpected logic packet");
1200 return;
1201 }
1202
1203 if (!_is_triged && o.length > 0)
1204 {
1205 _is_triged = true;
1206 _trig_time = QDateTime::currentDateTime();
1207 }
1208
1209 if (_capture_data->get_logic()->last_ended())
1210 {
1211 _capture_data->get_logic()->set_loop(is_loop_mode());
1212
1213 bool bNotFree = _is_decoding && _view_data == _capture_data;
1214
1215 _capture_data->get_logic()->first_payload(o,
1216 _device_agent.get_sample_limit(),
1217 _device_agent.get_channels(),
1218 !bNotFree);
1219
1220 // @todo Putting this here means that only listeners querying
1221 // for logic will be notified. Currently the only user of
1222 // frame_began is DecoderStack, but in future we need to signal
1223 // this after both analog and logic sweeps have begun.
1224 _callback->frame_began();
1225 }
1226 else
1227 {
1228 // Append to the existing data snapshot
1229 _capture_data->get_logic()->append_payload(o);
1230 }
1231
1232 if (_capture_data->get_logic()->memory_failed())
1233 {
1234 _error = Malloc_err;
1235 _callback->session_error();
1236 return;
1237 }
1238
1239 set_receive_data_len(o.length * 8 / get_ch_num(SR_CHANNEL_LOGIC));
1240
1241 _data_updated = true;
1242 }
1243
1244 void SigSession::feed_in_dso(const sr_datafeed_dso &o)
1245 {

Callers

nothing calls this directly

Calls 10

memory_failedMethod · 0.80
get_logicMethod · 0.80
last_endedMethod · 0.80
set_loopMethod · 0.80
get_sample_limitMethod · 0.80
get_channelsMethod · 0.80
session_errorMethod · 0.80
first_payloadMethod · 0.45
frame_beganMethod · 0.45
append_payloadMethod · 0.45

Tested by

no test coverage detected