mirror of
https://github.com/nasa/fpp.git
synced 2025-12-14 18:43:51 -06:00
70 lines
1.9 KiB
C++
70 lines
1.9 KiB
C++
// ======================================================================
|
|
// \title BasicStateMachineAc.cpp
|
|
// \author Generated by fpp-to-cpp
|
|
// \brief cpp file for Basic state machine
|
|
// ======================================================================
|
|
|
|
#include "BasicStateMachineAc.hpp"
|
|
#include "Fw/Types/Assert.hpp"
|
|
|
|
namespace FppTest {
|
|
|
|
namespace SmInitial {
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Constructors and Destructors
|
|
// ----------------------------------------------------------------------
|
|
|
|
BasicStateMachineBase ::
|
|
BasicStateMachineBase()
|
|
{
|
|
|
|
}
|
|
|
|
BasicStateMachineBase ::
|
|
~BasicStateMachineBase()
|
|
{
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Initialization
|
|
// ----------------------------------------------------------------------
|
|
|
|
void BasicStateMachineBase ::
|
|
initBase(const FwEnumStoreType id)
|
|
{
|
|
this->m_id = id;
|
|
// Do the actions for the state machine initial transition
|
|
this->action_a(Signal::__FPRIME_AC_INITIAL_TRANSITION);
|
|
// Enter the initial target of the state machine
|
|
this->enter_S(Signal::__FPRIME_AC_INITIAL_TRANSITION);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Getter functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
BasicStateMachineBase::State BasicStateMachineBase ::
|
|
getState() const
|
|
{
|
|
return this->m_state;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// State and choice entry
|
|
// ----------------------------------------------------------------------
|
|
|
|
void BasicStateMachineBase ::
|
|
enter_S(Signal signal)
|
|
{
|
|
// Do the entry actions
|
|
this->action_a(signal);
|
|
this->action_a(signal);
|
|
this->m_state = State::S;
|
|
}
|
|
|
|
}
|
|
|
|
}
|