com.kuka.roboticsAPI.concurrencyModel
Class CyclicTask

java.lang.Object
  extended by com.kuka.roboticsAPI.concurrencyModel.CyclicTask
All Implemented Interfaces:
Runnable

public abstract class CyclicTask
extends Object
implements Runnable

A CyclicTask runs within a doCyclic call. It performs cyclic actions in a programmed interval. It the task isn't able to perform it's actions within the interval, the user can choose to fail or to ignore the missing time.

This element is not in its final state and might change in future versions.

Constructor Summary
CyclicTask()
           
 
Method Summary
protected  void initialize()
          Initializes this cyclic task.
protected  void onCancel()
          This method is called when the cyclic task is cancelled.
abstract  void run()
          Runs the cyclic task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CyclicTask

public CyclicTask()
Method Detail

run

public abstract void run()
Runs the cyclic task. This method is called in every cycle and should not exceed the specified cycle time. If it exceeds the cycle time, the CyclicTaskBehavior defines the reaction of the cyclic task.

Specified by:
run in interface Runnable
This element is not in its final state and might change in future versions.

onCancel

protected void onCancel()
This method is called when the cyclic task is cancelled. You have the opportunity to cleanup resources, which aren't cleanup up automatically.

The method should not take very much time, because it may delay other cyclic tasks in the group which should get cancelled, too.


initialize

protected void initialize()
Initializes this cyclic task.

This method is called only once before any task in the task group of this task is executed. It is called on the thread which will execute the task (and all other tasks in the task group).



Copyright © 2019. All rights reserved.