Esempio n. 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;
                }
Esempio n. 2
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;
                }
Esempio n. 3
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;
                }
Esempio n. 4
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;
                }
Esempio n. 5
0
 public ManagementOCUService(JausRouter jausRouter)
 {
     pManagementOCU_ManagementOcuFSM = new ManagementOCU_ManagementOcuFSM();
     pManagementOCU_ManagementOcuFSM.setHandlers(ref ieHandler, ref jausRouter);
     pManagementOCU_ManagementOcuFSM.setupNotifications();
 }
 public ManagementOCUService(JausRouter jausRouter )
 {
     pManagementOCU_ManagementOcuFSM = new ManagementOCU_ManagementOcuFSM();
     pManagementOCU_ManagementOcuFSM.setHandlers(ref ieHandler, ref jausRouter);
     pManagementOCU_ManagementOcuFSM.setupNotifications();
 }
Esempio n. 7
0
        //---------------------------------------------------------------
        // Member methods.
        //

        public ManagementOCU_ManagementOcuFSMContext(ManagementOCU_ManagementOcuFSM owner) :
            base(ManagementOCU_ManagementOcuFSM_SM.WaitForControl)
        {
            _owner = owner;
        }