public class SporadicParameters extends AperiodicParameters implements java.lang.Cloneable
Jamaica Real-Time Specification for Java class SporadicParameters.
This class characterizes the release of schedulable objects that can be released at any time but with a minimum time between two releases. Unlike AperiodicParameters, SporadicParameters does not necessarily make the feasibility analysis of a set of schedulable objects impossible.
Note that any changes to RelativeTime arguments of this object do not propagate to the schedulable object until the corresponding setter method of AperiodicParameters is called to notify this object about the change.
NOTE: the methods in this class are not synchronized. They cannot be used by several threads simultaneously without proper explicit synchronization.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
mitViolationExcept
The "EXCEPT" policy for dealing with minimum arrival time
violations.
|
static java.lang.String |
mitViolationIgnore
The "IGNORE" policy for dealing with minimum arrival time
violations.
|
static java.lang.String |
mitViolationReplace
The "REPLACE" policy for dealing with minimum arrival time
violations.
|
static java.lang.String |
mitViolationSave
The "SAVE" policy for dealing with minimum arrival time
violations.
|
arrivalTimeQueueOverflowExcept, arrivalTimeQueueOverflowIgnore, arrivalTimeQueueOverflowReplace, arrivalTimeQueueOverflowSave
Constructor and Description |
---|
SporadicParameters(RelativeTime interarrival)
Create a SporadicParameters object.
|
SporadicParameters(RelativeTime minInterarrival,
RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Constructor of SporadicParameters to be used as ReleaseParameters
for AsyncBaseEventHandler if the event handler will be scheduled
aperiodically with a miminum interarrival time between each two
releases.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
clone creates a clone of this object with the same parameters but
without association to any schedulable object.
|
RelativeTime |
getMinimumInterarrival()
getMinimumInterarrival returns the minimum interarrival time.
|
java.lang.String |
getMitViolationBehavior()
getMitViolationBehavior returns the current setting of the policy
for dealing with minimum arrival time violations.
|
boolean |
setIfFeasible(RelativeTime interarrival,
RelativeTime cost,
RelativeTime deadline)
setIfFeasible performs a feasibility analysis using the new
period, cost and deadline parameters.
|
void |
setMinimumInterarrival(RelativeTime interarrival)
setMinimumInterarrival sets the minimum interarrival time to a
new value, independent on the impact this will have on the
feasibility of the system.
|
void |
setMitViolationBehavior(java.lang.String behavior)
setMitViolationBehavior sets the policy for dealing with minimum
arrival time violations.
|
getArrivalTimeQueueOverflowBehavior, getInitialArrivalTimeQueueLength, setArrivalTimeQueueOverflowBehavior, setIfFeasible, setInitialArrivalTimeQueueLength
getCost, getCostOverrunHandler, getDeadline, getDeadlineMissHandler, setCost, setCostOverrunHandler, setDeadline, setDeadlineMissHandler, setIfFeasible
public static final java.lang.String mitViolationExcept
public static final java.lang.String mitViolationIgnore
public static final java.lang.String mitViolationReplace
public static final java.lang.String mitViolationSave
public SporadicParameters(RelativeTime interarrival)
public SporadicParameters(RelativeTime minInterarrival, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
minInterarrival
- The minimum interarrival time for two
successive releases of an associated schedulable object. This
parameter will be copied, changes to its value will have no
effect on this SporadicParameters once the SporadicParameters
object has been created.cost
- The CPU time required for each release. If cost
monitoring is performed, this gives the maximum amount of CPU
time that will be allowed for each release. In any case, this may
be used by the feasibility analysis. If null, the default value
will be new RelativeTime(0, 0). Note that on a system with cost
monitoring, this default value will allow no execution time for
the associated schedulable object.deadline
- The deadline for the completion of one release,
relative to the release time of that release. When null, the default
value is a new instance of RelativeTime(0,0).overrunHandler
- This handler will be invoked if the cost of
one invocation exceeds the cost parameter. If null, there will be
no overrunHandler.
For JamaicaVM, cost overrun checking is enabled if CpuTime.CPU_TIME_SUPPORTED
is true. The
accuracy of the cost enforcement can be specified in nanoseconds
via the property jamaica.cost_monitoring_accuracy. The default
value is 5000000, i.e., 5milliseconds.
missHandler
- This handler will be invoked if the deadline
of one release is missed. If null, there will be no deadline.java.lang.IllegalArgumentException
- if the interarrival is
null or negative or zero, if cost is negative or deadline is
negative or zero.public boolean setIfFeasible(RelativeTime interarrival, RelativeTime cost, RelativeTime deadline)
interarrival
- The minimum interarrival time for two
successive releases of an associated schedulable object. This
parameter will be copied, changes to its value will have no
effect on this SporadicParameters once the SporadicParameters
object has been created.cost
- The CPU time required for each release. If cost
monitoring is performed, this gives the maximum amount of CPU
time that will be allowed for each release. In any case, this may
be used by the feasibility analysis. If null, the default value
will be new RelativeTime(0, 0). Note that on a system with cost
monitoring, this default value will allow no execution time for
the associated schedulable object.deadline
- The deadline for the completion of one release,
relative to the release time of that release. If null, the
default value is a new instance of
RealtiveTime(Long.MAX_VALUE, 999999).java.lang.IllegalArgumentException
- if the interarrival is
null or negative or zero, if cost is negative or deadline is
negative or zero.public RelativeTime getMinimumInterarrival()
public void setMinimumInterarrival(RelativeTime interarrival)
interarrival
- The minimum interarrival time for two
successive releases of an associated schedulable object. This
parameter will be copied, changes to its value will have no
effect on this SporadicParameters once the SporadicParameters
object has been created.java.lang.IllegalArgumentException
- if the interarrival is
null or negative or zero.public java.lang.String getMitViolationBehavior()
public void setMitViolationBehavior(java.lang.String behavior)
behavior
- one of mitViolationExcept, mitViolationIgnore,
mitViolationReplace, or mitViolationSave.java.lang.IllegalArgumentException
- if behavior is not one of the
constants arrivalTimeQueueOverflowExcept,
arrivalTimeQueueOverflowIgnore, arrivalTimeQueueOverflowReplace,
arrivalTimeQueueOverflowSave.public java.lang.Object clone()
clone
in class AperiodicParameters
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2017 aicas GmbH. All Rights Reserved.