tsm 0.1.0
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Variables
tsm.h File Reference
#include <functional>
#include <tuple>
#include <type_traits>
#include <utility>
#include <variant>
#include "FreeRTOS.h"
#include "semphr.h"
#include "task.h"
#include <cstdio>
#include <sched.h>
#include <sys/mman.h>
#include <time.h>
Include dependency graph for tsm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tsm::detail::wrap_type_impl< Wrapper, std::tuple< Ts... > >
 
struct  tsm::detail::append_unique_impl< T, std::tuple<> >
 
struct  tsm::detail::append_unique_impl< T, std::tuple< Ts... > >
 
struct  tsm::detail::unique_tuple_impl< std::tuple<>, std::tuple< Us... > >
 
struct  tsm::detail::unique_tuple_impl< std::tuple< T, Ts... >, std::tuple< Us... > >
 
struct  tsm::detail::unique_tuple< Ts, Us >
 
struct  tsm::detail::tuple_to_variant_impl< std::tuple< Ts... > >
 
struct  tsm::detail::Event
 
struct  tsm::detail::wrapped_event< T >
 
struct  tsm::detail::BaseTransition< From, Event, To >
 
struct  tsm::detail::Transition< From, Event, To, Action, Guard >
 
struct  tsm::detail::ClockTickEvent
 
struct  tsm::detail::ClockedTransition< From, To, Action, Guard >
 
struct  tsm::detail::get_states_impl< Tuple >
 
struct  tsm::detail::get_states_impl< Tuple, First, Rest... >
 
struct  tsm::detail::get_states< std::tuple< Ts... > >
 
struct  tsm::detail::is_transition_match< Transition, From, Event >
 
struct  tsm::detail::is_transition_match< Transition< From, Event, To, Action, Guard >, From, Event >
 
struct  tsm::detail::transition_map_helper< From, Event, std::tuple< Transitions... >, Index, std::enable_if_t<(Index< sizeof...(Transitions))> >
 
struct  tsm::detail::transition_map_helper< From, Event, std::tuple< Transitions... >, Index, std::enable_if_t<!(Index< sizeof...(Transitions))> >
 
struct  tsm::detail::TransitionMap< From, Event, Transitions >
 
struct  tsm::detail::has_exit< T, Event, typename >
 
struct  tsm::detail::has_exit< T, Event, std::void_t< std::disjunction< std::is_invocable< decltype(&T::exit), T >, std::is_invocable< decltype(&T::exit), T, T & >, std::is_invocable< decltype(&T::exit), T, Event > > > >
 
struct  tsm::detail::has_entry< T, Event, typename >
 
struct  tsm::detail::has_entry< T, Event, std::void_t< std::disjunction< std::is_invocable< decltype(&T::entry), T >, std::is_invocable< decltype(&T::entry), T & >, std::is_invocable< decltype(&T::entry), T, Event > > > >
 
struct  tsm::detail::has_guard< T, Event, typename >
 
struct  tsm::detail::has_guard< T, Event, std::void_t< std::disjunction< std::is_invocable< decltype(&T::guard), T >, std::is_invocable< decltype(&T::guard), T & >, std::is_invocable< decltype(&T::guard), T, Event > > > >
 
struct  tsm::detail::has_action< T, Event, typename >
 
struct  tsm::detail::has_action< T, Event, std::void_t< std::disjunction< std::is_invocable< decltype(&T::action), T >, std::is_invocable< decltype(&T::action), T & >, std::is_invocable< decltype(&T::action), T, Event > > > >
 
struct  tsm::detail::has_transitions< typename, typename >
 
struct  tsm::detail::has_transitions< T, std::void_t< typename T::transitions > >
 
struct  tsm::detail::has_handle_method< State, Event, Context, typename >
 
struct  tsm::detail::has_handle_method< State, Event, Context, std::void_t< decltype(std::declval< State >().handle(std::declval< Context & >(), std::declval< Event >()))> >
 
struct  tsm::detail::is_hsm_trait< typename, typename >
 
struct  tsm::detail::is_hsm_trait< T, std::void_t< decltype(T::is_hsm)> >
 
struct  tsm::detail::is_clocked_hsm< T, typename >
 
struct  tsm::detail::is_clocked_hsm< T, std::void_t< decltype(T::is_clocked_hsm)> >
 
struct  tsm::detail::Hsm< T, transitions >
 
struct  tsm::detail::make_hsm< T, std::enable_if_t<!is_state_trait_v< T > > >
 
struct  tsm::detail::wrap_transition< T >
 
struct  tsm::detail::wrap_transitions< std::tuple< Ts... > >
 
struct  tsm::detail::ClockedHsm< T, Policy >
 
struct  tsm::detail::make_hsm< T, std::enable_if_t< is_state_trait_v< T > > >
 
struct  tsm::detail::OrthogonalExecutionPolicy< Hsms >
 
struct  tsm::detail::EventQueueT< Event, LockType, ConditionVarType >
 
class  tsm::detail::FreeRTOSMutex
 
class  tsm::detail::FreeRTOSConditionVariable
 
struct  tsm::detail::FreeRTOSClock
 
struct  tsm::detail::ThreadedExecutionPolicy< HsmType, Events >
 
struct  tsm::detail::aggregate_events< std::tuple< Transitions... > >
 
struct  tsm::detail::aggregate_events< std::tuple<> >
 
struct  tsm::detail::get_events_from_transition< Transition >
 
struct  tsm::detail::get_events_from_hsm< HsmType, std::enable_if_t< has_transitions_v< HsmType > > >
 
