adapnex::core::Task
Task represents a base class to implement schedulable application components. Tasks are combined via TaskGroup and executed by the scheduler according to the given scheduling parameters. See Application::CreateCyclicTaskGroup() and Application::CreateFreewheelingTaskGroup().
Description
|
Task objects are generally not instantiated directly. Instead, use TaskGroup::CreateTask() to instantiate the task and add it to the task group and scheduler. |
Member Functions
Name |
Description |
|
Destructor |
Protected Member Functions
Name |
Description |
|
The PostUpdate method provides an opportunity to do some processing after all Update() methods have been invoked each cycle. Drivers generally use this to update any outputs that might have been written to by other tasks. |
|
The PreUpdate method provides an opportunity to do some processing before any Update() methods are invoked each cycle. Drivers generally use this step to update any inputs that might be consumed by other tasks. |
|
The Setup method is called once during the setup phase of the application after the setup() function has returned. Any remaining configuration or memory allocation that could not be handled in the constructor should occur here. The order in the Setup methods for each Task are called is dependent on the order in which the containing task groups are created followed by the order in which the tasks are added to their respective task groups. Drivers generally use this step to initialize any peripherals or devices, based on the previously defined configuration. |
|
The Update method is called repeatedly after the setup phase and should contain the main processing step for most tasks. Therefore, the method has no default implementation and must be overridden by every derived class. |
Friends
| Name | Description |
|---|---|
TaskGroup provides the interface used to schedule multiple tasks together on the same thread. This allows, for example, drivers to be scheduled together with the tasks reading or writing from their inputs or outputs. This approach allows the driver to synchronise updates with task execution so that the tasks observe a consistent view of the inputs and outputs each cycle. |
Derived Classes
| Name | Description |
|---|---|
Driver for all built‐in digital and analog I/O ports on the WAGO CC100. |
|
A helper class allowing a task to be defined by a lambda function. |
|
TaskGroup provides the interface used to schedule multiple tasks together on the same thread. This allows, for example, drivers to be scheduled together with the tasks reading or writing from their inputs or outputs. This approach allows the driver to synchronise updates with task execution so that the tasks observe a consistent view of the inputs and outputs each cycle. |
|
Driver for the X20BC0087 bus controller. |
Created with MrDocs