|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jeospace.simulation.ChronManager
Maintains the current active Chronometer, provides a synchronous
scheduler for executing tasks on the simulation frame clock and collects
performance data on the execution of simulation functions.
Profile,
Chronometer,
TaskScheduler| Constructor Summary | |
ChronManager(Chronometer chronometer)
Constructor |
|
| Method Summary | |
boolean |
addTask(java.lang.Runnable task)
Add a new task to the run list |
ChronAlarm |
createChronAlarm(ChronAlarmListener listener,
java.lang.Object listenerID,
ChronPeriod interval,
boolean repeat)
Create a new ChronAlarm. |
void |
enableLogging(boolean enable)
Set the state of performance data logging |
Chronometer |
getChronometer()
Return the current active Chronometer |
long |
getClockPeriod()
Return the frame clock period in milliseconds. |
void |
getFramePeriodData(int[] data)
Return the frame period data. |
void |
getUpdatePeriodData(int[] data)
Return the frame cycle execution time data. |
boolean |
isLoggingEnabled()
Return the enable state of performance data logging |
boolean |
removeTask(java.lang.Runnable task)
Remove a task from the run list |
void |
resetLoggingData()
Reset the performance data to their initial values |
void |
run()
The periodic processing routine. |
void |
setClockPeriod(long milliseconds)
Set the frame clock period in milliseconds |
void |
setSimManager(SimManager simManager)
Set the SimManager. |
void |
simAction(SimEvent se)
Invoked when an simulation manager event occurs. |
void |
start()
Start the ChronManager's task scheduling |
void |
stop()
Stop the ChronManager's task scheduling |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ChronManager(Chronometer chronometer)
chronometer - the Chronometer.| Method Detail |
public void run()
run in interface java.lang.Runnablepublic void simAction(SimEvent se)
SimListener
simAction in interface SimListenerpublic void start()
ChronManager's task scheduling
start in interface TaskSchedulerpublic void stop()
ChronManager's task scheduling
stop in interface TaskSchedulerpublic boolean addTask(java.lang.Runnable task)
addTask in interface TaskSchedulertask - the new task to add
true if the task was
added to the run list, false if otherwise.public boolean removeTask(java.lang.Runnable task)
removeTask in interface TaskSchedulertask - the task to remove
true if the task was
removed from the run list, false if otherwise.public long getClockPeriod()
getClockPeriod in interface TaskSchedulerpublic void setClockPeriod(long milliseconds)
setClockPeriod in interface TaskSchedulermilliseconds - the frame clock period
public ChronAlarm createChronAlarm(ChronAlarmListener listener,
java.lang.Object listenerID,
ChronPeriod interval,
boolean repeat)
ChronAlarm.
createChronAlarm in interface ChronAlarmFactorylistener - the ChronAlarmListener that will respond
to alarm eventslistenerID - an identifying Object to be returned in
the ChronAlarmEventinterval - the ChronPeriod that defines the interval
of the alarm. An alarm event will be generated when the active
Chronometer reaches or exceeds the interval period in
either the forward or backward direction.repeat - flag indicating that this alarm repeats true or
is a one shot false.public void setSimManager(SimManager simManager)
SimManager. If the SimManager is set, the
ChronManager will synchronize it's periodic processing with
the SimManager's frame ready event.
simManager - the active SimManager.public Chronometer getChronometer()
Chronometer
Chronometerpublic void enableLogging(boolean enable)
enable - the new statepublic boolean isLoggingEnabled()
public void getUpdatePeriodData(int[] data)
data - the int array to initialize with
the data values.public void getFramePeriodData(int[] data)
data - the int array to initialize with
the data values.public void resetLoggingData()
|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||