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

#include <tsm.h>

Inheritance diagram for tsm::detail::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >:
Inheritance graph
Collaboration diagram for tsm::detail::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::detail::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::detail::PeriodicSleepTimer< Clock, Duration >
 PeriodicSleepTimer (Duration period=Duration(1))
 
void start ()
 
void wait ()
 
Duration get_period () const
 
- Public Member Functions inherited from tsm::detail::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::detail::PeriodicSleepTimer< Clock, Duration >
Duration period_
 
- Protected Attributes inherited from tsm::detail::Timer< Clock, Duration >
Clock::time_point start_time_
 
bool started_ { false }
 

Member Typedef Documentation

◆ HsmType

template<typename Context , template< typename > class Policy = ThreadedExecutionPolicy, typename PeriodicTimer = PeriodicSleepTimer<std::chrono::steady_clock, std::chrono::milliseconds>>
using tsm::detail::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::detail::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::detail::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::detail::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::detail::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::detail::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::detail::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::detail::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::detail::PeriodicExecutionPolicy< Context, Policy, PeriodicTimer >::tick_event_
protected

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