ArPiRobot-CoreLib C++
C++ library for ArPiRobot robots
|
#include <arpirobot/core/action/ActionSeries.hpp>
Public Member Functions | |
ActionSeries (std::vector< std::reference_wrapper< Action >> actions, Action &finishedAction) | |
ActionSeries (std::vector< std::shared_ptr< Action >> actions, Action &finishedAction) | |
ActionSeries (std::vector< std::reference_wrapper< Action >> actions, std::shared_ptr< Action > finishedAction) | |
ActionSeries (std::vector< std::shared_ptr< Action >> actions, std::shared_ptr< Action > finishedAction) | |
![]() | |
Action (int32_t processRateMs=-1) | |
bool | isRunning () |
int32_t | getProcessPeriodMs () |
void | setProcessPeriodMs (int32_t processPeriodMs) |
Protected Member Functions | |
LockedDeviceList | lockedDevices () override |
void | begin () override |
void | process () override |
void | finish (bool interrupted) override |
bool | shouldContinue () override |
A special action that will run a sequential set of actions (one at a time)
arpirobot::ActionSeries::ActionSeries | ( | std::vector< std::reference_wrapper< Action >> | actions, |
Action & | finishedAction | ||
) |
actions | A vector of actions to run sequentially (actions must remain in scope for lifetime of ActionSeries) |
finishedAction | An action to transition to once other actions are complete (must remain in scope) |
arpirobot::ActionSeries::ActionSeries | ( | std::vector< std::shared_ptr< Action >> | actions, |
Action & | finishedAction | ||
) |
actions | A vector of actions to run sequentially (shared_ptrs to can use std::make_shared) |
finishedAction | An action to transition to once other actions are complete (must remain in scope) |
arpirobot::ActionSeries::ActionSeries | ( | std::vector< std::reference_wrapper< Action >> | actions, |
std::shared_ptr< Action > | finishedAction | ||
) |
actions | A vector of actions to run sequentially (actions must remain in scope for lifetime of ActionSeries) |
finishedAction | An action to transition to once other actions are complete (can use std::make_shared) |
arpirobot::ActionSeries::ActionSeries | ( | std::vector< std::shared_ptr< Action >> | actions, |
std::shared_ptr< Action > | finishedAction | ||
) |
actions | A vector of actions to run sequentially (shared_ptrs to can use std::make_shared) |
finishedAction | An action to transition to once other actions are complete (can use std::make_shared) |
|
overrideprotectedvirtual |
Run when the action is started.
Implements arpirobot::Action.
|
overrideprotectedvirtual |
Run when the action is stopped.
wasInterrupted | Will be true if the action did not stop on its own (see Action::shouldContinue) |
Implements arpirobot::Action.
|
overrideprotectedvirtual |
Run periodically after the action is started, but before it finishes.
Implements arpirobot::Action.
|
overrideprotectedvirtual |
Called each time after Action::process. When this returns false the action will stop.
Implements arpirobot::Action.