#include <arpirobot/core/action/ActionManager.hpp>
|
class | BaseRobot |
|
class | Action |
|
class | ActionSeries |
|
Static helper class to manage actions and triggers
◆ addTrigger() [1/2]
Add a trigger to start an action when some event occurs.
- Parameters
-
trigger | A reference to trigger to add. Must remain in scope until removed. |
◆ addTrigger() [2/2]
static void arpirobot::ActionManager::addTrigger |
( |
std::shared_ptr< BaseActionTrigger > |
trigger | ) |
|
|
static |
Add a trigger to start an action when some event occurs.
- Parameters
-
trigger | A shared_ptr to the trigger to add. Can use with std::make_shared |
◆ removeTrigger() [1/2]
Remove a trigger
- Parameters
-
trigger | A reference to trigger to remove. |
◆ removeTrigger() [2/2]
static void arpirobot::ActionManager::removeTrigger |
( |
std::shared_ptr< BaseActionTrigger > |
trigger | ) |
|
|
static |
Remove a trigger
- Parameters
-
trigger | A shared_ptr to the trigger to remove |
◆ startAction() [1/2]
static bool arpirobot::ActionManager::startAction |
( |
Action & |
action, |
|
|
bool |
doRestart = true |
|
) |
| |
|
static |
Start an action
- Parameters
-
action | A reference to the action to start. Referenced action must remain in scope while action is running |
doRestart | If true starting an action that is already running will restart the action. If false the action will continue running uninterrupted. |
- Returns
- true if the action was started successfully
◆ startAction() [2/2]
static bool arpirobot::ActionManager::startAction |
( |
std::shared_ptr< Action > |
action, |
|
|
bool |
doRestart = true |
|
) |
| |
|
static |
Start an action
- Parameters
-
action | A shared_ptr to the action to start. Can use with std::make_shared |
doRestart | If true starting an action that is already running will restart the action. If false the action will continue running uninterrupted. |
- Returns
- true if the action was started successfully
◆ stopAction() [1/2]
static bool arpirobot::ActionManager::stopAction |
( |
Action & |
action | ) |
|
|
static |
Stop an action (interrupts it) If the action is not running nothing is done.
- Parameters
-
action | A reference to the action to stop. Referenced action must remain in scope while action is running |
- Returns
- true if the action was stopped. If false, the action was not running.
◆ stopAction() [2/2]
static bool arpirobot::ActionManager::stopAction |
( |
std::shared_ptr< Action > |
action | ) |
|
|
static |
Stop an action (interrupts it) If the action is not running nothing is done.
- Parameters
-
action | A shared_ptr to the action to stop. Can use with std::make_shared |
- Returns
- true if the action was stopped. If false, the action was not running.
The documentation for this class was generated from the following file: