qep.h File Reference

QEP/C++ platform-independent public interface. More...

#include "qevent.h"
#include "qs_port.h"

Go to the source code of this file.

Classes

class  QEP
 Provides miscellaneous QEP services. More...
class  QFsm
 Finite State Machine base class. More...
class  QHsm
 Hierarchical State Machine base class. More...

Defines

#define Q_RET_IGNORED   ((QState)1)
 Value returned by a non-hierarchical state-handler function when it ignores (does not handle) the event.
#define Q_IGNORED()   (Q_RET_IGNORED)
 The macro returned from a non-hierarchical state-handler function when it ignores (does not handle) the event.
#define Q_RET_HANDLED   ((QState)0)
 Value returned by a state-handler function when it handles the event.
#define Q_HANDLED()   (Q_RET_HANDLED)
 Value returned by a state-handler function when it handles the event.
#define Q_RET_TRAN   ((QState)2)
 Value returned by a state-handler function when it takes a regular state transition.
#define Q_TRAN(target_)   (me->m_state = (QStateHandler)(target_), Q_RET_TRAN)
 Designates a target for an initial or regular transition. Q_TRAN() can be used both in the FSMs and HSMs.
#define Q_RET_SUPER   ((QState)3)
 Value returned by a state-handler function when it cannot handle the event.
#define Q_SUPER(super_)   (me->m_state = (QStateHandler)(super_), Q_RET_SUPER)
 Designates the superstate of a given state in an HSM.
#define QS_SIG_(sig_)   QS::u8_(sig_)
 Internal QS macro to output an unformatted event signal data element.

Typedefs

typedef uint8_t QState
 Type returned from a state-handler function.
typedef QState(* QStateHandler )(void *me, QEvent const *e)
 pointer to state-handler function

Enumerations

enum  QReservedSignals { Q_ENTRY_SIG = 1, Q_EXIT_SIG, Q_INIT_SIG, Q_USER_SIG }
 QEP reserved signals. More...


Detailed Description

QEP/C++ platform-independent public interface.

This header file must be included directly or indirectly in all modules (*.cpp files) that use QEP/C++.

Definition in file qep.h.


Define Documentation

 
#define Q_HANDLED (  )     (Q_RET_HANDLED)

Value returned by a state-handler function when it handles the event.

You call that macro after the return statement (return Q_HANDLED();) Q_HANDLED() can be used both in the FSMs and HSMs.

Definition at line 220 of file qep.h.

 
#define Q_IGNORED (  )     (Q_RET_IGNORED)

The macro returned from a non-hierarchical state-handler function when it ignores (does not handle) the event.

You call that macro after the return statement (return Q_IGNORED();)

Definition at line 207 of file qep.h.

Referenced by QHsm::top().

#define Q_SUPER ( super_   )     (me->m_state = (QStateHandler)(super_), Q_RET_SUPER)

Designates the superstate of a given state in an HSM.

Definition at line 242 of file qep.h.

#define Q_TRAN ( target_   )     (me->m_state = (QStateHandler)(target_), Q_RET_TRAN)

Designates a target for an initial or regular transition. Q_TRAN() can be used both in the FSMs and HSMs.

Definition at line 231 of file qep.h.

#define QS_SIG_ ( sig_   )     QS::u8_(sig_)

Internal QS macro to output an unformatted event signal data element.

Note:
the size of the pointer depends on the macro Q_SIGNAL_SIZE.

Definition at line 267 of file qep.h.

Referenced by QHsm::dispatch(), QFsm::dispatch(), QF::gc(), QEQueue::get(), QActive::get_(), QF::new_(), QEQueue::postFIFO(), QActive::postFIFO(), QEQueue::postLIFO(), QActive::postLIFO(), QF::publish(), QActive::subscribe(), QF::tick(), QActive::unsubscribe(), and QActive::unsubscribeAll().


Enumeration Type Documentation

enum QReservedSignals

QEP reserved signals.

Enumerator:
Q_ENTRY_SIG  signal for entry actions
Q_EXIT_SIG  signal for exit actions
Q_INIT_SIG  signal for nested initial transitions
Q_USER_SIG  signal to offset user signals

Definition at line 248 of file qep.h.


Generated on Sat Nov 15 13:53:47 2008 for QP/C++ by  doxygen 1.5.4