123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- //
- // This code is generated by spgenex tool!
- //
- #include "stdafx.h"
- #include "SampleFSM.h"
- #define TIMER_LOG_SEND_ID 1
- CSampleFSM::CSampleFSM(void)
- {
- // TODO:
- }
- CSampleFSM::~CSampleFSM(void)
- {
- // TODO:
- }
- /*When invoke the {Init} interface of FSM instance, this function would fire immediately.
- * The user should not invoke this function directly.
- */
- ErrorCodeEnum CSampleFSM::OnInit()
- {
- LOG_FUNCTION();
- ErrorCodeEnum ec = Error_Unexpect;
- // TODO: user should implement the function!
- ec = Error_Succeed;
- return ec;
- }
- ErrorCodeEnum CSampleFSM::OnExit()
- {
- LOG_FUNCTION();
- ErrorCodeEnum ec = Error_Unexpect;
- // TODO: user should implement the function!
- return ec;
- }
- void CSampleFSM::SelfTest(EntityTestEnum eTestType,CSmartPointer<ITransactionContext> pTransactionContext)
- {
- // TODO:
- }
- void CSampleFSM::s0_on_entry()
- {
- ScheduleTimer(TIMER_LOG_SEND_ID, SampleService_LOG_SEND_INTERVAL);
- }
- void CSampleFSM::s0_on_exit()
- {
- CancelTimer(TIMER_LOG_SEND_ID);
- }
- unsigned int CSampleFSM::s0_on_event(FSMEvent* e)
- {
- unsigned int uRet = 0;
- if (e->iEvt == EVT_TIMER) {
- //ScheduleTimer(TIMER_LOG_SEND_ID, SampleService_LOG_SEND_INTERVAL);
- }
- return uRet;
- }
- void CSampleFSM::s1_on_entry()
- {
- // TODO:
- }
- void CSampleFSM::s1_on_exit()
- {
- // TODO:
- }
- unsigned int CSampleFSM::s1_on_event(FSMEvent* e)
- {
- unsigned int uRet = 0;
- // TODO:
- return uRet;
- }
- void CSampleFSM::s2_on_entry()
- {
- // TODO:
- }
- void CSampleFSM::s2_on_exit()
- {
- // TODO:
- }
- unsigned int CSampleFSM::s2_on_event(FSMEvent* e)
- {
- unsigned int uRet = 0;
- // TODO:
- return uRet;
- }
|