qepn.c File Reference

#include "qpn_port.h"

Go to the source code of this file.

Defines

#define QEP_EMPTY_SIG_   0
#define QEP_MAX_NEST_DEPTH_   5

Functions

char const Q_ROM *Q_ROM_VAR QP_getVersion (void)
 get the current QP version number string
void QFsm_init (QFsm *me)
 Initializes a FSM.
QState QHsm_top (QHsm *me)
 The top-state.
void QHsm_init (QHsm *me)
 Initializes a HSM.

Detailed Description

QEP-nano implementation.

Definition in file qepn.c.


Define Documentation

#define QEP_EMPTY_SIG_   0

empty signal for internal use only

Definition at line 41 of file qepn.c.

Referenced by QHsm_init().

#define QEP_MAX_NEST_DEPTH_   5

maximum depth of state nesting (including the top level), must be >= 2

Definition at line 44 of file qepn.c.

Referenced by QHsm_init().


Function Documentation

void QFsm_init ( QFsm me  ) 

Initializes a FSM.

Takes the top-most initial transition in a FSM.

Parameters:
me is the pointer the state machine structure derived from FHsm.
Note:
Must be called only ONCE after QFsm_ctor() and before any calls to QFsm_dispatch().

Definition at line 63 of file qepn.c.

References Q_ENTRY_SIG, Q_SIG, and QFsm::state.

Referenced by QF_run().

void QHsm_init ( QHsm me  ) 

Initializes a HSM.

Takes the top-most initial transition in a HSM.

Parameters:
me is the pointer the state machine structure derived from QHsm.
Note:
Must be called only ONCE after QHsm_ctor() and before any calls to QHsm_dispatch().

Definition at line 94 of file qepn.c.

References Q_ALLEGE, Q_ASSERT, Q_ENTRY_SIG, Q_INIT_SIG, Q_RET_TRAN, Q_SIG, QEP_EMPTY_SIG_, QEP_MAX_NEST_DEPTH_, and QHsm_top().

Referenced by QF_run().

QState QHsm_top ( QHsm me  ) 

The top-state.

QHsm_top() is the ultimate root of state hierarchy in all HSMs derived from QHsm. This state handler always returns (QState)0, which means that it "handles" all events.

See also:
Example of the QCalc_on() state handler for Q_INIT().

Definition at line 89 of file qepn.c.

References Q_IGNORED.

Referenced by QHsm_init().

char const Q_ROM* Q_ROM_VAR QP_getVersion ( void   ) 

get the current QP version number string

Returns:
version of the QP-nano as a constant 6-character string of the form X.Y.ZZ, where X is a 1-digit major version number, Y is a 1-digit minor version number, and ZZ is a 2-digit release number.

Definition at line 48 of file qepn.c.

References Q_ROM, Q_ROM_VAR, and QP_VERSION.


Generated by  doxygen 1.6.2