tsm  0.1.0
Public Types | Public Member Functions | Protected Attributes | List of all members
tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer > Struct Template Reference

#include <tsm_impl.h>

Inheritance diagram for tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >:
Inheritance graph
Collaboration diagram for tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >:
Collaboration graph

Public Types

using type = PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >
 
using HsmType = typename Policy< Context >::type
 
using TimerType = PeriodicTimer
 
- Public Types inherited from tsm::ThreadedExecutionPolicy< Context >
using Event = tuple_to_variant_t< Events >
 
using Event = tuple_to_variant_t< get_events_t< Context > >
 
using TaskCallback = void(*)(ThreadedExecutionPolicy *)
 
using type = ThreadedExecutionPolicy< Context, Policy >
 
using HsmType = typename Policy< Context >::type
 
- Public Types inherited from tsm::Timer< Clock, Duration >
using ClockType = Clock
 
using DurationType = Duration
 

Public Member Functions

void start ()
 
void stop ()
 
virtual ~PeriodicExecutionPolicy ()
 
int get_ticks ()
 
- Public Member Functions inherited from tsm::ThreadedExecutionPolicy< Context >
 ThreadedExecutionPolicy ()
 
virtual ~ThreadedExecutionPolicy ()
 
virtual ~ThreadedExecutionPolicy ()
 
void send_event (const Event &event)
 
void send_event (Event &&event)
 
void start ()
 
void stop ()
 
- Public Member Functions inherited from tsm::PeriodicSleepTimer< std::chrono::steady_clock, std::chrono::milliseconds >
 PeriodicSleepTimer (std::chrono::milliseconds period=std::chrono::milliseconds(1))
 
void start ()
 
void wait ()
 
std::chrono::milliseconds get_period () const
 
- Public Member Functions inherited from tsm::Timer< Clock, Duration >
void start ()
 
Duration elapsed () const
 
template<typename ToDuration = Duration>
Duration elapsed (ToDuration since) const
 
template<typename ToDuration >
ToDuration elapsed () const
 
bool started () const
 
void reset ()
 
void stop ()
 

Protected Attributes

std::thread eventThread_
 
ClockTickEvent tick_event_
 
- Protected Attributes inherited from tsm::ThreadedExecutionPolicy< Context >
TaskCallback taskCallback
 
TaskHandle_t smTaskHandle
 
EventQueue eventQueue
 
BaseType_t interrupt_
 
bool interrupt_
 
std::thread smThread_
 
EventQueue< EventeventQueue_
 
- Protected Attributes inherited from tsm::PeriodicSleepTimer< std::chrono::steady_clock, std::chrono::milliseconds >
std::chrono::milliseconds period_
 
- Protected Attributes inherited from tsm::Timer< Clock, Duration >
Clock::time_point start_time_
 
bool started_ { false }
 

Additional Inherited Members

- Protected Member Functions inherited from tsm::ThreadedExecutionPolicy< Context >
void step ()
 
void process_event ()
 
void process_event ()
 
- Static Protected Member Functions inherited from tsm::ThreadedExecutionPolicy< Context >
static void StepTask (void *pvParameters)
 

Member Typedef Documentation

◆ HsmType

template<typename Context , template< typename > class Policy = ThreadedExecutionPolicy, typename PeriodicTimer = PeriodicSleepTimer<std::chrono::steady_clock, std::chrono::milliseconds>>
using tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >::HsmType = typename Policy<Context>::type

◆ TimerType

template<typename Context , template< typename > class Policy = ThreadedExecutionPolicy, typename PeriodicTimer = PeriodicSleepTimer<std::chrono::steady_clock, std::chrono::milliseconds>>
using tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >::TimerType = PeriodicTimer

◆ type

template<typename Context , template< typename > class Policy = ThreadedExecutionPolicy, typename PeriodicTimer = PeriodicSleepTimer<std::chrono::steady_clock, std::chrono::milliseconds>>
using tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >::type = PeriodicExecutionPolicy<Context, Policy, PeriodicTimer>

Constructor & Destructor Documentation

◆ ~PeriodicExecutionPolicy()

template<typename Context , template< typename > class Policy = ThreadedExecutionPolicy, typename PeriodicTimer = PeriodicSleepTimer<std::chrono::steady_clock, std::chrono::milliseconds>>
virtual tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >::~PeriodicExecutionPolicy ( )
inlinevirtual

Member Function Documentation

◆ get_ticks()

template<typename Context , template< typename > class Policy = ThreadedExecutionPolicy, typename PeriodicTimer = PeriodicSleepTimer<std::chrono::steady_clock, std::chrono::milliseconds>>
int tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >::get_ticks ( )
inline

◆ start()

template<typename Context , template< typename > class Policy = ThreadedExecutionPolicy, typename PeriodicTimer = PeriodicSleepTimer<std::chrono::steady_clock, std::chrono::milliseconds>>
void tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >::start ( )
inline

◆ stop()

template<typename Context , template< typename > class Policy = ThreadedExecutionPolicy, typename PeriodicTimer = PeriodicSleepTimer<std::chrono::steady_clock, std::chrono::milliseconds>>
void tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >::stop ( )
inline

Member Data Documentation

◆ eventThread_

template<typename Context , template< typename > class Policy = ThreadedExecutionPolicy, typename PeriodicTimer = PeriodicSleepTimer<std::chrono::steady_clock, std::chrono::milliseconds>>
std::thread tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >::eventThread_
protected

◆ tick_event_

template<typename Context , template< typename > class Policy = ThreadedExecutionPolicy, typename PeriodicTimer = PeriodicSleepTimer<std::chrono::steady_clock, std::chrono::milliseconds>>
ClockTickEvent tsm::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >::tick_event_
protected

The documentation for this struct was generated from the following file: