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

22 lines
673 B

  1. #ifndef __COMMON_H
  2. #define __COMMON_H
  3. #include <Windows.h>
  4. #include <string>
  5. #include <iostream>
  6. #include <time.h>
  7. using namespace std;
  8. unsigned int Count_Read_date_number(int Function_code, unsigned int Operations_Number);
  9. HANDLE Init_COM(LPCTSTR Port, int baud_rate, BYTE date_bits, BYTE stop_bit, BYTE parity);
  10. bool SendData(HANDLE m_hComm, char* data, int len);
  11. string Input_COMM(void);
  12. unsigned int Input_Baud_Rate(void);
  13. BYTE Input_Date_Bits(void);
  14. BYTE Input_Stop_Bits(BYTE Date_Bits);
  15. BYTE Input_Parity(void);
  16. unsigned int Input_RTU_Enable(void);
  17. UINT16 CRC_16(UINT8 *Data, unsigned int CRC_Len);
  18. void Log_Note(UINT8 *Message, int flage, int Message_len);
  19. #endif