TimedStatemachineInterface.h 835 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef TIMEDSTATEMACHINEINTERFACE_H_
  2. #define TIMEDSTATEMACHINEINTERFACE_H_
  3. #include "sc_types.h"
  4. #include "TimerInterface.h"
  5. /*! \file Interface for state machines which use timed event triggers.
  6. */
  7. class TimedStatemachineInterface {
  8. public:
  9. virtual ~TimedStatemachineInterface() = 0;
  10. /*! Set the ITimerService for the state machine. It must be set
  11. externally on a timed state machine before a run cycle can be correct
  12. executed.
  13. */
  14. virtual void setTimer(TimerInterface* timer) = 0;
  15. /*! Returns the currently used timer service.
  16. */
  17. virtual TimerInterface* getTimer() = 0;
  18. /*! Callback method if a time event occurred.
  19. */
  20. virtual void raiseTimeEvent(sc_eventid event) = 0;
  21. };
  22. inline TimedStatemachineInterface::~TimedStatemachineInterface() {}
  23. #endif /* TIMEDSTATEMACHINEINTERFACE_H_ */