Identifor.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #pragma once
  2. #include "scan_common.h"
  3. #include "..\Identifier\Identifier.h"
  4. #include "basic_struct_private.h"
  5. #include "IdentifyWorker.h"
  6. #include "CResultManager.h"
  7. /************************************************************************/
  8. /* 识别控制器 */
  9. /* 2014年12月9日16:04:06 */
  10. /* 作者:唐林 */
  11. /************************************************************************/
  12. class CIdentifor:public IService
  13. {
  14. #ifdef _DEBUG
  15. #define IDENTIFY_WORKER_COUNT 1
  16. #else
  17. #define IDENTIFY_WORKER_COUNT 3
  18. #endif
  19. public:
  20. CIdentifor(void);
  21. ~CIdentifor(void);
  22. public:
  23. void SetUseQr(bool bUseQr, const std::string&strQr);
  24. void SetOnlineScanType(int nOnlineScanType);
  25. BOOL LoadSchema(const boost::shared_ptr<const ISCH_Schema>& schema);
  26. BOOL IsMubanLoaded();
  27. virtual BOOL SupportPause( void );
  28. virtual int GetMubanCount();
  29. void SetExcImgDir( CString img_dir );
  30. void IdentifyTaskManager( CIdentifyTaskManager* taskManager );
  31. void Reset();
  32. protected:
  33. virtual ServiceState OnStarting( void );
  34. virtual ServiceState OnRunning( void );
  35. CIdentifyWorker * GetWorker( );
  36. virtual ServiceState OnPausing( void );
  37. virtual ServiceState OnResuming( void );
  38. virtual ServiceState OnStoping( void );
  39. protected:
  40. CIdentifyTaskManager * taskMananger;
  41. std::string m_strQr;
  42. bool m_bUseQr;
  43. int m_nOnlineScanType;
  44. DWORD phy_card_number;
  45. CString m_exc_img_dir;
  46. BOOL m_isMubanLoaded;
  47. boost::shared_ptr<const ISCH_Schema> m_schema;
  48. CIdentifyWorker m_identify_worker[IDENTIFY_WORKER_COUNT];
  49. };