Public Member Functions | Private Attributes | List of all members
packml_sm::PackmlState Struct Referenceabstract

#include <packml_states.h>

Inheritance diagram for packml_sm::PackmlState:
Inheritance graph
[legend]

Public Member Functions

template<class Event , class FSM >
void on_entry (Event const &event, FSM &state_machine)
 
template<class Event , class FSM >
void on_exit (Event const &event, FSM &state_machine)
 
template<class FSM >
void runStateMethod (FSM *state_machine_ptr)
 
void setStateMethod (std::function< int()> state_method)
 
virtual StatesEnum stateId ()=0
 
virtual std::string stateName ()=0
 

Private Attributes

double cummulative_time_ = 0.0f
 
std::atomic< bool > is_exiting_
 
std::atomic< bool > is_running_
 
std::chrono::steady_clock::time_point start_time_
 
std::function< int()> state_method_
 
std::future< void > state_method_future_
 
std::string state_name_
 

Detailed Description

Definition at line 31 of file packml_states.h.

Member Function Documentation

template<class Event , class FSM >
void packml_sm::PackmlState::on_entry ( Event const &  event,
FSM &  state_machine 
)
inline

Definition at line 68 of file packml_states.h.

template<class Event , class FSM >
void packml_sm::PackmlState::on_exit ( Event const &  event,
FSM &  state_machine 
)
inline

Definition at line 87 of file packml_states.h.

template<class FSM >
void packml_sm::PackmlState::runStateMethod ( FSM *  state_machine_ptr)
inline

Definition at line 43 of file packml_states.h.

void packml_sm::PackmlState::setStateMethod ( std::function< int()>  state_method)
inline

Definition at line 37 of file packml_states.h.

virtual StatesEnum packml_sm::PackmlState::stateId ( )
pure virtual
virtual std::string packml_sm::PackmlState::stateName ( )
pure virtual

Member Data Documentation

double packml_sm::PackmlState::cummulative_time_ = 0.0f
private

Definition at line 106 of file packml_states.h.

std::atomic<bool> packml_sm::PackmlState::is_exiting_
private

Definition at line 101 of file packml_states.h.

std::atomic<bool> packml_sm::PackmlState::is_running_
private

Definition at line 100 of file packml_states.h.

std::chrono::steady_clock::time_point packml_sm::PackmlState::start_time_
private

Definition at line 105 of file packml_states.h.

std::function<int()> packml_sm::PackmlState::state_method_
private

Definition at line 103 of file packml_states.h.

std::future<void> packml_sm::PackmlState::state_method_future_
private

Definition at line 104 of file packml_states.h.

std::string packml_sm::PackmlState::state_name_
private

Definition at line 102 of file packml_states.h.


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


packml_sm
Author(s): Shaun Edwards
autogenerated on Fri Jul 12 2019 03:30:55