TimerInterface.h 841 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef TIMERINTERFACE_H_
  2. #define TIMERINTERFACE_H_
  3. #include "sc_types.h"
  4. //forward declaration of TimedStatemachineInterface to avoid cyclic dependency
  5. class TimedStatemachineInterface;
  6. /*! \file Basic interface for state machines.
  7. */
  8. class TimerInterface
  9. {
  10. public:
  11. virtual ~TimerInterface() = 0;
  12. /*! Starts the timing for a time event.
  13. */
  14. virtual void setTimer(TimedStatemachineInterface* statemachine, sc_eventid event, sc_integer time, sc_boolean isPeriodic) = 0;
  15. /*! Unsets the given time event.
  16. */
  17. virtual void unsetTimer(TimedStatemachineInterface* statemachine, sc_eventid event) = 0;
  18. /*! Cancel timer service. Use this to end possible timing threads and free
  19. memory resources.
  20. */
  21. virtual void cancel() = 0;
  22. };
  23. inline TimerInterface::~TimerInterface() {}
  24. #endif /* TIMERINTERFACE_H_ */