示例#1
0
                protected internal override void ReportStatusTransition(ManagementOCU_ManagementOcuFSMContext context, ReportStatus msg)
                {
                    ManagementOCU_ManagementOcuFSM ctxt = context.Owner;


#if TRACE
                    Trace.WriteLine(
                        "TRANSITION   : ManagementOCU_ManagementOcuFSM_SM.HandleMenu.ReportStatusTransition(, ReportStatus msg)");
#endif


                    context.State.Exit(context);
                    context.ClearState();

                    try
                    {
                        ctxt.displayStatusAction(msg);
                        ctxt.displayMenuAction();
                        ctxt.processNotifications("HandleMenu", null);
                    }
                    finally
                    {
                        context.State = ManagementOCU_ManagementOcuFSM_SM.HandleMenu;
                        context.State.Entry(context);
                    }

                    return;
                }
 public ManagementOCU_ManagementOcuFSM()
 {
     /*
      * If there are other variables, context must be constructed last so that all
      * class variables are available if an EntryAction of the InitialState of the
      * statemachine needs them.
      */
     context = new ManagementOCU_ManagementOcuFSMContext(this);
 }
示例#3
0
                protected internal override void ReportStatusTransition(ManagementOCU_ManagementOcuFSMContext context)
                {
#if TRACE
                    Trace.WriteLine(
                        "TRANSITION   : ManagementOCU_ManagementOcuFSM_SM.Internally_Generated_State_DO_NOT_USE.ReportStatusTransition()");
#endif


                    return;
                }
示例#4
0
                protected internal override void MenuItemEnteredTransition(ManagementOCU_ManagementOcuFSMContext context, MenuItemEntered msg)
                {
                    ManagementOCU_ManagementOcuFSM ctxt = context.Owner;


#if TRACE
                    Trace.WriteLine(
                        "TRANSITION   : ManagementOCU_ManagementOcuFSM_SM.WaitForControl.MenuItemEnteredTransition(, MenuItemEntered msg)");
#endif

                    if (!ctxt.isSelectionToEnd(msg))
                    {
                        context.State.Exit(context);
                        context.ClearState();

                        try
                        {
                            ctxt.printMessageAction("waiting for AccessControl process to end");
                            ctxt.sendRequestControlAction();
                            ctxt.displayMenuAction();
                            ctxt.processNotifications("WaitForControl", null);
                        }
                        finally
                        {
                            context.State = ManagementOCU_ManagementOcuFSM_SM.WaitForControl;
                            context.State.Entry(context);
                        }
                    }
                    else if (ctxt.isSelectionToEnd(msg))
                    {
                        context.State.Exit(context);
                        context.ClearState();

                        try
                        {
                            ctxt.terminateServiceAction();
                            ctxt.sendRequestControlAction();
                            ctxt.displayMenuAction();
                            ctxt.processNotifications("WaitForControl", null);
                        }
                        finally
                        {
                            context.State = ManagementOCU_ManagementOcuFSM_SM.WaitForControl;
                            context.State.Entry(context);
                        }
                    }
                    else
                    {
                        base.MenuItemEnteredTransition(context, msg);
                    }

                    return;
                }
示例#5
0
            protected internal virtual void Default(ManagementOCU_ManagementOcuFSMContext context)
            {
#if TRACE
                Trace.WriteLine(
                    "TRANSITION : Default");
#endif
                throw (
                          new statemap.TransitionUndefinedException(
                              "State: " +
                              context.State.Name +
                              ", Transition: " +
                              context.GetTransition()));
            }
示例#6
0
                protected internal override void ConfirmControlTransition(ManagementOCU_ManagementOcuFSMContext context, ConfirmControl msg)
                {
                    ManagementOCU_ManagementOcuFSM ctxt = context.Owner;


#if TRACE
                    Trace.WriteLine(
                        "TRANSITION   : ManagementOCU_ManagementOcuFSM_SM.WaitForControl.ConfirmControlTransition(, ConfirmControl msg)");
#endif

                    if (!ctxt.isControlAccepted(msg))
                    {
                        context.State.Exit(context);
                        context.ClearState();

                        try
                        {
                            ctxt.sendRequestControlAction();
                            ctxt.displayMenuAction();
                            ctxt.processNotifications("WaitForControl", null);
                        }
                        finally
                        {
                            context.State = ManagementOCU_ManagementOcuFSM_SM.WaitForControl;
                            context.State.Entry(context);
                        }
                    }
                    else if (ctxt.isControlAccepted(msg))
                    {
                        context.State.Exit(context);
                        context.ClearState();

                        try
                        {
                            ctxt.displayMenuAction();
                            ctxt.processNotifications("HandleMenu", null);
                        }
                        finally
                        {
                            context.State = ManagementOCU_ManagementOcuFSM_SM.HandleMenu;
                            context.State.Entry(context);
                        }
                    }
                    else
                    {
                        base.ConfirmControlTransition(context, msg);
                    }

                    return;
                }
示例#7
0
                protected internal override void InternalStateChange_To_ManagementOCU_ManagementOcuFSM_WaitForControlTransition(ManagementOCU_ManagementOcuFSMContext context, InternalEvent ie)
                {
                    ManagementOCU_ManagementOcuFSM ctxt = context.Owner;


#if TRACE
                    Trace.WriteLine(
                        "TRANSITION   : ManagementOCU_ManagementOcuFSM_SM.HandleMenu.InternalStateChange_To_ManagementOCU_ManagementOcuFSM_WaitForControlTransition(, InternalEvent ie)");
#endif


                    context.State.Exit(context);
                    context.ClearState();

                    try
                    {
                        ctxt.sendRequestControlAction();
                        ctxt.displayMenuAction();
                        ctxt.processNotifications("WaitForControl", ie);
                    }
                    finally
                    {
                        context.State = ManagementOCU_ManagementOcuFSM_SM.WaitForControl;
                        context.State.Entry(context);
                    }

                    return;
                }
示例#8
0
 protected internal virtual void ReportStatusTransition(ManagementOCU_ManagementOcuFSMContext context, ReportStatus msg)
 {
     Default(context);
 }
示例#9
0
 protected internal virtual void ReportControlTransition(ManagementOCU_ManagementOcuFSMContext context)
 {
     Default(context);
 }
示例#10
0
 protected internal virtual void MenuItemEnteredTransition(ManagementOCU_ManagementOcuFSMContext context, MenuItemEntered msg)
 {
     Default(context);
 }
示例#11
0
 protected internal virtual void InternalStateChange_To_ManagementOCU_ManagementOcuFSM_WaitForControlTransition(ManagementOCU_ManagementOcuFSMContext context, InternalEvent ie)
 {
     Default(context);
 }
示例#12
0
 protected internal virtual void ConfirmControlTransition(ManagementOCU_ManagementOcuFSMContext context, ConfirmControl msg)
 {
     Default(context);
 }
示例#13
0
 protected internal virtual void Exit(ManagementOCU_ManagementOcuFSMContext context)
 {
 }