struct  tsm::detail::get_events_from_hsm< HsmType, std::enable_if_t<!has_transitions_v< HsmType > > >
 
struct  tsm::detail::SingleThreadedExecutionPolicy< Context, Policy >
 
struct  tsm::detail::BlockingObserverT< LockType, ConditionVarType >
 
struct  tsm::detail::CallbackObserver
 
struct  tsm::detail::ThreadedExecWithObserver< Observer, Context, Policy >
 
struct  tsm::detail::Timer< Clock, Duration >
 Helper to implement a Timed Execution Policy. More...
 
struct  tsm::detail::IntervalTimer< Clock, Duration >
 
struct  tsm::detail::PeriodicSleepTimer< Clock, Duration >
 
struct  tsm::detail::RealtimeConfigurator
 
struct  tsm::detail::RealtimeExecutionPolicy< Context, Policy >
 
struct  tsm::detail::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >
 
struct  tsm::detail::RealtimePeriodicExecutionPolicy< Context, Policy, PeriodicTimer >
 
struct  tsm::detail::ConcurrentExecutionPolicy< Hsms >
 
struct  tsm::detail::make_concurrent_hsm< Policy, Ts >
 

Namespaces

namespace  tsm
 
namespace  tsm::detail
 

Typedefs

template<template< class > class Wrapper, typename Tuple >
using tsm::detail::wrap_type = typename wrap_type_impl< Wrapper, Tuple >::type
 
template<typename T , typename Tuple >
using tsm::detail::append_unique = typename append_unique_impl< T, Tuple >::type
 
template<typename Ts >
using tsm::detail::unique_tuple_t = typename unique_tuple< Ts >::type
 
template<typename Tuple >
using tsm::detail::tuple_to_variant_t = typename tuple_to_variant_impl< Tuple >::type
 
template<typename... Ts>
using tsm::detail::get_states_t = typename get_states< Ts... >::type
 
template<typename From , typename Event , typename Transitions >
using tsm::detail::find_transition_t = typename TransitionMap< From, Event, Transitions >::type
 
template<typename T >
using tsm::detail::has_transitions_t = typename has_transitions< T >::type
 
template<typename T >
using tsm::detail::is_hsm_trait_t = typename is_hsm_trait< T >::type
 
template<typename T >
using tsm::detail::make_hsm_t = typename make_hsm< T >::type
 
template<typename T >
using tsm::detail::wrap_transition_t = typename wrap_transition< T >::type
 
template<typename... Ts>
using tsm::detail::wrap_transitions_t = typename wrap_transitions< Ts... >::type
 
template<typename Event >
using tsm::detail::EventQueue = EventQueueT< Event, FreeRTOSMutex, FreeRTOSConditionVariable >
 
template<typename HsmType >
using tsm::detail::get_events_t = unique_tuple_t< typename get_events_from_hsm< HsmType >::type >
 
using tsm::detail::BlockingObserver = BlockingObserverT< FreeRTOSMutex, FreeRTOSConditionVariable >
 
template<typename Context >
using tsm::detail::ThreadedBlockingObserver = ThreadedExecWithObserver< Context, BlockingObserver >
 
template<template< typename > class Policy = ThreadedExecutionPolicy, typename... Ts>
using tsm::detail::make_concurrent_hsm_t = typename make_concurrent_hsm< Policy, Ts... >::type
 
template<typename Context , template< class > class Policy = detail::SingleThreadedExecutionPolicy>
using tsm::SingleThreadedHsm = Policy< Context >
 
template<typename Context , template< class > class Policy = detail::ThreadedExecutionPolicy>
using tsm::ThreadedHsm = Policy< Context >
 
template<typename Context , template< class > class Policy = detail::PeriodicExecutionPolicy>
using tsm::PeriodicHsm = Policy< Context >
 
template<typename Context , template< class > class Policy = detail::RealtimePeriodicExecutionPolicy>
using tsm::RealtimePeriodicHsm = Policy< Context >
 
template<typename Context , template< class > class Policy = detail::RealtimeExecutionPolicy>
using tsm::RealtimeHsm = Policy< Context >
 
template<template< typename > class Policy = detail::ThreadedExecutionPolicy, typename... Contexts>
using tsm::ConcurrentHsm = detail::make_concurrent_hsm_t< Policy, Contexts... >
 

Variables

template<typename State , typename Event , typename Transitions >
constexpr bool tsm::detail::has_valid_transition_v
 
template<typename T , typename Event >
constexpr bool tsm::detail::has_exit_v = has_exit<T, Event>::value
 
template<typename T , typename Event >
constexpr bool tsm::detail::has_entry_v = has_entry<T, Event>::value
 
template<typename T , typename Event >
constexpr bool tsm::detail::has_guard_v = has_guard<T, Event>::value
 
template<typename T , typename Event >
constexpr bool tsm::detail::has_action_v = has_action<T, Event>::value
 
template<typename T >
constexpr bool tsm::detail::has_transitions_v = has_transitions<T>::value
 
template<typename State , typename Event , typename Context >
constexpr bool tsm::detail::has_handle_method_v
 
template<typename T >
constexpr bool tsm::detail::is_hsm_trait_v = is_hsm_trait<T>::value
 
template<typename T >
constexpr bool tsm::detail::is_state_trait_v
 
template<typename T >
constexpr bool tsm::detail::is_clocked_hsm_v = is_clocked_hsm<T>::value
 
constexpr int tsm::detail::MaxEvents = 10