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.

55 lines
1.4 KiB
C

3 years ago
// OmronLaserScanner.h: interface for the COmronLaserScanner class.
//
//////////////////////////////////////////////////////////////////////
#pragma once
#include <string>
3 years ago
#include "Scanner.h"
#ifdef BUILD_COMMDLL
#define COMMDLL_DLLCLASS __declspec(dllexport)
#else
#define COMMDLL_DLLCLASS __declspec(dllimport)
#endif
class COMMDLL_DLLCLASS COmronLaserScanner : public CScanner
{
public:
2 years ago
// ctor
3 years ago
COmronLaserScanner();
virtual ~COmronLaserScanner();
2 years ago
// methods
bool ZeroRelease();
std::string GetReceiveData();
bool IsInit();
bool Measure(double& dHeight);
bool Zero();
3 months ago
void ReceiveComm(const char* cpcBuffer, int nSize) override;
3 years ago
bool Init();
private:
bool GetDecimalPointPosition();
bool SendMsg(std::string strMsg);
char CalBCC(const char* cpcBuffer);
2 years ago
HANDLE m_hSuccess;
bool m_bInitBefore{ false };
3 years ago
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;
std::string m_strReadout;
2 years ago
bool m_bGetDecimal;
3 years ago
std::string m_strDecimal;
2 years ago
int m_nDecimal;
3 years ago
2 years ago
bool m_bWaitForBCC{ false };
3 years ago
std::string m_strSign;
};