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.

34 lines
599B

  1. #include <math.h>
  2. #include <climits>
  3. #include <cstdlib>
  4. #include <ctime>
  5. #include <cmath>
  6. #include <deque>
  7. #include <vector>
  8. class clockedCounter {
  9. private:
  10. int length;
  11. float rate;
  12. float count;
  13. float reset;
  14. float output;
  15. std::vector<float> buf;
  16. public:
  17. clockedCounter() :
  18. length(0),
  19. rate(0),
  20. count(0),
  21. reset(0),
  22. output(0)
  23. {
  24. };
  25. void setlength(int _length);
  26. void setrate(float _rate);
  27. void setreset(float _reset);
  28. float getoutput();
  29. };