trace/traceviewer/com.nokia.traceviewer/src/com/nokia/traceviewer/engine/TraceProperties.java
changeset 11 5b9d4d8641ce
equal deleted inserted replaced
10:ed1c9f64298a 11:5b9d4d8641ce
       
     1 /*
       
     2  * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:
       
    15  *
       
    16  * Trace Properties
       
    17  *
       
    18  */
       
    19 package com.nokia.traceviewer.engine;
       
    20 
       
    21 import java.nio.ByteBuffer;
       
    22 import java.util.ArrayList;
       
    23 
       
    24 /**
       
    25  * Trace Properties
       
    26  */
       
    27 public class TraceProperties {
       
    28 
       
    29 	/**
       
    30 	 * Constructor
       
    31 	 * 
       
    32 	 * @param configuration
       
    33 	 *            trace configuration
       
    34 	 */
       
    35 	public TraceProperties(TraceConfiguration configuration) {
       
    36 		this.traceConfiguration = configuration;
       
    37 		bTraceInformation = new BTraceInformation();
       
    38 		information = new TraceInformation();
       
    39 		parameters = new ArrayList<String>();
       
    40 	}
       
    41 
       
    42 	/**
       
    43 	 * Tells that this trace is binary and should be decoded
       
    44 	 */
       
    45 	public boolean binaryTrace;
       
    46 
       
    47 	/**
       
    48 	 * Tells that this is the last trace of the file or the trace block
       
    49 	 */
       
    50 	public boolean lastTrace;
       
    51 
       
    52 	/**
       
    53 	 * Message start offset in the byte buffer
       
    54 	 */
       
    55 	public int messageStart;
       
    56 
       
    57 	/**
       
    58 	 * Message length
       
    59 	 */
       
    60 	public int messageLength;
       
    61 
       
    62 	/**
       
    63 	 * Data start offset in the byte buffer
       
    64 	 */
       
    65 	public int dataStart;
       
    66 
       
    67 	/**
       
    68 	 * Data length
       
    69 	 */
       
    70 	public int dataLength;
       
    71 
       
    72 	/**
       
    73 	 * Trace number in the file
       
    74 	 */
       
    75 	public int traceNumber;
       
    76 
       
    77 	/**
       
    78 	 * Pointer to bytebuffer where trace is
       
    79 	 */
       
    80 	public ByteBuffer byteBuffer;
       
    81 
       
    82 	/**
       
    83 	 * Timestamp of the trace in nanoseconds
       
    84 	 */
       
    85 	public long timestamp;
       
    86 
       
    87 	/**
       
    88 	 * Time from previous trace in milliseconds. 0 if not available.
       
    89 	 */
       
    90 	public long timeFromPreviousTrace;
       
    91 
       
    92 	/**
       
    93 	 * Decoded trace string
       
    94 	 */
       
    95 	public String traceString;
       
    96 
       
    97 	/**
       
    98 	 * Comment for the trace
       
    99 	 */
       
   100 	public String traceComment;
       
   101 
       
   102 	/**
       
   103 	 * Decoded timestamp string in format HH:mm:ss.SSS[SSS] depending if the
       
   104 	 * chosen timestamp accuracy is milliseconds or microseconds
       
   105 	 */
       
   106 	public String timestampString;
       
   107 
       
   108 	/**
       
   109 	 * Trace configuration. Do not change the values if you don't know what you
       
   110 	 * are doing!
       
   111 	 */
       
   112 	public TraceConfiguration traceConfiguration;
       
   113 
       
   114 	/**
       
   115 	 * Trace information used to get metadata when needed from model
       
   116 	 */
       
   117 	public TraceInformation information;
       
   118 
       
   119 	/**
       
   120 	 * BTrace information containing for example Thread ID
       
   121 	 */
       
   122 	public BTraceInformation bTraceInformation;
       
   123 
       
   124 	/**
       
   125 	 * Decoded trace parameters as String
       
   126 	 */
       
   127 	public ArrayList<String> parameters;
       
   128 }