common.h 704 B

123456789101112131415161718192021222324
  1. #ifndef __COMMON_H_
  2. #define __COMMON_H_
  3. #include "datatype.h"
  4. #define USER_TIME_ZONE 8
  5. typedef struct{
  6. unsigned short year;
  7. unsigned char month;
  8. unsigned char day;
  9. unsigned char hour;
  10. unsigned char min;
  11. unsigned char sec;
  12. }MY_CLOCK;
  13. T_BOOL checkIpDomain(T_INT8 *address, T_UINT16 len, T_INT8 * ipDomain, IPD_ENUM *type);
  14. void hecPrint(T_UINT8 *data, T_UINT16 len);
  15. T_INT8 restoreDataFormatByHex(T_UINT8 *src, T_UINT16 len);
  16. void fillByHexFormat(T_INT8 *src, T_INT8 *data, T_INT32 len);
  17. void MakeStringToUpperCap(T_UINT8 *data, T_UINT16 len);
  18. T_INT16 fitStrForIndex(T_INT8 *Str,T_INT8 *Para);
  19. void AscStrTurnHexStr(char *AscStr, char *HexStr);
  20. unsigned char bcdToDec(unsigned char value);
  21. #endif