Exemplo n.º 1
0
 public void BroadcastLocalTransition(BroadcastLocal msg)
 {
     transition_ = "BroadcastLocalTransition";
     State.BroadcastLocalTransition(this, msg);
     transition_ = "";
     return;
 }
Exemplo n.º 2
0
 public virtual void BroadcastLocalEnqueueAction(BroadcastLocal msg)
 {
     sendJausMessage(
     (uint)msg.getBody().getBroadcastRec().getMessagePayload().getLength(),
     msg.getBody().getBroadcastRec().getMessagePayload().getData(),
     new JausAddress(jausRouter.getJausAddress().getSubsystemID(), (byte) 0xFF, (byte) 0xFF));
 }
Exemplo n.º 3
0
 public virtual void BroadcastLocalEnqueueAction(BroadcastLocal msg)
 {
     sendJausMessage(
         (uint)msg.getBody().getBroadcastRec().getMessagePayload().getLength(),
         msg.getBody().getBroadcastRec().getMessagePayload().getData(),
         new JausAddress(jausRouter.getJausAddress().getSubsystemID(), (byte)0xFF, (byte)0xFF));
 }
Exemplo n.º 4
0
        public BroadcastLocal(BroadcastLocal value)
        {
            /// Initiliaze the protected variables
            m_Body = new Body();
            m_Name = "BroadcastLocal";

            /// Copy the values
            m_Body = value.m_Body;
        }
Exemplo n.º 5
0
        public BroadcastLocal(BroadcastLocal value)
        {
            /// Initiliaze the protected variables
            m_Body = new Body();
            m_Name = "BroadcastLocal";

            /// Copy the values
            m_Body = value.m_Body;
        }
Exemplo n.º 6
0
        public bool  isEqual(BroadcastLocal value)
        {
            if (!this.getBody().isEqual(value.getBody()))
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 7
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 ((!done) && ie.getName().CompareTo("Send") == 0 && (ie.getSource().CompareTo("Transport_SendFSM") != 0))
                {
                    Send casted_ie = (Send)ie;
                    Send msg       = casted_ie;
                    pTransport_SendFSM.context.SendTransition(msg);
                    done = true;
                }
            } catch (Exception e) {}

            try
            {
                if ((!done) && ie.getName().CompareTo("BroadcastLocal") == 0 && (ie.getSource().CompareTo("Transport_SendFSM") != 0))
                {
                    BroadcastLocal casted_ie = (BroadcastLocal)ie;
                    BroadcastLocal msg       = casted_ie;
                    pTransport_SendFSM.context.BroadcastLocalTransition(msg);
                    done = true;
                }
            } catch (Exception e) {}

            try
            {
                if ((!done) && ie.getName().CompareTo("BroadcastGlobal") == 0 && (ie.getSource().CompareTo("Transport_SendFSM") != 0))
                {
                    BroadcastGlobal casted_ie = (BroadcastGlobal)ie;
                    BroadcastGlobal msg       = casted_ie;
                    pTransport_SendFSM.context.BroadcastGlobalTransition(msg);
                    done = true;
                }
            } catch (Exception e) {}



            mutex.ReleaseMutex();
            return(done);
        }
Exemplo n.º 8
0
                protected internal override void BroadcastLocalTransition(Transport_SendFSMContext context, BroadcastLocal msg)
                {
                    Transport_SendFSM ctxt = context.Owner;


#if TRACE
                    Trace.WriteLine(
                        "LEAVING STATE   : Transport_SendFSM_SM.Sending");
#endif

                    Transport_SendFSMState endState = context.State;

#if TRACE
                    Trace.WriteLine(
                        "ENTER TRANSITION: Transport_SendFSM_SM.Transport_SendFSM_SM.Sending.BroadcastLocalTransition(, BroadcastLocal msg)");
#endif

                    context.ClearState();

                    try
                    {
                        ctxt.BroadcastLocalEnqueueAction(msg);
                    }
                    finally
                    {
#if TRACE
                        Trace.WriteLine(
                            "EXIT TRANSITION : Transport_SendFSM_SM.Transport_SendFSM_SM.Sending.BroadcastLocalTransition(, BroadcastLocal msg)");
#endif

                        context.State = endState;
                    }

                    return;
                }
Exemplo n.º 9
0
 protected internal virtual void BroadcastLocalTransition(Transport_SendFSMContext context, BroadcastLocal msg)
 {
     Default(context);
 }
Exemplo n.º 10
0
 public void BroadcastLocalTransition(BroadcastLocal msg)
 {
     transition_ = "BroadcastLocalTransition";
     State.BroadcastLocalTransition(this, msg);
     transition_ = "";
     return;
 }
Exemplo n.º 11
0
                protected internal override void BroadcastLocalTransition(Transport_SendFSMContext context, BroadcastLocal msg)
                {
                    Transport_SendFSM ctxt = context.Owner;

                    #if TRACE
                    Trace.WriteLine(
                        "TRANSITION   : Transport_SendFSM_SM.Sending.BroadcastLocalTransition(, BroadcastLocal msg)");
                    #endif

                    Transport_SendFSMState endState = context.State;

                    context.ClearState();

                    try
                    {
                        ctxt.BroadcastLocalEnqueueAction(msg);
                    }
                    finally
                    {
                        context.State = endState;
                    }

                    return;
                }
Exemplo n.º 12
0
 public bool  notEquals(BroadcastLocal value)
 {
     return(!this.isEqual(value));
 }
Exemplo n.º 13
0
        public BroadcastLocal setAs(BroadcastLocal value)
        {
            m_Body = value.m_Body;

            return(this);
        }
Exemplo n.º 14
0
 public bool notEquals(BroadcastLocal value)
 {
     return !this.isEqual(value);
 }
Exemplo n.º 15
0
        public bool isEqual(BroadcastLocal value)
        {
            if (!this.getBody().isEqual(value.getBody()))
            {
            return false;
            }

            return true;
        }
Exemplo n.º 16
0
 protected internal virtual void BroadcastLocalTransition(Transport_SendFSMContext context, BroadcastLocal msg)
 {
     Default(context);
 }
Exemplo n.º 17
0
        public BroadcastLocal setAs(BroadcastLocal value)
        {
            m_Body = value.m_Body;

            return this;
        }