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.
|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
#include "CommMgr.h"
|
|
|
|
|
|
class _declspec(dllexport) TransformerExport
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
|
uint8_t bytes[2];
|
|
|
|
|
|
}TwoBytes;
|
|
|
|
|
|
|
|
|
|
|
|
enum TransformerPos {
|
|
|
|
|
|
PT_TRANSFORMER,
|
|
|
|
|
|
SAPARATE_PT_TRANSFORMER,
|
|
|
|
|
|
LEFT_TOP_TRANSFORMER,
|
|
|
|
|
|
RIGHT_TOP_TRANSFORMER,
|
|
|
|
|
|
LEFT_BUTTOM_TRANSFORMER,
|
|
|
|
|
|
RIGHT_BUTTOM_TRANSFORMER,
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
TransformerExport();
|
|
|
|
|
|
~TransformerExport();
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>MCEA<45><41><EFBFBD>׳<EFBFBD>ʼ<EFBFBD><CABC>
|
|
|
|
|
|
bool InitDahuanTransformer();
|
|
|
|
|
|
|
|
|
|
|
|
bool TransformerAbsMove(TransformerPos transformerType, double distance);
|
|
|
|
|
|
private:
|
|
|
|
|
|
bool CommonOperator(short distance);
|
|
|
|
|
|
unsigned char GetCheckSum(unsigned char* buf, int len);
|
|
|
|
|
|
|
|
|
|
|
|
int GetCommNum(TransformerPos transformerType);
|
|
|
|
|
|
|
|
|
|
|
|
uint16_t CRC16_MudBus(uint8_t *puchMsg, uint8_t usDataLen);
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ԭ
|
|
|
|
|
|
bool QueryOneIsReturn(int comm);
|
|
|
|
|
|
private:
|
|
|
|
|
|
int m_debondingPTComm = 1;
|
|
|
|
|
|
int m_saparatePTComm = 1;
|
|
|
|
|
|
int m_leftTopComm = 1;
|
|
|
|
|
|
int m_rightTopComm = 1;
|
|
|
|
|
|
int m_leftButtomComm = 1;
|
|
|
|
|
|
int m_rightButtomComm = 1;
|
|
|
|
|
|
|
|
|
|
|
|
int m_nComBaduRate = 115200;
|
|
|
|
|
|
|
|
|
|
|
|
CCommMgr m_transformer;
|
|
|
|
|
|
};
|
|
|
|
|
|
|