-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
/** | ||
* @file task.hpp | ||
* @author Charlie Kushulevsky ([email protected]) | ||
* @author Nathan Hui ([email protected]) | ||
* @brief | ||
* @version 0.1 | ||
* @date 2024-10-31 | ||
* | ||
* @copyright Copyright (c) 2024 | ||
* | ||
*/ | ||
#ifndef __TASK_HPP__ | ||
#define __TASK_HPP__ | ||
#include "states.hpp" | ||
/** | ||
* @brief Abstract Base Class for Tasks | ||
* | ||
* This task is the effective abstraction of a state in a state machine. | ||
* | ||
*/ | ||
class Task { | ||
public: | ||
public: | ||
/** | ||
* @brief Initializes the task. This assumes entry from any other state. | ||
* If this fails, Task::run must handle switching to the appropriate task | ||
|
@@ -11,7 +28,7 @@ class Task { | |
virtual void init(void) = 0; | ||
|
||
/** | ||
* @brief should be the task body. This should execute until a state change | ||
* @brief State logic body. This should execute until a state change | ||
* needs to occur, in which case the state to change to should be returned. | ||
* Once the state to change to is returned, Task::exit will be called to | ||
* clean up from this state. | ||
|