// // 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 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; }