Intro
Tutorials
Core
- Base Types
- Build System
- Developing Components
- Running Components
- System Management
- Data Analysis
- Graphical User Interface
- Simulating a Robot
Additional Core Functionality
Periodic Triggering
This is the most simple triggering method. When a task is declared periodic, the task context’s updateHook() method will be called with a fixed time period.
Declaration
To do this, simply add the periodic(period) statement to the task declaration in your deployments:
deployment "example" do
task('Task').
periodic(0.01)
end
The period is given in seconds. Deploying with a periodic triggering disables port-based triggers as well as fd-based triggers
C++ task implementation
This triggering mechanism does not require any specific change to the C++ task implementation.
Nonetheless, if a periodic activity is used, then TaskContext::getPeriod() will return the period in seconds.