|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlejos.realtime.SchedulingParameters
lejos.realtime.ReleaseParameters
lejos.realtime.AperiodicParameters
lejos.realtime.SporadicParameters
public class SporadicParameters
Field Summary | |
---|---|
static String |
mitViolationExceptnew
|
static String |
mitViolationIgnore
|
static String |
mitViolationReplace
|
static String |
mitViolationSave
|
Fields inherited from class lejos.realtime.AperiodicParameters |
---|
arrivalTimeQueueOverflowExcept, arrivalTimeQueueOverflowIgnore, arrivalTimeQueueOverflowReplace, arrivalTimeQueueOverflowSave |
Constructor Summary | |
---|---|
SporadicParameters(RelativeTime minInterarrival)
Create a SporadicParameters object. |
|
SporadicParameters(RelativeTime minInterarrival,
RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Create a SporadicParameters object. |
Method Summary | |
---|---|
RelativeTime |
getMinimumInterarrival()
Gets the minimum interarrival time. |
String |
getMitViolationBehavior()
Gets the arrival time queue behavior in the event of a minimum interarrival time violation. |
boolean |
setIfFeasible(RelativeTime cost,
RelativeTime deadline)
This method first performs a feasibility analysis using the new cost, and deadline as replacements for the matching attributes of this. |
boolean |
setIfFeasible(RelativeTime interarrival,
RelativeTime cost,
RelativeTime deadline)
This method first performs a feasibility analysis using the new interarrival, cost and deadline attributes as replacements for the matching attributes of this. |
void |
setMinimumInterarrival(RelativeTime minimum)
Set the minimum interarrival time. |
void |
setMitViolationBehavior(String behavior)
Sets the behavior of the arrival time queue in the case where the new arrival time is closer to the previous arrival time than the minimum interarrival time given in this. |
Methods inherited from class lejos.realtime.AperiodicParameters |
---|
getArrivalTimeQueueOverflowBehavior, getInitialArrivalTimeQueueLength, setArrivalTimeQueueOverflowBehavior, setDeadline, setInitialArrivalTimeQueueLength |
Methods inherited from class lejos.realtime.ReleaseParameters |
---|
clone, getCost, getCostOverrunHandler, getDeadline, getDeadlineMissHandler, setCost, setCostOverrunHandler, setDeadlineMissHandler |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String mitViolationExceptnew
public static final String mitViolationIgnore
public static final String mitViolationSave
public static final String mitViolationReplace
Constructor Detail |
---|
public SporadicParameters(RelativeTime minInterarrival)
mit
- The release times of the schedulable object will occur no
closer than this interval. This time object is treated as if
it were copied. Changes to mit will not effect
the SporadicParameters object. There is no default value.
If minInterarrival is null an illegal argument exception is
thrown.
IllegalArgumentException
- Thrown if minInterarrival is null or its time value
is not greater than zero.
IllegalAssignmentError
- Thrown if minInterarrival cannot be stored in this.
Since: 1.0.1public SporadicParameters(RelativeTime minInterarrival, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
minInterarrival
- The release times of the schedulable object will occur no
closer than this interval. This time object is treated as if
it were copied. Changes to minInterarrival will not effect the
SporadicParameters object. There is no default value.
If minInterarrival is null an illegal argument exception is
thrown.cost
- Processing time per release. On implementations which can
measure the amount of time a schedulable object is executed,
this value is the maximum amount of time a schedulable object
receives per release. On implementations which cannot measure
execution time, this value is used as a hint to the feasibility
algorithm. On such systems it is not possible to determine
when any particular object exceeds cost. If null, the default
value is a new instance of RelativeTime(0,0).deadline
- The latest permissible completion time measured from the
release time of the associated invocation of the schedulable
object. For a minimum implementation for purposes of
feasibility analysis, the deadline is equal to the minimum
interarrival interval. Other implementations may use this
parameter to compute execution eligibility. If null, the
default value is a new instance of RelativeTime(mit).overrunHandler
- This handler is invoked if an invocation of the schedulable
object exceeds cost. Not required for minimum implementation.
If null no overrun handler will be used.missHandler
- This handler is invoked if the run() method of the schedulable
object is still executing after the deadline has passed.
Although minimum implementations do not consider deadlines in
feasibility calculations, they must recognize variable
deadlines and invoke the miss handler as appropriate.
If null, no deadline miss handler will be used.
IllegalArgumentException
- Thrown if minInterarrival is null or its time value is not
greater than zero, or the time value of cost is less than
zero, or the time value of deadline is not greater than zero.
IllegalAssignmentError
- Thrown if minInterarrival, cost, deadline, overrunHandler or
missHandler cannot be stored in this.Method Detail |
---|
public void setMitViolationBehavior(String behavior)
behavior
- A string representing the behavior.
IllegalArgumentException
- Thrown if behavior is not one of the final MIT violation
behavior values defined in this class.public String getMitViolationBehavior()
public boolean setIfFeasible(RelativeTime cost, RelativeTime deadline)
setIfFeasible
in class AperiodicParameters
cost
- The proposed cost. to determine when any particular object
exceeds cost. If null, the default value is a new instance of
RelativeTime(0,0).deadline
- The proposed deadline. If null, the default value is a new
instance of RelativeTime(mit).
IllegalArgumentException
- Thrown if the time value of cost is less than zero, or the
time value of deadline is less than or equal to zero, or the
values are incompatible with the scheduler for any of the
schedulable objects which are presently using this parameter
object.
IllegalAssignmentError
- Thrown if cost or deadline cannot be stored in this.public boolean setIfFeasible(RelativeTime interarrival, RelativeTime cost, RelativeTime deadline)
interarrival
- The proposed interarrival time. There is no default value. If
minInterarrival is null an illegal argument exception is
thrown.cost
- The proposed cost. If null, the default value is a new
instance of RelativeTime(0,0).deadline
- The proposed deadline. If null, the default value is a new
instance of RelativeTime(mit).
IllegalArgumentException
- Thrown if minInterarrival is null or its time value is not
greater than zero, or the time value of cost is less than
zero, or the time value of deadline is not greater than zero.
IllegalAssignmentError
- Thrown if interarrival, cost or deadline cannot be stored in
this.public RelativeTime getMinimumInterarrival()
public void setMinimumInterarrival(RelativeTime minimum)
minimum
- The release times of the schedulable object will occur no
closer than this interval.
IllegalArgumentException
- Thrown if minimum is null or its time value is not greater
than zero.
IllegalAssignmentError
- Thrown if minimum cannot be stored in this.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |