EntryChoice.h 1.9 KB

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