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

Go to the source code of this file.

Classes

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

Namespaces

 tsm
 

Typedefs

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

Variables

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