mirror of
https://github.com/nasa/fpp.git
synced 2025-12-14 01:11:35 -06:00
81 lines
2.2 KiB
C++
81 lines
2.2 KiB
C++
// ======================================================================
|
|
// \title NestedStateMachineAc.cpp
|
|
// \author Generated by fpp-to-cpp
|
|
// \brief cpp file for Nested state machine
|
|
// ======================================================================
|
|
|
|
#include "Fw/Types/Assert.hpp"
|
|
#include "NestedStateMachineAc.hpp"
|
|
|
|
namespace FppTest {
|
|
|
|
namespace SmInitial {
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Constructors and Destructors
|
|
// ----------------------------------------------------------------------
|
|
|
|
NestedStateMachineBase ::
|
|
NestedStateMachineBase()
|
|
{
|
|
|
|
}
|
|
|
|
NestedStateMachineBase ::
|
|
~NestedStateMachineBase()
|
|
{
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Initialization
|
|
// ----------------------------------------------------------------------
|
|
|
|
void NestedStateMachineBase ::
|
|
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
|
|
// ----------------------------------------------------------------------
|
|
|
|
NestedStateMachineBase::State NestedStateMachineBase ::
|
|
getState() const
|
|
{
|
|
return this->m_state;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// State and choice entry
|
|
// ----------------------------------------------------------------------
|
|
|
|
void NestedStateMachineBase ::
|
|
enter_S(Signal signal)
|
|
{
|
|
// Do the entry actions
|
|
this->action_a(signal);
|
|
this->action_a(signal);
|
|
// Enter the target of the initial transition
|
|
this->enter_S_T(signal);
|
|
}
|
|
|
|
void NestedStateMachineBase ::
|
|
enter_S_T(Signal signal)
|
|
{
|
|
// Do the entry actions
|
|
this->action_a(signal);
|
|
this->action_a(signal);
|
|
this->action_a(signal);
|
|
this->m_state = State::S_T;
|
|
}
|
|
|
|
}
|
|
|
|
}
|