TrafficLightWaitingRequired.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef TRAFFICLIGHTWAITINGREQUIRED_H_
  2. #define TRAFFICLIGHTWAITINGREQUIRED_H_
  3. #include "sc_types.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /*! \file This header defines prototypes for all functions that are required by the state machine implementation.
  8. This is a state machine uses time events which require access to a timing service. Thus the function prototypes:
  9. - trafficLightWaiting_setTimer and
  10. - trafficLightWaiting_unsetTimer
  11. are defined.
  12. These functions will be called during a 'run to completion step' (runCycle) of the statechart.
  13. There are some constraints that have to be considered for the implementation of these functions:
  14. - never call the statechart API functions from within these functions.
  15. - make sure that the execution time is as short as possible.
  16. */
  17. //
  18. // This is a timed state machine that requires timer services
  19. //
  20. //! This function has to set up timers for the time events that are required by the state machine.
  21. /*!
  22. This function will be called for each time event that is relevant for a state when a state will be entered.
  23. \param evid An unique identifier of the event.
  24. \time_ms The time in milli seconds
  25. \periodic Indicates the the time event must be raised periodically until the timer is unset
  26. */
  27. extern void trafficLightWaiting_setTimer(const sc_eventid evid, const sc_integer time_ms, const sc_boolean periodic);
  28. //! This function has to unset timers for the time events that are required by the state machine.
  29. /*!
  30. This function will be called for each time event taht is relevant for a state when a state will be left.
  31. \param evid An unique identifier of the event.
  32. */
  33. extern void trafficLightWaiting_unsetTimer(const sc_eventid evid);
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37. #endif /* TRAFFICLIGHTWAITINGREQUIRED_H_ */