1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #pragma once
- #include "CStepBase.h"
- #include "Machine.h"
- #define FSM_NOT_EXECUTE 0xFFFF
- #define BOND_TABLE_ID 1
- #ifdef FSM_TEST
- typedef struct _BOND_PT_TEST
- {
- UINT id;
- ATTRIBUTE att;
- bool status;
- _BOND_PT_TEST(UINT id, ATTRIBUTE att, bool status)
- {
- this->id = id;
- this->att = att;
- this->status = status;
- }
- }BOND_PT_TEST;
- #define MAX_TEST_PT 6
- #endif
- class __declspec(dllexport) CEventBase
- {
- private:
- static bool m_bStopStepExecute;
- #ifdef FSM_TEST
- protected:
- std::default_random_engine e;
- void sleep_();
- void sleep_(int iTimerMin, int iTimerMax);
- virtual LONG ActionTest();
- static BOND_PT_TEST TestPt[MAX_TEST_PT];
- BOND_PT_TEST GetTestPt(UINT id);
- void SetStatus(UINT id, bool status);
- void ClearStatus(ATTRIBUTE att);
- #endif
- protected:
- bool m_bIsInitSuccess;
- Machine* m_pMachine;
- CStaticStepData* m_pStepPublicData;
- virtual LONG Action() = 0;
-
- virtual bool StopStepException();
- CEventBase();
- public:
-
- static void SetStopStepExecute(bool b);
- static bool GetStopStepExecute();
- virtual LONG EventRun(string sStepDescribe, string m_chClass, string m_chState, string step);
- };
|