Ejemplo n.º 1
0
        public RejectControl setAs(RejectControl value)
        {
            m_MsgHeader = value.m_MsgHeader;
            m_Body      = value.m_Body;

            return(this);
        }
Ejemplo n.º 2
0
 public void RejectControlTransition(RejectControl msg)
 {
     transition_ = "RejectControlTransition";
     State.RejectControlTransition(this, msg);
     transition_ = "";
     return;
 }
Ejemplo n.º 3
0
        public RejectControl(RejectControl value)
        {
            /// Initiliaze the protected variables
            m_MsgHeader = new MsgHeader();
            m_Body      = new Body();
            m_IsCommand = false;

            /// Copy the values
            m_MsgHeader = value.m_MsgHeader;
            m_Body      = value.m_Body;
        }
Ejemplo n.º 4
0
        public RejectControl(RejectControl value)
        {
            /// Initiliaze the protected variables
            m_MsgHeader = new MsgHeader();
            m_Body = new Body();
            m_IsCommand = false;

            /// Copy the values
            m_MsgHeader = value.m_MsgHeader;
            m_Body = value.m_Body;
        }
Ejemplo n.º 5
0
        public bool  isEqual(RejectControl value)
        {
            if (!this.getMsgHeader().isEqual(value.getMsgHeader()))
            {
                return(false);
            }
            if (!this.getBody().isEqual(value.getBody()))
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 6
0
 public bool  notEquals(RejectControl value)
 {
     return(!this.isEqual(value));
 }
Ejemplo n.º 7
0
        public RejectControl setAs(RejectControl value)
        {
            m_MsgHeader = value.m_MsgHeader;
            m_Body = value.m_Body;

            return this;
        }
Ejemplo n.º 8
0
 public bool notEquals(RejectControl value)
 {
     return !this.isEqual(value);
 }
Ejemplo n.º 9
0
        public bool isEqual(RejectControl value)
        {
            if (!this.getMsgHeader().isEqual(value.getMsgHeader()))
            {
            return false;
            }
            if (!this.getBody().isEqual(value.getBody()))
            {
            return false;
            }

            return true;
        }
Ejemplo n.º 10
0
        //	This is the function that will process an event either generated
        //  by the service, sent to it by another service on the same component,
        //  or as a message sent by a different component.
        public override bool processTransitions(InternalEvent ie)
        {
            bool done = false;

            // Since this function can be called from multiple threads,
            // we use a mutex to ensure only one state transition is
            // active at a time.
            mutex.WaitOne();

            // Invoke the FSM transition for this event.
            try
            {
                if (ie.getName().CompareTo("Receive") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    Receive casted_ie = (Receive)ie;
                    int     pos       = 0;
                    ushort  id        = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                    if (id == new ConfirmControl().getID())
                    {
                        ConfirmControl msg = new ConfirmControl();
                        msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                        pManagementOCU_ManagementOcuFSM.context.ConfirmControlTransition(msg);
                        done = true;
                    }
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("MenuItemEntered") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    MenuItemEntered casted_ie = (MenuItemEntered)ie;
                    MenuItemEntered msg       = casted_ie;
                    pManagementOCU_ManagementOcuFSM.context.MenuItemEnteredTransition(msg);
                    done = true;
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("MenuItemEntered") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    MenuItemEntered casted_ie = (MenuItemEntered)ie;
                    MenuItemEntered msg       = casted_ie;
                    pManagementOCU_ManagementOcuFSM.context.MenuItemEnteredTransition(msg);
                    done = true;
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("Receive") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    Receive casted_ie = (Receive)ie;
                    int     pos       = 0;
                    ushort  id        = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                    if (id == new ConfirmControl().getID())
                    {
                        ConfirmControl msg = new ConfirmControl();
                        msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                        pManagementOCU_ManagementOcuFSM.context.ConfirmControlTransition(msg);
                        done = true;
                    }
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("InternalStateChange_To_ManagementOCU_ManagementOcuFSM_HandleMenu") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    pManagementOCU_ManagementOcuFSM.context.InternalStateChange_To_ManagementOCU_ManagementOcuFSM_HandleMenuTransition(ie);
                    done = true;
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("MenuItemEntered") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    MenuItemEntered casted_ie = (MenuItemEntered)ie;
                    MenuItemEntered msg       = casted_ie;
                    pManagementOCU_ManagementOcuFSM.context.MenuItemEnteredTransition(msg);
                    done = true;
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("MenuItemEntered") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    MenuItemEntered casted_ie = (MenuItemEntered)ie;
                    MenuItemEntered msg       = casted_ie;
                    pManagementOCU_ManagementOcuFSM.context.MenuItemEnteredTransition(msg);
                    done = true;
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("Receive") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    Receive casted_ie = (Receive)ie;
                    int     pos       = 0;
                    ushort  id        = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                    if (id == new RejectControl().getID())
                    {
                        RejectControl msg = new RejectControl();
                        msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                        pManagementOCU_ManagementOcuFSM.context.RejectControlTransition(msg);
                        done = true;
                    }
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("Receive") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    Receive casted_ie = (Receive)ie;
                    int     pos       = 0;
                    ushort  id        = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                    if (id == new ReportStatus().getID())
                    {
                        ReportStatus msg = new ReportStatus();
                        msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                        pManagementOCU_ManagementOcuFSM.context.ReportStatusTransition(msg);
                        done = true;
                    }
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("InternalStateChange_To_ManagementOCU_ManagementOcuFSM_WaitForControl") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    pManagementOCU_ManagementOcuFSM.context.InternalStateChange_To_ManagementOCU_ManagementOcuFSM_WaitForControlTransition(ie);
                    done = true;
                }
            } catch (Exception e) {}



            mutex.ReleaseMutex();
            return(done);
        }
Ejemplo n.º 11
0
        //    This is the function that will check for default transitions if
        //  no other transitions were satisfied.
        //
        public override bool defaultTransitions(InternalEvent ie)
        {
            bool done = false;

               // Since this function can be called from multiple threads,
               // we use a mutex to ensure only one state transition is
               // active at a time.
               mutex.WaitOne();

            // Invoke the FSM transition for this event.
            try
            {
                if (ie.getName().CompareTo("Receive") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    Receive casted_ie = (Receive) ie;
                    int pos = 0;
                    ushort id = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                    if ( id == new ReportStatus().getID())
                    {
                        ReportStatus msg = new ReportStatus();
                        msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                        pManagementOCU_ManagementOcuFSM.context.ReportStatusTransition();
                        done = true;
                    }
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("Receive") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    Receive casted_ie = (Receive) ie;
                    int pos = 0;
                    ushort id = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                    if ( id == new ConfirmControl().getID())
                    {
                        ConfirmControl msg = new ConfirmControl();
                        msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                        pManagementOCU_ManagementOcuFSM.context.ConfirmControlTransition();
                        done = true;
                    }
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("Receive") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    Receive casted_ie = (Receive) ie;
                    int pos = 0;
                    ushort id = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                    if ( id == new ReportControl().getID())
                    {
                        ReportControl msg = new ReportControl();
                        msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                        pManagementOCU_ManagementOcuFSM.context.ReportControlTransition();
                        done = true;
                    }
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("Receive") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    Receive casted_ie = (Receive) ie;
                    int pos = 0;
                    ushort id = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                    if ( id == new RejectControl().getID())
                    {
                        RejectControl msg = new RejectControl();
                        msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos);
                        pManagementOCU_ManagementOcuFSM.context.RejectControlTransition();
                        done = true;
                    }
                }
            } catch (Exception e) {}

            try
            {
                if (ie.getName().CompareTo("MenuItemEntered") == 0 && (ie.getSource().CompareTo("ManagementOCU_ManagementOcuFSM") != 0) && (!done))
                {
                    MenuItemEntered casted_ie = (MenuItemEntered) ie;
                        pManagementOCU_ManagementOcuFSM.context.MenuItemEnteredTransition();
                        done = true;
                }
            } catch (Exception e) {}

            mutex.ReleaseMutex();
            return done;
        }
Ejemplo n.º 12
0
                protected internal override void RejectControlTransition(ManagementOCU_ManagementOcuFSMContext context, RejectControl msg)
                {
                    ManagementOCU_ManagementOcuFSM ctxt = context.Owner;


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


                    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);
                    }

                    return;
                }
Ejemplo n.º 13
0
 protected internal virtual void RejectControlTransition(ManagementOCU_ManagementOcuFSMContext context, RejectControl msg)
 {
     Default(context);
 }