12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #pragma once
- #include "scan_common.h"
- #include "..\Identifier\Identifier.h"
- #include "basic_struct_private.h"
- #include "IdentifyWorker.h"
- #include "CResultManager.h"
- /************************************************************************/
- /* 识别控制器 */
- /* 2014年12月9日16:04:06 */
- /* 作者:唐林 */
- /************************************************************************/
- class CIdentifor:public IService
- {
- #ifdef _DEBUG
- #define IDENTIFY_WORKER_COUNT 1
- #else
- #define IDENTIFY_WORKER_COUNT 3
- #endif
- public:
- CIdentifor(void);
- ~CIdentifor(void);
- public:
- void SetUseQr(bool bUseQr, const std::string&strQr);
- void SetOnlineScanType(int nOnlineScanType);
- BOOL LoadSchema(const boost::shared_ptr<const ISCH_Schema>& schema);
- BOOL IsMubanLoaded();
- virtual BOOL SupportPause( void );
- virtual int GetMubanCount();
- void SetExcImgDir( CString img_dir );
- void IdentifyTaskManager( CIdentifyTaskManager* taskManager );
- void Reset();
- protected:
- virtual ServiceState OnStarting( void );
- virtual ServiceState OnRunning( void );
- CIdentifyWorker * GetWorker( );
- virtual ServiceState OnPausing( void );
- virtual ServiceState OnResuming( void );
- virtual ServiceState OnStoping( void );
- protected:
- CIdentifyTaskManager * taskMananger;
- std::string m_strQr;
- bool m_bUseQr;
- int m_nOnlineScanType;
- DWORD phy_card_number;
- CString m_exc_img_dir;
- BOOL m_isMubanLoaded;
- boost::shared_ptr<const ISCH_Schema> m_schema;
- CIdentifyWorker m_identify_worker[IDENTIFY_WORKER_COUNT];
- };
|