Skip to content
Daniel Heater edited this page Apr 17, 2015 · 1 revision

User SRTX tasks inherit from a base Task class and have a standard set of methods invoked by SRTX:

  • init()
  • execute()
  • terminate()

The init() method is called automatically when a task is started.

The execute() method is called at the periodic rate of the task, or, if an asynchronous task, executes in a continuous loop. It is therefore important to have some blocking call in your asynchronous task to prevent it from hogging the system. The execute() method continues to run as long as the function returns true. If the function returns false it will no longer by scheduled.

The terminate() method is called to perform task cleanup.

Clone this wiki locally