public void ReceiveTransition(ReportIdentification msg, Receive.Body.ReceiveRec transportData) { transition_ = "ReceiveTransition"; State.ReceiveTransition(this, msg, transportData); transition_ = ""; return; }
public ReportIdentification setAs(ReportIdentification value) { m_MsgHeader = value.m_MsgHeader; m_Body = value.m_Body; return(this); }
public ReportIdentification(ReportIdentification 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; }
public bool isEqual(ReportIdentification value) { if (!this.getMsgHeader().isEqual(value.getMsgHeader())) { return(false); } if (!this.getBody().isEqual(value.getBody())) { return(false); } return(true); }
public virtual void handleMessageAction(ReportIdentification msg, Receive.Body.ReceiveRec transportData) { // Since we found a discovery service, register our local services registerServicesAction(transportData); }
protected internal override void ReceiveTransition(DiscoveryClient_ReceiveFSMContext context, ReportIdentification msg, Receive.Body.ReceiveRec transportData) { DiscoveryClient_ReceiveFSM ctxt = context.Owner; #if TRACE Trace.WriteLine( "LEAVING STATE : DiscoveryClient_ReceiveFSM_SM.Receiving_Ready"); #endif DiscoveryClient_ReceiveFSMState endState = context.State; #if TRACE Trace.WriteLine( "ENTER TRANSITION: DiscoveryClient_ReceiveFSM_SM.DiscoveryClient_ReceiveFSM_SM.Receiving_Ready.ReceiveTransition(, ReportIdentification msg, Receive.Body.ReceiveRec transportData)"); #endif context.ClearState(); try { ctxt.handleMessageAction(msg, transportData); } finally { #if TRACE Trace.WriteLine( "EXIT TRANSITION : DiscoveryClient_ReceiveFSM_SM.DiscoveryClient_ReceiveFSM_SM.Receiving_Ready.ReceiveTransition(, ReportIdentification msg, Receive.Body.ReceiveRec transportData)"); #endif context.State = endState; } return; }
protected internal virtual void ReceiveTransition(DiscoveryClient_ReceiveFSMContext context, ReportIdentification msg, Receive.Body.ReceiveRec transportData) { Default(context); }
public bool notEquals(ReportIdentification value) { return(!this.isEqual(value)); }
// 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("Receive") == 0 && (ie.getSource().CompareTo("DiscoveryClient_ReceiveFSM") != 0)) { Receive casted_ie = (Receive)ie; int pos = 0; ushort id = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos); if (id == new ReportHeartbeatPulse().getID()) { ReportHeartbeatPulse msg = new ReportHeartbeatPulse(); msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos); Receive.Body.ReceiveRec transportData = casted_ie.getBody().getReceiveRec(); pDiscoveryClient_ReceiveFSM.context.ReceiveTransition(msg, transportData); done = true; } } } catch (Exception e) {} try { if ((!done) && ie.getName().CompareTo("Receive") == 0 && (ie.getSource().CompareTo("DiscoveryClient_ReceiveFSM") != 0)) { Receive casted_ie = (Receive)ie; int pos = 0; ushort id = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos); if (id == new ReportServices().getID()) { ReportServices msg = new ReportServices(); msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos); Receive.Body.ReceiveRec transportData = casted_ie.getBody().getReceiveRec(); pDiscoveryClient_ReceiveFSM.context.ReceiveTransition(msg, transportData); done = true; } } } catch (Exception e) {} try { if ((!done) && ie.getName().CompareTo("Receive") == 0 && (ie.getSource().CompareTo("DiscoveryClient_ReceiveFSM") != 0)) { Receive casted_ie = (Receive)ie; int pos = 0; ushort id = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos); if (id == new ReportIdentification().getID()) { ReportIdentification msg = new ReportIdentification(); msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos); Receive.Body.ReceiveRec transportData = casted_ie.getBody().getReceiveRec(); pDiscoveryClient_ReceiveFSM.context.ReceiveTransition(msg, transportData); done = true; } } } catch (Exception e) {} try { if ((!done) && ie.getName().CompareTo("Receive") == 0 && (ie.getSource().CompareTo("DiscoveryClient_ReceiveFSM") != 0)) { Receive casted_ie = (Receive)ie; int pos = 0; ushort id = BitConverter.ToUInt16(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos); if (id == new GrantNodeID().getID()) { GrantNodeID msg = new GrantNodeID(); msg.decode(casted_ie.getBody().getReceiveRec().getMessagePayload().getData(), pos); Receive.Body.ReceiveRec transportData = casted_ie.getBody().getReceiveRec(); pDiscoveryClient_ReceiveFSM.context.ReceiveTransition(msg, transportData); done = true; } } } catch (Exception e) {} try { if ((!done) && ie.getName().CompareTo("RHP_Timeout") == 0 && (ie.getSource().CompareTo("DiscoveryClient_ReceiveFSM") != 0)) { RHP_Timeout casted_ie = (RHP_Timeout)ie; pDiscoveryClient_ReceiveFSM.context.RHP_TimeoutTransition(); done = true; } } catch (Exception e) {} mutex.ReleaseMutex(); return(done); }