You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.1 KiB
C++

// 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:
// ctor
COmronCompoWayF();
virtual ~COmronCompoWayF();
// methods
std::string GetReceiveData();
void ReceiveComm(const char* cpcBuffer, int nSize) override;
protected:
bool SendMsg(std::string strMsg, DWORD dwTimeout);
virtual void DecodeReceiveData();
char CalBCC(const char* cpcBuffer);
// attributes
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{ false };
};