123456789101112131415161718192021222324252627282930313233343536 |
- #pragma once
- #include "scan_common.h"
- #include "../Identifier/OnlineCardIdentifier.h"
- #include "OnlineCardStruct.h"
- namespace OnLineCard{
- class COnlineCardIdentifyWorker : public IService
- {
- public:
- enum class identify_state {
- waiting,
- identifing
- };
- public:
- COnlineCardIdentifyWorker();
- virtual ~COnlineCardIdentifyWorker();
- public:
- void SetTemplate(PaperTemplate*pT);
- void SetQr(bool bUseQr, const std::string&strQr);
- void SetOnlineScanType(int nOnlineScanType);
- inline identify_state GetIdentifyState(){ return m_identify_state; }
- void SetRCS(RTL_CRITICAL_SECTION*rcs, RTL_CRITICAL_SECTION*rcs1){ m_Identifier.SetRCS(rcs); m_buffer_cs = rcs1; }
- public:
- virtual ServiceState OnStarting(void) override;
- virtual ServiceState OnRunning(void);
- virtual bool OnLineCardIdentify(IplImage * img, void * out_result, int out_size, result_buffer_state * presult_buffer_state);
- protected:
- identify_state m_identify_state;
- COnlineCardIdentifier m_Identifier;
- IplImage* m_img;
- void* m_out_result;
- int m_out_size;
- result_buffer_state* m_presult_buffer_state;
- RTL_CRITICAL_SECTION* m_buffer_cs;
- };
- }
|