1: // Implementation of methods for class rs_ff_state.  05/26/98 rj@elilabs.com

  3: #include "rs_ff_state.H"
  4: #include "rs_ff_session.H"


  7: // constructor.
  8: //
  9: rs_ff_state::rs_ff_state() {};

 11: // destructor.
 12: //
 13: rs_ff_state::~rs_ff_state() {};

 15: // The entry action.
 16: //
 17: void rs_ff_state::entry_action(rs_ff_session* current_session) {
 18:   current_session->Q = my_Q;
 19:   current_session->Qbar = my_Qbar;
 20:   return;
 21: }

 23: // The event sub-handlers.

 25: // event S
 26: //
 27: boolean rs_ff_state::S__guard(session* current_session) {
 28:   return S__guard_value;
 29: }

 31: void rs_ff_state::S__exit_action(session* current_session) {
 32:   return;
 33: }

 35: rs_ff_state* rs_ff_state::S__next_state(void) {
 36:   return S__next_value;
 37: }

 39: // event Sbar
 40: //
 41: boolean rs_ff_state::Sbar__guard(session* current_session) {
 42:   return Sbar__guard_value;
 43: }

 45: void rs_ff_state::Sbar__exit_action(session* current_session) {
 46:   return;
 47: }

 49: rs_ff_state* rs_ff_state::Sbar__next_state(void) {
 50:   return Sbar__next_value;
 51: }

 53: // event R
 54: //
 55: boolean rs_ff_state::R__guard(session* current_session) {
 56:   return R__guard_value;
 57: }

 59: void rs_ff_state::R__exit_action(session* current_session) {
 60:   return;
 61: }

 63: rs_ff_state* rs_ff_state::R__next_state(void) {
 64:   return R__next_value;
 65: }

 67: // event Rbar
 68: //
 69: boolean rs_ff_state::Rbar__guard(session* current_session) {
 70:   return Rbar__guard_value;
 71: }

 73: void rs_ff_state::Rbar__exit_action(session* current_session) {
 74:   return;
 75: }

 77: rs_ff_state* rs_ff_state::Rbar__next_state(void) {
 78:   return Rbar__next_value;
 79: }

 81: // Initializer.
 82: //
 83: void rs_ff_state::set(
 84:             // output
 85:             boolean Q,
 86:             boolean Qbar,
 87:             // guard
 88:             boolean gS,
 89:             boolean gSbar,
 90:             boolean gR,
 91:             boolean gRbar,
 92:             // next state
 93:             rs_ff_state* S,
 94:             rs_ff_state* Sbar,
 95:             rs_ff_state* R,
 96:             rs_ff_state* Rbar
 97:             ) {
 98:   // output
 99:    my_Q = Q;
100:    my_Qbar = Qbar;
101:   // guard
102:    S__guard_value = gS;
103:    Sbar__guard_value = gSbar;
104:    R__guard_value = gR;
105:    Rbar__guard_value = gRbar;
106:   // next state
107:    S__next_value = S;
108:    Sbar__next_value = Sbar;
109:    R__next_value = R;
110:    Rbar__next_value = Rbar;
111: }