|
Boeing Simulation 3.1 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--javax.realtime.RealtimeThread
|
+--util.RTWorkerThread
|
+--util.AdaptivePeriodicThread
An adapter class for RealtimeThread that
allow for easier period adjustment.
All AdaptivePeriodicThread objects are automatically
registered to the AdaptiveThreadManager. The method call
AdaptiveThreadManager.registerThread(AdaptivePeriodicThread)
attempts to incorporate this thread into the feasibility scheduling
for the system. Since the method only returns when this thread is
feasible, it is guaranteed execution time for the remained for its
lifetime. Note that these runtime issues should prohibit designers
from using this class for system critical threads that need start
execution right away. Also note that this means that the
constructor will block until enough resources are free to guarantee
execution of this thread.
RTWorkerThread,
AdaptiveThreadManager| Nested Class Summary |
| Nested classes inherited from class util.RTWorkerThread |
RTWorkerThread.OverrunHandler |
| Field Summary | |
static boolean |
AUTO_CORRECT_FEASIBILITY
Flag indicating that the PeriodicParameters defined for this
Thread be continuously be adjusted until it is
feasible for its execution in the system. |
private long |
maximumPeriod
The time in millisecond that denotes the maximum period that this thread should be allowed to have. |
private long |
minimumPeriod
The time in millisecond that denotes the minimum period that this thread should be allowed to have. |
private static boolean |
SHOW_ADJUSTMENTS
Debug flag for showing adjustments in the period and the feasibility thereof. |
| Fields inherited from class util.RTWorkerThread |
cost, DEFAULT_OVERRUN_LOGIC, feasible, logic, overrunLogic, period |
| Fields inherited from class javax.realtime.RealtimeThread |
deadlineMissHandler, eligibilityParam, groupParam, hasMissedDeadline, hasMissHandlers, hasOverrun, hasStarted, hasStartedTimer, isPeriodic, memoryParam, missCondition, overrunHandler, periodExpired, pipeID_, releaseParam, scheduler, schedulingParam, scopeStack, timeoutHandler_, waitingForNextPeriod |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
AdaptivePeriodicThread(Runnable logic,
long cost,
long fixedPeriod)
Constructs an AdaptivePeriodicThread with the minimumPeriod equal to the maximumPeriod, which allows for no adjustment in period timing. |
|
AdaptivePeriodicThread(Runnable logic,
long cost,
long minimumPeriod,
long maximumPeriod)
|
|
AdaptivePeriodicThread(Runnable logic,
long cost,
long minimumPeriod,
long maximumPeriod,
Runnable overrunLogic)
|
|
AdaptivePeriodicThread(Runnable logic,
long cost,
long fixedPeriod,
Runnable overrunLogic)
Constructs an AdaptivePeriodicThread with the minimumPeriod equal to the maximumPeriod, which allows for no adjustment in period timing. |
|
| Method Summary | |
(package private) boolean |
adjustPeriod(long adjustedPeriod)
Adjusts the ReleaseParameters if the
thread if the resulting adjustment is still feasible given the
system resources and returns true if it is still
feasible. |
long |
getMaximumPeriod()
Returns time in millisecond for maximum allowable period that this thread can have. |
void |
run()
|
| Methods inherited from class util.RTWorkerThread |
cease, getPeriod, isFeasible |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, stop, stop, suspend, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.Ceaseable |
join |
| Field Detail |
public static final boolean AUTO_CORRECT_FEASIBILITY
PeriodicParameters defined for this
Thread be continuously be adjusted until it is
feasible for its execution in the system.
private final long minimumPeriod
private final long maximumPeriod
private static final boolean SHOW_ADJUSTMENTS
| Constructor Detail |
public AdaptivePeriodicThread(Runnable logic,
long cost,
long fixedPeriod)
public AdaptivePeriodicThread(Runnable logic,
long cost,
long fixedPeriod,
Runnable overrunLogic)
public AdaptivePeriodicThread(Runnable logic,
long cost,
long minimumPeriod,
long maximumPeriod)
public AdaptivePeriodicThread(Runnable logic,
long cost,
long minimumPeriod,
long maximumPeriod,
Runnable overrunLogic)
| Method Detail |
boolean adjustPeriod(long adjustedPeriod)
Adjusts the ReleaseParameters if the
thread if the resulting adjustment is still feasible given the
system resources and returns true if it is still
feasible.
This method was made package protected so that the
AdaptiveThreadManager can access it but classes
outside this package cannot.
public long getMaximumPeriod()
public void run()
run in interface Runnablerun in class RTWorkerThread
|
Boeing Simulation 3.1 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||