XMT-O Reference Software

xmto2xmta
Class TimeScheduler

java.lang.Object
  |
  +--xmto2xmta.TimeScheduler

public class TimeScheduler
extends java.lang.Object

Class to determine resolve the timing for the XMT-O tree.

History:


Field Summary
private  java.lang.Class backdropClass
           
private static java.lang.String backdropClassName
           
private  java.util.Hashtable convertIndexTable_
           
static boolean debug_
          Whether debug information is to be printed to the console.
private  java.io.PrintWriter errWriter
           
private  java.lang.reflect.Method getXmtoAttrSrcMethod
           
private static java.lang.String getXmtoAttrSrcMethodName
           
private  Xmto2Xmta o2aConverter_
          Input structures
private  long playTime
           
static long PLAYTIME
           
static java.lang.Integer ROOT_ID
           
private  SimpleTimeGraph simpleTimeGraph
           
private  TimeGraph timeGraph
           
private  ConvertElement treeRoot_
           
private  boolean useSimpleTimeGraph
           
private  java.io.PrintWriter writer
           
private  java.util.ResourceBundle xmto2XmtaRes_
          Resource file for the messages.
private  java.util.Hashtable xmtoIdTable_
           
 
Constructor Summary
TimeScheduler(Xmto2Xmta converter, java.util.Hashtable xmtoIds, java.util.Hashtable convertIndexes, ConvertElement treeRoot)
          Create the Resolv Model.
TimeScheduler(Xmto2Xmta converter, java.util.Hashtable xmtoIds, java.util.Hashtable convertIndexes, ConvertElement treeRoot, long playTime)
           
 
Method Summary
private  TimingAttribute convert(Time time)
           
private  TimingAttribute convertEventCondition(Condition condition)
           
private  java.util.Vector createConditions(TimingAttribute attr, boolean begin, TimeContainer graphElement, TimeContainer graphParent)
           
private  TimingAttribute createEventInfo(Interval interval, Condition condition)
           
private  void createSimpleTimeGraph()
           
private  void createTimeGraph()
           
 void fireErrorEvent(int errorLevel, int errorId, java.lang.String message)
           
static boolean getDebug()
           
 EventActiveInterval getEventActiveInterval(java.lang.Integer convertTreeIndex)
          Get the event interval for an element.
 java.util.Vector getLifeCycles(java.lang.Integer convertTreeIndex)
          Get the life cycles for the specified element.
private  void loadTimeContainerAttributes(TimingElement convertElement, TimeContainer graphElement, TimeContainer graphParent)
           
private  void loadTimeGraph(TimeContainer timeGraphParent, ConvertElement treeParent)
           
 void printEventActiveIntervals()
           
private  void printLifeCycles()
           
static void setDebug(boolean debug)
          Enable debugging information to be printed to the console.
static void setPlayTime(long playTime)
          Set the default simulation play time in milliseconds
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

debug_

public static boolean debug_
Whether debug information is to be printed to the console. default is not have debug information printed (false).

PLAYTIME

public static long PLAYTIME

ROOT_ID

public static final java.lang.Integer ROOT_ID

backdropClassName

private static final java.lang.String backdropClassName

getXmtoAttrSrcMethodName

private static final java.lang.String getXmtoAttrSrcMethodName

o2aConverter_

private Xmto2Xmta o2aConverter_
Input structures

xmtoIdTable_

private java.util.Hashtable xmtoIdTable_

convertIndexTable_

private java.util.Hashtable convertIndexTable_

treeRoot_

private ConvertElement treeRoot_

playTime

private long playTime

timeGraph

private TimeGraph timeGraph

writer

private java.io.PrintWriter writer

errWriter

private java.io.PrintWriter errWriter

backdropClass

private java.lang.Class backdropClass

getXmtoAttrSrcMethod

private java.lang.reflect.Method getXmtoAttrSrcMethod

simpleTimeGraph

private SimpleTimeGraph simpleTimeGraph

useSimpleTimeGraph

private boolean useSimpleTimeGraph

xmto2XmtaRes_

private java.util.ResourceBundle xmto2XmtaRes_
Resource file for the messages.
Constructor Detail

TimeScheduler

public TimeScheduler(Xmto2Xmta converter,
                     java.util.Hashtable xmtoIds,
                     java.util.Hashtable convertIndexes,
                     ConvertElement treeRoot)
Create the Resolv Model. Resolve as many timings as possible.
Parameters:
converter - converter with pointers to the convert tree, the xmto id hash table and the convert tree index hash table.
xmtoIds - table of the convert tree Elements. The hash index is the xmto id attribute. Not all convert tree elements are contained in this table, for example the elements which don't have xmto ids. Also this table may have elemnents removed if an element isn't supported or has an error which can't be converted.
convertIndexes - table of the convert tree Elements. The hash index is the unique index for each convert element (like an id, but not to be confused with the xmto id. This table may have elemnents removed if an element isn't supported or has an error which can't be converted.
treeRoot - root of the convert tree.

TimeScheduler

public TimeScheduler(Xmto2Xmta converter,
                     java.util.Hashtable xmtoIds,
                     java.util.Hashtable convertIndexes,
                     ConvertElement treeRoot,
                     long playTime)
Method Detail

setPlayTime

public static void setPlayTime(long playTime)
Set the default simulation play time in milliseconds

getLifeCycles

public java.util.Vector getLifeCycles(java.lang.Integer convertTreeIndex)
Get the life cycles for the specified element.
Parameters:
convertTreeIndex - the index of the element to be look up
Returns:
a Vector containing the life cycles of the element. If this element is not resolved then an empty list is returned. If this element doesn't have any life cycles then an empty list is returned.

getEventActiveInterval

public EventActiveInterval getEventActiveInterval(java.lang.Integer convertTreeIndex)
Get the event interval for an element.
Parameters:
convertTreeIndex - the index of the element to be look up
Returns:
EventActiveInterval.

createEventInfo

private TimingAttribute createEventInfo(Interval interval,
                                        Condition condition)

printEventActiveIntervals

public void printEventActiveIntervals()

setDebug

public static void setDebug(boolean debug)
Enable debugging information to be printed to the console.
Parameters:
debug - sets debug information is printed

getDebug

public static boolean getDebug()

createTimeGraph

private void createTimeGraph()

loadTimeGraph

private void loadTimeGraph(TimeContainer timeGraphParent,
                           ConvertElement treeParent)

loadTimeContainerAttributes

private void loadTimeContainerAttributes(TimingElement convertElement,
                                         TimeContainer graphElement,
                                         TimeContainer graphParent)

createConditions

private java.util.Vector createConditions(TimingAttribute attr,
                                          boolean begin,
                                          TimeContainer graphElement,
                                          TimeContainer graphParent)

createSimpleTimeGraph

private void createSimpleTimeGraph()

convert

private TimingAttribute convert(Time time)

convertEventCondition

private TimingAttribute convertEventCondition(Condition condition)

fireErrorEvent

public void fireErrorEvent(int errorLevel,
                           int errorId,
                           java.lang.String message)

printLifeCycles

private void printLifeCycles()

XMT-O Reference Software