// OmronCompoWayF.h: interface for the COmronCompoWayF class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_OMRONCOMPOWAYF_H__2146C8A8_C857_4D3C_ADE8_6644C55FFACC__INCLUDED_)
#define AFX_OMRONCOMPOWAYF_H__2146C8A8_C857_4D3C_ADE8_6644C55FFACC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#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:
    CString GetReceiveData();
    void    ReceiveComm(const char *cpcBuffer, int nSize);
    COmronCompoWayF();
    virtual ~COmronCompoWayF();

protected:
    bool         SendMsg(CString csMsg, DWORD dwTimeout);
    virtual void DecodeReceiveData();
    char         CalBCC(const char *cpcBuffer);

    HANDLE  m_hSuccess;
    CString m_csNodeNo;     // "00" for ZX-SF11
    CString m_csSubAddress; // Not Used for ZX-SF11, default "00"
    CString m_csSID;        // Service ID, 1byte
    CString m_csMRC;        // Main Request Code, 2 bytes
    CString m_csSRC;        // Sub Request Code, 2 bytes
    CString m_csCommand;

    bool m_bWaitForBCC;
};

#endif // !defined(AFX_OMRONCOMPOWAYF_H__2146C8A8_C857_4D3C_ADE8_6644C55FFACC__INCLUDED_)
