EmptyTransition.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef EMPTYTRANSITION_H_
  2. #define EMPTYTRANSITION_H_
  3. #include "sc_types.h"
  4. #include "StatemachineInterface.h"
  5. /*! \file Header of the state machine 'EmptyTransition'.
  6. */
  7. class EmptyTransition : public StatemachineInterface
  8. {
  9. public:
  10. EmptyTransition();
  11. ~EmptyTransition();
  12. /*! Enumeration of all states */
  13. typedef enum
  14. {
  15. main_region_A,
  16. main_region_B,
  17. EmptyTransition_last_state
  18. } EmptyTransitionStates;
  19. /*
  20. * Functions inherited from StatemachineInterface
  21. */
  22. virtual void init();
  23. virtual void enter();
  24. virtual void exit();
  25. virtual void runCycle();
  26. /*!
  27. * Checks if the state machine is active (until 2.4.1 this method was used for states).
  28. * A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
  29. */
  30. virtual sc_boolean isActive() const;
  31. /*!
  32. * Checks if all active states are final.
  33. * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
  34. */
  35. virtual sc_boolean isFinal() const;
  36. /*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
  37. sc_boolean isStateActive(EmptyTransitionStates state) const;
  38. private:
  39. //! the maximum number of orthogonal states defines the dimension of the state configuration vector.
  40. static const sc_integer maxOrthogonalStates = 1;
  41. EmptyTransitionStates stateConfVector[maxOrthogonalStates];
  42. sc_ushort stateConfVectorPosition;
  43. // prototypes of all internal functions
  44. void enseq_main_region_A_default();
  45. void enseq_main_region_B_default();
  46. void enseq_main_region_default();
  47. void exseq_main_region_A();
  48. void exseq_main_region_B();
  49. void exseq_main_region();
  50. void react_main_region_A();
  51. void react_main_region_B();
  52. void react_main_region__entry_Default();
  53. void clearInEvents();
  54. void clearOutEvents();
  55. };
  56. #endif /* EMPTYTRANSITION_H_ */