ComStatistics.h 537 B

1234567891011121314151617181920212223242526272829
  1. #ifndef COMSTATISTICS_H
  2. #define COMSTATISTICS_H
  3. #include <QString>
  4. class ComStatistics
  5. {
  6. public:
  7. ComStatistics(QString sensor_name);
  8. void ReQuestCount_increase();
  9. void CrcErrorCount_increase();
  10. void TimeoutCount_increase();
  11. void Update_Recvtime(int ms);
  12. void Save2File(QString filepath);
  13. private:
  14. int request_count;
  15. int crcerror_count;
  16. int timeout_count;
  17. int max_recvtime; //ms
  18. int min_recvtime; //ms
  19. int total_recvtime; //ms
  20. QString tag_name;
  21. };
  22. #endif // COMSTATISTICS_H