// KeyenceBL600.h: interface for the CKeyenceBL600 class.
//
//////////////////////////////////////////////////////////////////////
#pragma once

#include <string>

#include "Scanner.h"
#include "Utility.h"

#ifdef BUILD_COMMDLL
#define COMMDLL_DLLCLASS __declspec(dllexport)
#else
#define COMMDLL_DLLCLASS __declspec(dllimport)
#endif

class COMMDLL_DLLCLASS CKeyenceBL600 : public CScanner
{
public:
    bool WaitForBarcode(DWORD dwTimeout, std::string& csBarcode);
    void ReceiveComm(const char* cpcBuffer, int nSize);
    bool ReadBarCode(DWORD dwTimeout, std::string& csBarcode, bool bWaitResult = TRUE);
    std::string GetReceiveData();
    bool Off();
    bool On();
    CKeyenceBL600();
    virtual ~CKeyenceBL600();

private:
    std::string m_strBarcode;
    HANDLE m_hSuccess;
    HANDLE m_hAck;
};

