| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #pragma once |
| | | #include <map> |
| | | #include "CRecipeList.h" |
| | | |
| | | |
| | | #define SS_NONE 0 |
| | | #define SS_SYNCING 1 |
| | | #define SS_COMPLETE 2 |
| | | #define SS_TIMEOUT 3 |
| | | #define SS_FAILED 4 |
| | | |
| | | namespace SERVO { |
| | | class CRecipesManager |
| | | { |
| | | public: |
| | | CRecipesManager(); |
| | | virtual ~CRecipesManager(); |
| | | |
| | | public: |
| | | unsigned TimeoutCheckWorkingProc(); |
| | | int syncing(); |
| | | void syncFailed(); |
| | | short decodeRecipeListReport(const char* pszData, size_t size); |
| | | CRecipeList* getRecipeListFromTemp(int unitNo); |
| | | |
| | | public: |
| | | inline void lock() { ::EnterCriticalSection(&m_cs); }; |
| | | inline void unlock() { ::LeaveCriticalSection(&m_cs); }; |
| | | |
| | | private: |
| | | HANDLE m_hWorkThreadHandle; |
| | | unsigned m_nWordThreadAddr; |
| | | HANDLE m_hWorkStop; |
| | | int m_nTimeoutCount; |
| | | CRITICAL_SECTION m_cs; // 忥é |
| | | int m_nSyncStatus; |
| | | int m_nTotalMasterRecipeCount; |
| | | std::map<int, CRecipeList*> m_mapRecipes; |
| | | std::map<int, CRecipeList*> m_mapRecipesTemp; |
| | | }; |
| | | } |
| | | |