| 1242 | } |
| 1243 | |
| 1244 | void SigSession::feed_in_dso(const sr_datafeed_dso &o) |
| 1245 | { |
| 1246 | if (_capture_data->get_dso()->memory_failed()) |
| 1247 | { |
| 1248 | dsv_err("Unexpected dso packet"); |
| 1249 | return; // This dso packet was not expected. |
| 1250 | } |
| 1251 | |
| 1252 | if (_is_instant == false){ |
| 1253 | sr_status status; |
| 1254 | |
| 1255 | if (_device_agent.get_device_status(status, false)){ |
| 1256 | _dso_status_valid = true; |
| 1257 | _dso_status = status; |
| 1258 | } |
| 1259 | } |
| 1260 | |
| 1261 | _dso_packet_count++; |
| 1262 | |
| 1263 | if (!_is_triged && o.num_samples > 0) |
| 1264 | { |
| 1265 | _is_triged = true; |
| 1266 | _trig_time = QDateTime::currentDateTime(); |
| 1267 | set_session_time(_trig_time); |
| 1268 | } |
| 1269 | |
| 1270 | if (_capture_data->get_dso()->last_ended()) |
| 1271 | { |
| 1272 | // reset scale of dso signal |
| 1273 | for (auto s : _signals) |
| 1274 | { |
| 1275 | if (s->signal_type() == SR_CHANNEL_DSO){ |
| 1276 | view::DsoSignal *dsoSig = (view::DsoSignal*)s; |
| 1277 | dsoSig->set_scale(dsoSig->get_view_rect().height()); |
| 1278 | } |
| 1279 | } |
| 1280 | |
| 1281 | // first payload |
| 1282 | _capture_data->get_dso()->first_payload(o, |
| 1283 | _device_agent.get_sample_limit(), |
| 1284 | _device_agent.get_channels(), |
| 1285 | _is_instant, |
| 1286 | _device_agent.is_file()); |
| 1287 | } |
| 1288 | else |
| 1289 | { |
| 1290 | // Append to the existing data snapshot |
| 1291 | _capture_data->get_dso()->append_payload(o); |
| 1292 | } |
| 1293 | |
| 1294 | for (auto s : _signals) |
| 1295 | { |
| 1296 | if (s->signal_type() == SR_CHANNEL_DSO && (s->enabled())){ |
| 1297 | view::DsoSignal *dsoSig = (view::DsoSignal*)s; |
| 1298 | dsoSig->paint_prepare(); |
| 1299 | } |
| 1300 | } |
| 1301 |
nothing calls this directly
no test coverage detected