QP/C++  7.3.4
Real-Time Embedded Framework
Loading...
Searching...
No Matches
QP::QHsmDummy Class Reference

Dummy HSM class for testing. More...

#include "qs.hpp"

Inheritance diagram for QP::QHsmDummy:
QP::QAsm

Public Member Functions

 QHsmDummy ()
 
void init (void const *const e, std::uint_fast8_t const qsId) override
 
void dispatch (QEvt const *const e, std::uint_fast8_t const qsId) override
 
- Public Member Functions inherited from QP::QAsm
virtual void init (std::uint_fast8_t const qsId)
 
virtual bool isIn (QStateHandler const state) noexcept
 
QStateHandler state () const noexcept
 
QMState const * stateObj () const noexcept
 
virtual QStateHandler getStateHandler () noexcept
 

Additional Inherited Members

- Public Types inherited from QP::QAsm
enum  QStateRet : QState {
  Q_RET_SUPER , Q_RET_SUPER_SUB , Q_RET_UNHANDLED , Q_RET_HANDLED ,
  Q_RET_IGNORED , Q_RET_ENTRY , Q_RET_EXIT , Q_RET_NULL ,
  Q_RET_TRAN , Q_RET_TRAN_INIT , Q_RET_TRAN_EP , Q_RET_TRAN_HIST ,
  Q_RET_TRAN_XP
}
 
enum  ReservedSig : QSignal { Q_EMPTY_SIG , Q_ENTRY_SIG , Q_EXIT_SIG , Q_INIT_SIG }
 Reserved signals by the QP-framework. More...
 
- Static Public Member Functions inherited from QP::QAsm
static QState top (void *const me, QEvt const *const e) noexcept
 
- Protected Member Functions inherited from QP::QAsm
 QAsm () noexcept
 
QState tran (QStateHandler const target) noexcept
 
QState tran_hist (QStateHandler const hist) noexcept
 
QState super (QStateHandler const superstate) noexcept
 
QState qm_tran (void const *const tatbl) noexcept
 
QState qm_tran_init (void const *const tatbl) noexcept
 
QState qm_tran_hist (QMState const *const hist, void const *const tatbl) noexcept
 
QState qm_tran_ep (void const *const tatbl) noexcept
 
QState qm_tran_xp (QActionHandler const xp, void const *const tatbl) noexcept
 
QState qm_entry (QMState const *const s) noexcept
 
QState qm_exit (QMState const *const s) noexcept
 
QState qm_sm_exit (QMState const *const s) noexcept
 
QState qm_super_sub (QMState const *const s) noexcept
 
- Protected Attributes inherited from QP::QAsm
QAsmAttr m_state
 
QAsmAttr m_temp
 

Detailed Description

Dummy HSM class for testing.

Description
QHsmDummy is a test double for the role of "Orthogonal Components" HSM objects in QUTest unit testing.

Definition at line 827 of file qs.hpp.

Constructor & Destructor Documentation

◆ QHsmDummy()

QP::QHsmDummy::QHsmDummy ( )

Definition at line 383 of file qutest.cpp.

Member Function Documentation

◆ init()

void QP::QHsmDummy::init ( void const *const e,
std::uint_fast8_t const qsId )
overridevirtual

Virtual function to take the top-most initial transition in the state machine.

Description
Synchronously executes the top-most initial transition in a state machine (must be overridden in the subclasses).
Parameters
[in]epointer to an initialization parameter (might be nullptr)
[in]qsIdQS-id of this state machine (for QS local filter)
Precondition qep_asm:200
  • the virtual pointer must be initialized,
  • the top-most initial transition must be initialized,
  • the initial transition must not be taken yet.

Implements QP::QAsm.

Definition at line 388 of file qutest.cpp.

◆ dispatch()

void QP::QHsmDummy::dispatch ( QEvt const *const e,
std::uint_fast8_t const qsId )
overridevirtual

Virtual function to dispatch an event to the state machine.

Description
Synchronously dispatches an event for processing to a state machine (must be overridden in the subclasses). The processing of an event represents one run-to-completion (RTC) step.
Parameters
[in]epointer to the event to be dispatched to the MSM
[in]qsIdQS-id of this state machine (for QS local filter)
Precondition qep_asm:302
  • current state must be initialized
  • check the internal integrity (Software Self-Monitoring (SSM))

Implements QP::QAsm.

Definition at line 416 of file qutest.cpp.


The documentation for this class was generated from the following files: