Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6fsm.h
Go to the documentation of this file.
1 
7 #ifndef P6FSM_H__
8 #define P6FSM_H__ 1
9 
10 #include "p6fsmtable.h"
11 
12 
13 #ifdef __cplusplus
14 namespace P6R {
15 extern "C" {
16 #endif
17 
18  typedef P6UINT16 P6FSMSTATE;
19  typedef P6UINT16 P6FSMEVENT;
21  typedef P6UINT32 P6FSMFLAGS;
22  static const P6FSMFLAGS P6FSM_NOFLAGS = 0x00000000;
23  static const P6FSMFLAGS P6FSM_LOGTRANSITIONS = 0x00000001;
34 #undef INTERFACE
35 #define INTERFACE p6IFsm
37  {
54  P6DECLCOMMETHOD(initialize)(P6THIS_ p6IFsmTable *pStateTable,P6FSMFLAGS fFlags) P6PURE;
55 
62 
71  P6DECLCOMMETHOD(enableLogging)(P6THIS_ P6BOOL bEnable) P6PURE;
72 
86  P6DECLCOMMETHOD(processEvent)(P6THIS_ P6FSMEVENT nEvent,P6FSMACTION *pnAction) P6PURE;
87 
97  P6DECLCOMMETHOD(getLastState)(P6THIS_ P6FSMSTATE *pnLastState) P6PURE;
98 
107  P6DECLCOMMETHOD(getCurrentState)(P6THIS_ P6FSMSTATE *pnCurState) P6PURE;
108 
118  P6DECLCOMMETHOD(getLastEvent)(P6THIS_ P6FSMEVENT *pnLastEvent) P6PURE;
119 
134  P6DECLCOMMETHOD(stateToStrW)(P6THIS_ P6FSMSTATE nState,P6WCHAR *pBuffer,P6SIZE *pcBuffer) P6PURE;
135 
150  P6DECLCOMMETHOD(eventToStrW)(P6THIS_ P6FSMEVENT nEvent,P6WCHAR *pBuffer,P6SIZE *pcBuffer) P6PURE;
151 
166  P6DECLCOMMETHOD(actionToStrW)(P6THIS_ P6FSMACTION nAction,P6WCHAR *pBuffer,P6SIZE *pcBuffer) P6PURE;
167  };
168 
169  // {3ABD7B8D-8EB7-499F-96B9-07B432CAFF88}
170  #define IF_p6IFsm {0x3ABD7B8D,0x8EB7,0x499F,{0x96,0xB9,0x07,0xB4,0x32,0xCA,0xFF,0x88}}
171 
172  // {65FB2BB9-61EA-461E-B264-9990CC47611B}
173  #define COMP_p6Fsm {0x65FB2BB9,0x61EA,0x461E,{0xB2,0x64,0x99,0x90,0xCC,0x47,0x61,0x1B}}
174 
175 #ifdef __cplusplus
176 }
177 } // namespace
178 #endif
179 
180 
181 #endif
182 
183 
size_t P6SIZE
Definition: p6types.h:90
uint32_t P6UINT32
Definition: p6types.h:77
P6UINT32 P6FSMFLAGS
type for controls flags passed into p6IFsm
Definition: p6fsm.h:21
#define P6PURE
Definition: p6defs.h:192
unsigned char P6BOOL
Boolean type.
Definition: p6types.h:133
This component provides a general purpose finite state machine engine that can be used with anything...
Definition: p6fsm.h:36
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:111
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
P6UINT16 P6FSMEVENT
type used to represent event values in the state machine
Definition: p6fsm.h:19
P6UINT16 P6FSMACTION
type used to represent action values in the state machine
Definition: p6fsm.h:20
uint16_t P6UINT16
Definition: p6types.h:75
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
P6UINT16 P6FSMSTATE
type used to represent state values in the state machine
Definition: p6fsm.h:18
Copyright P6R Inc.
#define P6THIS_
Definition: p6defs.h:193
#define P6THIS
Definition: p6defs.h:194
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188