// OmronCompoWayF.h: interface for the COmronCompoWayF class.
//
//////////////////////////////////////////////////////////////////////
#pragma once

#include <string>

#include "Scanner.h"

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

class COMMDLL_DLLCLASS COmronCompoWayF : public CScanner
{
public:
    std::string GetReceiveData();
    void ReceiveComm(const char* cpcBuffer, int nSize);
    COmronCompoWayF();
    virtual ~COmronCompoWayF();

protected:
    bool SendMsg(std::string strMsg, DWORD dwTimeout);
    virtual void DecodeReceiveData();
    char CalBCC(const char* cpcBuffer);

    HANDLE m_hSuccess;
    std::string m_strNodeNo;     // "00" for ZX-SF11
    std::string m_strSubAddress; // Not Used for ZX-SF11, default "00"
    std::string m_strSID;        // Service ID, 1byte
    std::string m_strMRC;        // Main Request Code, 2 bytes
    std::string m_strSRC;        // Sub Request Code, 2 bytes
    std::string m_strCommand;

    bool m_bWaitForBCC;
};

