adapnex::core::TaskGroup

Schedules 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.

Synopsis

Declared in <adapnex/core/task_group.h>

class TaskGroup
    : public Task

Description

TaskGroup objects are not instantiated directly. Instead, use Application::CreateCyclicTaskGroup() or Application::CreateFreewheelingTaskGroup() to instantiate the task group and add it to the scheduler.

Base Classes

Name

Description

Task

Base class for 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().

Member Functions

Name

Description

TaskGroup [constructor]

Default constructor

CreateTask

Creates a task and adds it to the task group for scheduling. Tasks may also be created from the Setup() method of another task in the same task group, and take part in the same setup phase.

Protected Member Functions

Name

Description

TaskGroup [constructor]

Construct from shared_ptr

PostUpdate [virtual]

PreUpdate [virtual]

Setup [virtual]

TearDown [virtual]

Update [virtual]

Friends

Name

Description

adapnex::core::TaskGroup_RejectsTasksAfterSetup_Test

adapnex::core::TaskGroup_SetsUpTasksAddedDuringSetup_Test

adapnex::core::TaskGroup_Update_Test

Created with MrDocs