tin  1.5.9
core_algorithms.h File Reference

constexpr hierarchy algorithms used by the HSM runtime. More...

#include <array>
#include <cstddef>
#include <cstdint>
#include <type_traits>
#include "tsm/transition.h"
#include "tsm/type_list.h"
Include dependency graph for core_algorithms.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tsm::core::static_path< Capacity >
 
struct  tsm::core::transition_states< Transition >
 
struct  tsm::core::parent< Child, Parent >
 
struct  tsm::core::initial_child< Composite, Initial >
 
struct  tsm::core::detail::inferred_root< Context >
 
struct  tsm::core::transition_sequence< Capacity >
 
struct  tsm::core::detail::context_transition_list< Context >
 
struct  tsm::core::detail::nested_states_for_state< State, Parent, IsComposite >
 
struct  tsm::core::detail::nested_states_for_state< State, Parent, true >
 
struct  tsm::core::detail::nested_transitions_for_state< State, IsComposite >
 
struct  tsm::core::detail::nested_transitions_for_state< State, true >
 
struct  tsm::core::detail::inferred_parent_for_state< State, Parent, IsFinal, IsHistory >
 
struct  tsm::core::detail::inferred_parent_for_state< State, Parent, true, false >
 
struct  tsm::core::detail::inferred_parent_for_state< State, Parent, false, true >
 
struct  tsm::core::detail::parent_edges_for_state< State, Parent, IsComposite >
 
struct  tsm::core::detail::parent_edges_for_state< State, Parent, true >
 
struct  tsm::core::detail::initial_edges_for_state< State, IsComposite >
 
struct  tsm::core::detail::initial_edges_for_state< State, true >
 
struct  tsm::core::detail::local_leaf_states_for_state< State, IsComposite >
 
struct  tsm::core::detail::local_leaf_states_for_state< State, true >
 
struct  tsm::core::infer_hierarchy< Context, Root >
 
struct  tsm::core::infer_hierarchy< Context, Root >::type
 

Namespaces

 tsm
 
 tsm::core
 
 tsm::core::detail
 

Typedefs

template<typename TransitionList >
using tsm::core::get_states_t = typename get_states< TransitionList >::type
 
template<typename TransitionList >
using tsm::core::get_events_t = typename get_events< TransitionList >::type
 
template<typename ParentList >
using tsm::core::parent_map_from_list_t = typename parent_map_from_list< ParentList >::type
 
template<typename InitialChildList >
using tsm::core::initial_child_map_from_list_t = typename initial_child_map_from_list< InitialChildList >::type
 
template<typename Context , typename Root = detail::inferred_root<Context>>
using tsm::core::infer_hierarchy_t = typename infer_hierarchy< Context, Root >::type
 
template<typename Context >
using tsm::core::detail::context_transition_list_t = typename context_transition_list< Context >::type
 
template<typename Context >
using tsm::core::detail::direct_states_t = get_states_t< context_transition_list_t< Context > >
 
template<typename Context >
using tsm::core::detail::direct_state_set_t = tsm::detail::type_set< direct_states_t< Context > >
 

Functions

template<typename T , typename... Ts>
consteval std::size_t tsm::core::index_in_pack ()
 
template<typename T , typename... Ts>
consteval bool tsm::core::contains_type ()
 
template<typename From , typename Event , typename... TransitionEntries>
consteval std::size_t tsm::core::trigger_count ()
 
template<typename From , typename Event , typename... TransitionEntries>
consteval bool tsm::core::duplicate_group_is_guarded ()
 
template<typename From , typename Event , typename... TransitionEntries>
consteval std::size_t tsm::core::duplicate_group_unguarded_count ()
 
template<typename From , typename Event , typename... TransitionEntries>
consteval bool tsm::core::trigger_group_is_valid ()
 
template<typename... TransitionEntries>
consteval bool tsm::core::transition_triggers_are_valid ()
 
template<typename Hierarchy >
constexpr auto tsm::core::compute_transition_sequence (std::uint16_t source, std::uint16_t destination)
 
template<typename Hierarchy >
constexpr auto tsm::core::compute_local_transition_sequence (std::uint16_t active_leaf, std::uint16_t selected_source, std::uint16_t destination)
 
template<typename Hierarchy >
constexpr auto tsm::core::compute_reentering_transition_sequence (std::uint16_t active_leaf, std::uint16_t selected_source, std::uint16_t destination)
 

Variables

constexpr std::uint16_t tsm::core::npos = 0xFFFFU
 
template<typename TransitionList >
concept tsm::core::transition_list_like
 
template<typename From , typename Event , typename Transition >
constexpr bool tsm::core::same_trigger_v
 

Detailed Description

constexpr hierarchy algorithms used by the HSM runtime.

Builds and queries numeric hierarchy tables: state IDs, parent links, initial children, active paths, least common ancestors, exit sequences, and entry sequences. This header has no callback, queue, or platform dependencies.