mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-08-06 01:37:33 +00:00
Improved grouping and allow doxygen without other defines
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <sta/config.hpp>
|
||||
|
||||
#ifndef STA_TACOS_MANAGER_PRIORITY
|
||||
#if !defined(STA_TACOS_MANAGER_PRIORITY) && !defined(DOXYGEN)
|
||||
# error "Manger task priority not specified in config.hpp"
|
||||
#else
|
||||
|
||||
@@ -40,6 +40,8 @@ namespace sta
|
||||
public:
|
||||
/**
|
||||
* @brief Get the singleton instance of the manager.
|
||||
*
|
||||
* @ingroup tacos_manager
|
||||
*/
|
||||
static Manager* instance()
|
||||
{
|
||||
|
@@ -10,25 +10,55 @@
|
||||
|
||||
#include <sta/config.hpp>
|
||||
|
||||
#ifndef STA_TACOS_NUM_STATES
|
||||
#if !defined(STA_TACOS_NUM_STATES) && !defined(DOXYGEN)
|
||||
# error "Number of states wasn't defined in config.hpp"
|
||||
#else
|
||||
|
||||
|
||||
#ifndef STA_TACOS_INITIAL_STATE
|
||||
#if !defined(STA_TACOS_INITIAL_STATE) && !defined(DOXYGEN)
|
||||
# define STA_TACOS_INITIAL_STATE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup tacos_statemachine Statemachine Task
|
||||
* @ingroup tacos
|
||||
* @brief Statemachine task for TACOS.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief The maximum number of state transitions that can be queued.
|
||||
*
|
||||
* @ingroup tacos_statemachine
|
||||
*/
|
||||
#define STA_TACOS_STATEMACHINE_QUEUE_LENGTH 4
|
||||
|
||||
/**
|
||||
* @ingroup tacos_statemachine
|
||||
* @{
|
||||
*/
|
||||
|
||||
// State transition happened because of
|
||||
/**
|
||||
* @brief State change due to requested Transition.
|
||||
*/
|
||||
#define STA_TACOS_STATE_CHANGE_NORMAL_FLAG ( 0x1U )
|
||||
/**
|
||||
* @brief State change due to forced Transition.
|
||||
*/
|
||||
#define STA_TACOS_STATE_CHANGE_FORCED_FLAG ( 0x1U << 1)
|
||||
/**
|
||||
* @brief State change due to timeout.
|
||||
*/
|
||||
#define STA_TACOS_STATE_CHANGE_TIMEOUT ( 0x1U << 2)
|
||||
/**
|
||||
* @brief State change due to startup.
|
||||
*/
|
||||
#define STA_TACOS_STATE_CHANGE_STARTUP_FLAG ( 0x1U << 3)
|
||||
/**
|
||||
* @brief State change due to any reason.
|
||||
*/
|
||||
#define STA_TACOS_STATE_CHANGE_ALL_FLAG ( 0x15U )
|
||||
|
||||
/** @} */
|
||||
|
||||
#include <sta/tacos/thread.hpp>
|
||||
#include <sta/rtos/queue.hpp>
|
||||
@@ -40,13 +70,6 @@
|
||||
#include <functional>
|
||||
#include <tuple>
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup tacos_statemachine Statemachine Task
|
||||
* @ingroup tacos
|
||||
* @brief Statemachine task for TACOS.
|
||||
*/
|
||||
|
||||
namespace sta
|
||||
{
|
||||
namespace tacos
|
||||
@@ -72,10 +95,14 @@ namespace sta
|
||||
*/
|
||||
struct StateTransition
|
||||
{
|
||||
uint16_t from;
|
||||
uint16_t to;
|
||||
EventFlags event;
|
||||
uint32_t lockout;
|
||||
/// Origin of transition
|
||||
uint16_t from;
|
||||
/// Destination of transition
|
||||
uint16_t to;
|
||||
/// Event that triggered the transition
|
||||
EventFlags event;
|
||||
/// Lockout time after transition
|
||||
uint32_t lockout;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -61,7 +61,14 @@ namespace sta
|
||||
*/
|
||||
const char* getName() const;
|
||||
|
||||
/**
|
||||
* @brief Compare two threads by their names.
|
||||
*/
|
||||
bool operator==(const TacosThread& other) const;
|
||||
|
||||
/**
|
||||
* @brief Compare two threads by their names.
|
||||
*/
|
||||
bool operator<(const TacosThread& other) const;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user