TimeEventModule.h 702 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * author: Patrick-Christopher Mattulat
  3. * dev-tools: JetBrains CLion
  4. * created: 20.08.2018
  5. * last updated: 26.08.2018
  6. */
  7. #ifndef TIMEEVENT_H
  8. #define TIMEEVENT_H
  9. #include <cstdint>
  10. #include <atomic>
  11. #include "../../Interface/IdentifiedObject.h"
  12. class TimeEventModule : public IdentifiedObject
  13. {
  14. private:
  15. std::atomic<uint32_t> id;
  16. std::atomic<uint8_t> module;
  17. std::atomic<uint32_t> timestamp;
  18. public:
  19. explicit TimeEventModule(uint32_t);
  20. ~TimeEventModule();
  21. uint32_t getId() override;
  22. uint8_t getModule();
  23. uint32_t getTimestamp();
  24. bool reached(uint32_t);
  25. void set(uint32_t);
  26. void update(uint32_t);
  27. };
  28. #endif