示例#1
0
 /**
  * Sets the chart cross hair to the specified timestamp in the chart.
  *
  * @param timeStamp - The timestamp in the chart to which the cross hair should be set.
  */
 public synchronized void setTimeLineLinkedComponents(double timeStamp) {
   if (analysisData != null) {
     if (timeStamp < 0.0) {
       timeStamp = 0.0;
     }
     if (timeStamp > analysisData.getTraceData().getTraceDuration()) {
       timeStamp = analysisData.getTraceData().getTraceDuration();
     }
     getGraphPanel().setGraphView(timeStamp);
   }
 }
示例#2
0
  /** Method to set the time on graph panel. */
  private synchronized void setTimeLineLinkedComponents(
      double timeStamp, double dTimeRangeInterval) {

    if (analysisData != null) {
      boolean bTCPTimeStampFound = false;
      boolean bExactMatch = false;

      // Do exact match of dTimeInterval == 0.0;
      // If dTimeInterval < 0.0, don't try to match up with the TCP_Flow
      // or packets when click comes from graph or video
      if (dTimeRangeInterval == 0.0) {
        bExactMatch = true;
      } else if (dTimeRangeInterval < 0.0) {
        repaint();
        return;
      }

      // Attempt to find corresponding packet for time.
      double packetTimeStamp = 0.0;
      double packetTimeStampDiff = 0.0;
      double previousPacketTimeStampDiff = 9999.0;
      TCPSession bestMatchingTcpSession = null;
      PacketInfo bestMatchingPacketInfo = null;
      for (TCPSession tcpSess : analysisData.getTcpSessions()) {
        PacketInfo packetInfo =
            getBestMatchingPacketInTcpSession(tcpSess, bExactMatch, timeStamp, dTimeRangeInterval);
        if (packetInfo != null) {
          packetTimeStamp = packetInfo.getTimeStamp();
          packetTimeStampDiff = timeStamp - packetTimeStamp;
          if (packetTimeStampDiff < 0.0) {
            packetTimeStampDiff *= -1.0;
          }
          if (packetTimeStampDiff < previousPacketTimeStampDiff) {
            bestMatchingTcpSession = tcpSess;
            bestMatchingPacketInfo = packetInfo;
            bTCPTimeStampFound = true;
          }
        }
      }

      if (bTCPTimeStampFound) {
        getJTCPFlowsTable().selectItem(bestMatchingTcpSession);
        jPacketViewTable.selectItem(bestMatchingPacketInfo);
        jPacketViewTable.setGridColor(Color.LIGHT_GRAY);
        if (bestMatchingPacketInfo != null) {
          jHttpReqResPanel.select(bestMatchingPacketInfo.getRequestResponseInfo());
        } else {
          jHttpReqResPanel.select(null);
        }
      } else {
        getJTCPFlowsTable().selectItem(null);
        jPacketViewTable.selectItem(null);
        jHttpReqResPanel.select(null);
        if (aroVideoPlayer != null) {
          aroVideoPlayer.setMediaDisplayTime(graphPanel.getCrosshair());
        }
      }
    }
  }
示例#3
0
 /**
  * Sets the trace data to be displayed on the Diagnostic tab screen.
  *
  * @param analysisData The trace analysis data to be displayed.
  */
 public synchronized void setAnalysisData(TraceData.Analysis analysisData) {
   this.analysisData = analysisData;
   if (analysisData != null) {
     jTCPFlowsTableModel.setData(analysisData.getTcpSessions());
   } else {
     jTCPFlowsTableModel.setData(null);
   }
   getGraphPanel().resetChart(analysisData);
   deviceNetworkProfilePanel.refresh(analysisData);
 }
  /**
   * Refreshes the label values in the EnergyModelStatisticsPanel using the specified trace data.
   *
   * @param analysis - The Analysis object containing the trace data.
   */
  public synchronized void refresh(TraceData.Analysis analysis) {
    energyContent.clear();

    NumberFormat nf = NumberFormat.getNumberInstance();
    nf.setMaximumFractionDigits(2);
    nf.setMinimumFractionDigits(2);
    refreshRRCStatistic(analysis, nf);
    if (analysis != null) {
      updatePeripheralStatistics(analysis, nf, units, analysis.getEnergyModel());
      updatePeripheralStatisticsValues();
    } else {
      updatePeripheralStatistics(null, null, null, null);
    }
  }