edu.colorado.cs.ns2.animation
Class TraceFileParser

java.lang.Object
  extended by edu.colorado.cs.ns2.animation.TraceFileParser

public class TraceFileParser
extends java.lang.Object

This class parses the NS2 simulation trace file and stores it as a TraceEvent Queue.

Author:
Kevin Bauer, Pushkar Sambhoos.

Field Summary
private  java.util.Vector<java.lang.String> events
          Each line of the NS2 trace file is represented as an element in the Vector.
private  EventQueue eventsQueue
          The TraceEvent Queue ADT.
private static java.util.Vector<LinksElement> links
          A list of links associated with events required to implement event animation.
 
Constructor Summary
TraceFileParser()
          Default constructor: Reads the NS2 trace file and stores each line in a the events Vector.
 
Method Summary
static java.util.Vector<LinksElement> getLinks()
          Returns a Vector of all links in the Trace File.
 EventQueue populateEventObjects()
          Parses each line of the trace file from memory and builds the internal representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

events

private java.util.Vector<java.lang.String> events
Each line of the NS2 trace file is represented as an element in the Vector.


eventsQueue

private EventQueue eventsQueue
The TraceEvent Queue ADT.


links

private static java.util.Vector<LinksElement> links
A list of links associated with events required to implement event animation.

Constructor Detail

TraceFileParser

public TraceFileParser()
Default constructor: Reads the NS2 trace file and stores each line in a the events Vector.

Method Detail

populateEventObjects

public EventQueue populateEventObjects()
Parses each line of the trace file from memory and builds the internal representation.

Returns:
A Queue of events.

getLinks

public static java.util.Vector<LinksElement> getLinks()
Returns a Vector of all links in the Trace File.

Returns:
A Vector of Link Elements.