コード例 #1
0
void WirelessTimeline::captureFileReadFinished()
{
    /* All frames must be included in packet list */
    if (cfile.count == 0 || g_hash_table_size(radio_packet_list) != cfile.count)
        return;

    /* check that all frames have start and end tsf time and are reasonable time order.
     * packet timing reference seems to be off a little on some generators, which
     * causes frequent IFS values in the range 0 to -30. Some generators emit excessive
     * data when an FCS error happens, and this results in the duration calculation for
     * the error frame being excessively long. This can cause larger negative IFS values
     * (-30 to -1000) for the subsequent frame. Ignore these cases, as they don't seem
     * to impact the GUI too badly. If the TSF reference point is set wrong (TSF at
     * start of frame when it is at the end) then larger negative offsets are often
     * seen. Don't display the timeline in these cases.
     */
    /* TODO: update GUI to handle captures with occasional frames missing TSF data */
    /* TODO: indicate error message to the user */
    for (guint32 n = 1; n < cfile.count; n++) {
        struct wlan_radio *w = get_wlan_radio(n);
        if (w->start_tsf == 0 || w->end_tsf == 0) {
            statusbar_push_temporary_msg("Packet number %u does not include TSF timestamp, not showing timeline.", n);
            return;
        }
        if (w->ifs < -RENDER_EARLY) {
            statusbar_push_temporary_msg("Packet number %u has large negative jump in TSF, not showing timeline. Perhaps TSF reference point is set wrong?", n);
            return;
        }
    }

    first = get_wlan_radio(1);
    last = get_wlan_radio(cfile.count);

    start_tsf = first->start_tsf;
    end_tsf = last->end_tsf;

    /* TODO: only reset the zoom level if the file is changed, not on redissection */
    zoom_level = 0;

    show();
    selectedFrameChanged(0);
    // TODO: show or ungrey the toolbar controls
    update();
}
コード例 #2
0
ファイル: ModelFramesWidget.cpp プロジェクト: aldoxtor/openrw
void ModelFramesWidget::selectedModelChanged(const QModelIndex& n,
                                             const QModelIndex&) {
    updateInfoBox(gmodel, (ModelFrame*)n.internalPointer());
    selectedFrameChanged((ModelFrame*)n.internalPointer());
}