|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
jp.go.aist.rtm.RTC.PeriodicTaskBase
jp.go.aist.rtm.RTC.PeriodicTask
public class PeriodicTask
PeriodicTask class
| Nested Class Summary | |
|---|---|
protected class |
PeriodicTask.alive_t
alive_t class |
protected class |
PeriodicTask.statistics_t
Structure for task execution time measurement management |
protected class |
PeriodicTask.suspend_t
Class for task suspend management |
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected PeriodicTask.alive_t |
m_alive
Task alive flag |
protected boolean |
m_deleteInDtor
Task execution function delete flag |
protected int |
m_execCount
Task execution time measurement count |
protected int |
m_execCountMax
Task execution time measurement max count |
protected boolean |
m_execMeasure
Task execution time measurement flag |
protected PeriodicTask.statistics_t |
m_execStat
Task execution time measurement statistics |
protected TimeMeasure |
m_execTime
Task execution time measurement infomation |
protected TaskFuncBase |
m_func
Task execution function |
protected boolean |
m_nowait
Thread sleep flag |
protected TimeValue |
m_period
Task execution period |
protected int |
m_periodCount
Task periodic time measurement count |
protected int |
m_periodCountMax
Task periodic time measurement max count |
protected boolean |
m_periodMeasure
Task periodic time measurement flag |
protected PeriodicTask.statistics_t |
m_periodStat
Task periodic time measurement statistics |
protected TimeMeasure |
m_periodTime
Task periodic time measurement infomation |
protected PeriodicTask.suspend_t |
m_suspend
Task suspend infomation |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
PeriodicTask()
Constructor |
|
| Method Summary | |
|---|---|
void |
_finalize()
Finalizing the task |
int |
_resume()
Resuming the suspended task |
int |
_suspend()
Suspending the task |
void |
activate()
Starting the task |
PeriodicTaskBase |
creator_()
Creats PeriodicTask. |
void |
destructor_(java.lang.Object obj)
Destroys the object. |
void |
executionMeasure(boolean value)
Validate a Task execute time measurement |
void |
executionMeasureCount(int n)
Task period time measurement count |
TimeMeasure.Statistics |
getExecStat()
Get a result in task execute time measurement |
TimeMeasure.Statistics |
getPeriodStat()
Get a result in task period time measurement |
void |
periodicMeasure(boolean value)
Validate a Task period time measurement |
void |
periodicMeasureCount(int n)
Task period time measurement count |
static void |
PeriodicTaskInit()
Initialization |
void |
run()
Thread execution |
void |
setPeriod(double period)
Setting task execution period |
void |
setPeriod(TimeValue period)
Setting task execution period |
boolean |
setTask(java.lang.Object obj)
Setting task execution function |
boolean |
setTask(java.lang.Object obj,
boolean delete_in_dtor)
Setting task execution function |
boolean |
setTask(java.lang.Object obj,
java.lang.String func)
Setting task execution function |
boolean |
setTask(java.lang.Object obj,
java.lang.String func,
boolean delete_in_dtor)
Setting task execution function |
void |
signal()
Executing the suspended task one tick |
protected void |
sleep()
Thread sleep |
protected int |
svc()
Thread execution for PeriodicTask |
protected void |
updateExecStat()
Update for execute state |
protected void |
updatePeriodStat()
Update for period state |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected TimeValue m_period
protected boolean m_nowait
protected TaskFuncBase m_func
protected boolean m_deleteInDtor
protected PeriodicTask.alive_t m_alive
protected PeriodicTask.suspend_t m_suspend
protected boolean m_execMeasure
protected int m_execCount
protected int m_execCountMax
protected PeriodicTask.statistics_t m_execStat
protected TimeMeasure m_execTime
protected boolean m_periodMeasure
protected int m_periodCount
protected int m_periodCountMax
protected PeriodicTask.statistics_t m_periodStat
protected TimeMeasure m_periodTime
| Constructor Detail |
|---|
public PeriodicTask()
| Method Detail |
|---|
public void activate()
Starting a thread to execute a task. If the task/thread is started properly, it will return 'TRUE'. if the task/thread are already started or task function object is not set, 'FALSE' will be returned.
activate in class PeriodicTaskBasepublic void _finalize()
Finalizing the task running.
_finalize in class PeriodicTaskBasepublic int _suspend()
Suspending the task running.
_suspend in class PeriodicTaskBasepublic int _resume()
Resuming the suspended task
_resume in class PeriodicTaskBasepublic void signal()
Executing the suspended task one tick
signal in class PeriodicTaskBase
public boolean setTask(java.lang.Object obj,
java.lang.String func,
boolean delete_in_dtor)
setTask in class PeriodicTaskBaseobj -
Objectfunc -
Function namedelete_in_dtor -
Delete flag.public boolean setTask(java.lang.Object obj)
setTask in class PeriodicTaskBaseobj -
object
public boolean setTask(java.lang.Object obj,
java.lang.String func)
setTask in class PeriodicTaskBaseobj -
Objectfunc -
Function name
public boolean setTask(java.lang.Object obj,
boolean delete_in_dtor)
setTask in class PeriodicTaskBaseobj -
Objectdelete_in_dtor -
Delete flag.public void setPeriod(double period)
setPeriod in class PeriodicTaskBaseperiod -
Execution period [sec]public void setPeriod(TimeValue period)
setPeriod in class PeriodicTaskBaseperiod -
period Execution periodpublic void executionMeasure(boolean value)
This function can set the measurement of the execution time effective/invalidly.
executionMeasure in class PeriodicTaskBasevalue -
true:effectuationpublic void executionMeasureCount(int n)
This function sets the cycle to measure the execution time.
executionMeasureCount in class PeriodicTaskBasen -
Cycle frequencypublic void periodicMeasure(boolean value)
This function can set the measurement of the execution time effective/invalidly.
periodicMeasure in class PeriodicTaskBasevalue -
true:effectuationpublic void periodicMeasureCount(int n)
This function sets the cycle to measure the execution time.
periodicMeasureCount in class PeriodicTaskBasen -
Cycle frequencypublic TimeMeasure.Statistics getExecStat()
This function acquires the measurement result of the execution time.
getExecStat in class PeriodicTaskBasepublic TimeMeasure.Statistics getPeriodStat()
This function acquires the measurement result at time of the cycle.
getPeriodStat in class PeriodicTaskBaseprotected int svc()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadprotected void sleep()
protected void updateExecStat()
protected void updatePeriodStat()
public PeriodicTaskBase creator_()
creator_ in interface ObjectCreator<PeriodicTaskBase>public void destructor_(java.lang.Object obj)
destructor_ in interface ObjectDestructorobj -
The target instances for destructionpublic static void PeriodicTaskInit()
Adds the object to the factory.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||