common.h 703 B

12345678910111213141516171819
  1. #ifndef _COMMON_H_
  2. #define _COMMON_H_
  3. //------------------------------------------------------------------------------
  4. #include <stdint.h>
  5. //------------------------------------------------------------------------------
  6. void trim(char *s);
  7. int mystrcmp(char *p1, char *p2);
  8. void substr(char *dest, const char *src, uint32_t start, uint32_t cnt);
  9. void split(char **arr, char *str, const char *del);
  10. uint8_t CheckDispenserGeneration();
  11. uint8_t CheckCustomer();
  12. void GetClockTime(struct timespec *_now_time);
  13. unsigned long GetClockTimeoutValue(struct timespec _start_time);
  14. bool IntoChargeProcess(int status);
  15. bool IntoOperateProcess(int status);
  16. char* GetStatusName(int status);
  17. #endif /* _COMMON_H_ */