public void setUp() { // Create the FSM and call the entry action manually fsm = new SimpleStateMachnImpl(); fsm.EnteredStandbyStateAction(); fsm.TFC.LastState = 0; int i; for (i = 0; i < 255; i++) fsm.TFC.StateHistory[i] = 255; // Run through the desired transition sequence try { fsm.context.ReadyMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #1!"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.PauseMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #2!"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.PauseMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #3"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.ResumeMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #4"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.PauseMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #5"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.ResumeMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #6"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.ResumeMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #7"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.ErrorMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #8!"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.QueryStateMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #9"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } }
public void setUp() { // Create the FSM and call the entry action manually fsm = new SimpleStateMachnImpl(); fsm.EnteredStandbyStateAction(); fsm.TFC.LastState = 0; int i; for (i = 0; i < 255; i++) { fsm.TFC.StateHistory[i] = 255; } // Run through the desired transition sequence try { fsm.context.ReadyMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #1!"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.PauseMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #2!"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.PauseMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #3"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.ResumeMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #4"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.PauseMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #5"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.ResumeMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #6"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.ResumeMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #7"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.ErrorMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #8!"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } try { fsm.context.QueryStateMessageTransition(); } catch (statemap.TransitionUndefinedException e) { Console.Out.WriteLine("exception during transition #9"); fsm.TFC.StateHistory[fsm.TFC.LastState++] = 12; } }