|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
lejos.realtime.RealtimeThread
public class RealtimeThread
Class used to create a Realtime thread.
Field Summary | |
---|---|
static int |
GC_MEM
|
static int |
IMMORTAL_MEM
|
static int |
MAX_PRIORITY
|
static int |
MIN_PRIORITY
|
static int |
NORM_PRIORITY
|
Constructor Summary | |
---|---|
RealtimeThread()
Create a real-time thread with default values for all parameters. |
|
RealtimeThread(SchedulingParameters scheduling)
Create a real-time thread with the given SchedulingParameters and default values for all other parameters. |
|
RealtimeThread(SchedulingParameters scheduling,
ReleaseParameters release)
Create a real-time thread with the given SchedulingParameters and ReleaseParameters and default values for all other parameters. |
|
RealtimeThread(SchedulingParameters prio,
ReleaseParameters release,
MemoryParameters memoryParam,
MemoryArea memoryArea)
|
|
RealtimeThread(SchedulingParameters scheduling,
ReleaseParameters release,
MemoryParameters memory,
MemoryArea area,
ProcessingGroupParameters group,
Runnable logic)
|
Methods inherited from class java.lang.Thread |
---|
currentThread, getId, getName, getPriority, init_thread, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, set_priority, setDaemon, setName, setPriority, sleep, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MIN_PRIORITY
public static final int NORM_PRIORITY
public static final int MAX_PRIORITY
public static final int GC_MEM
public static final int IMMORTAL_MEM
Constructor Detail |
---|
public RealtimeThread()
RealtimeThread(null, null, null, null, null, null)
.
public RealtimeThread(SchedulingParameters scheduling)
RealtimeThread(scheduling, null, null, null, null, null)
.
IllegalArgumentException
- Thrown if the scheduling parameters are not compatible with
the associated scheduler.
IllegalAssignmentError
- Thrown if the new RealtimeThread instance cannot hold a
reference to scheduling, or if scheduling cannot hold a reference to
the new RealtimeThread.public RealtimeThread(SchedulingParameters scheduling, ReleaseParameters release)
IllegalArgumentException
- Thrown if the scheduling parameters or release parameters
are not compatible with the associated scheduler.
IllegalAssignmentError
- Thrown if the new RealtimeThread instance cannot hold a
reference to scheduling or release, or if either parameter cannot
hold a reference to the new RealtimeThread.public RealtimeThread(SchedulingParameters prio, ReleaseParameters release, MemoryParameters memoryParam, MemoryArea memoryArea)
public RealtimeThread(SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters group, Runnable logic)
Method Detail |
---|
public void run()
Runnable
Runnable
is used
to create a thread, starting the thread causes the object's
run
method to be called in that separately executing
thread.
run
in interface Runnable
run
in class Thread
public void setReleaseParameters(ReleaseParameters release) throws IllegalArgumentException, IllegalStateException
Schedulable
Schedulable
.
Since this affects the constraints expressed in the release parameters
of the existing schedulable objects, this may change the feasibility of
the current system.
This change becomes effective under conditions determined by the
scheduler controlling the schedulable object. For instance, the change
may be immediate or it may be delayed until the next release of the
schedulable object. The different properties of the release parameters
may take effect at different times. See the documentation for the
scheduler for details.
setReleaseParameters
in interface Schedulable
release
- A ReleaseParameters
object which will become the release
parameters associated with this after the method call, and take effect
as determined by the associated scheduler. If null, the default value is
governed by the associated scheduler (a new object is created if the
default value is not null). (See PriorityScheduler
.)
IllegalArgumentException
- Never throwed for the moment.
java.lang.IllegalThreadStateException
- Never throwed for the moment.
IllegalStateException
public void setSchedulingParameters(SchedulingParameters scheduling) throws IllegalArgumentException, IllegalAssignmentError
Schedulable
setSchedulingParameters
in interface Schedulable
scheduling
- A reference to the SchedulingParameters
object. If null,
the default value is governed by the associated scheduler (a new object
is created if the default value is not null).
(See PriorityScheduler.)
IllegalArgumentException
- Never throwed for the moment.
IllegalAssignmentError
- Never throwed for the moment.public void start()
start
in class Thread
public boolean addIfFeasible()
addIfFeasible
in interface Schedulable
public boolean addToFeasibility()
Schedulable
addToFeasibility
in interface Schedulable
public MemoryParameters getMemoryParameters()
getMemoryParameters
in interface Schedulable
public ProcessingGroupParameters getProcessingGroupParameters()
getProcessingGroupParameters
in interface Schedulable
public ReleaseParameters getReleaseParameters()
getReleaseParameters
in interface Schedulable
public Scheduler getScheduler()
getScheduler
in interface Schedulable
public SchedulingParameters getSchedulingParameters()
getSchedulingParameters
in interface Schedulable
public final void schedulePeriodic()
public boolean removeFromFeasibility()
removeFromFeasibility
in interface Schedulable
public final void rt_set_start(int start)
public final void rt_set_period(int period)
public final void rt_set_cost(int cost)
public final void rt_set_deadline(int deadline)
public final void rt_set_costOverrunHandler(AsyncEventHandler costOverrunHandler)
public final void rt_set_deadlineMissHandler(AsyncEventHandler deadlineMissHandler)
public boolean setIfFeasible(ReleaseParameters release, MemoryParameters memory)
setIfFeasible
in interface Schedulable
public boolean setIfFeasible(ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters group)
setIfFeasible
in interface Schedulable
public boolean setIfFeasible(ReleaseParameters release, ProcessingGroupParameters group)
setIfFeasible
in interface Schedulable
public boolean setIfFeasible(SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory)
setIfFeasible
in interface Schedulable
public boolean setIfFeasible(SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters group)
setIfFeasible
in interface Schedulable
public void setMemoryParameters(MemoryParameters memory)
setMemoryParameters
in interface Schedulable
public boolean setMemoryParametersIfFeasible(MemoryParameters memory)
setMemoryParametersIfFeasible
in interface Schedulable
public void setProcessingGroupParameters(ProcessingGroupParameters group)
setProcessingGroupParameters
in interface Schedulable
public boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters group)
setProcessingGroupParametersIfFeasible
in interface Schedulable
public boolean setReleaseParametersIfFeasible(ReleaseParameters release)
setReleaseParametersIfFeasible
in interface Schedulable
public void setScheduler(Scheduler scheduler)
setScheduler
in interface Schedulable
public void setScheduler(Scheduler scheduler, SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memoryParameters, ProcessingGroupParameters group)
setScheduler
in interface Schedulable
public boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
setSchedulingParametersIfFeasible
in interface Schedulable
public boolean waitForNextPeriod()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |