// ====================================================================== // \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); // Update the state this->m_state = State::S; } } }