protected void RaiseMessageArrived(EventArgMessage msg) { RaiseRxPacket(); EventHandler<EventArgMessage> handler = messageArrivedEvent; if (handler != null) { handler(this, msg); } }
protected void RaiseMessageArrived(EventArgMessage msg) { RaiseRxPacket(); EventHandler <EventArgMessage> handler = messageArrivedEvent; if (handler != null) { handler(this, msg); } }
private void onReceive(object sender, EventArgMessage msg) { Message recMsg; try { recMsg = new SerialMessage(msg.getMsg()); EventArgSerialMessage eventArgSerialMessage = new EventArgSerialMessage(); eventArgSerialMessage.msg = (SerialMessage)recMsg; EventHandler<EventArgSerialMessage> handler = onMessageArrived; if (handler != null) { handler(this, eventArgSerialMessage); } } catch (Exception e) { throw e; } }
private void onReceive(object sender, EventArgMessage msg) { Message recMsg; try { recMsg = new SerialMessage(msg.getMsg()); EventArgSerialMessage eventArgSerialMessage = new EventArgSerialMessage(); eventArgSerialMessage.msg = (SerialMessage)recMsg; EventHandler <EventArgSerialMessage> handler = onMessageArrived; if (handler != null) { handler(this, eventArgSerialMessage); } } catch (Exception e) { throw e; } }
private void OnMoteMessageArrived(object sender, EventArgMessage msg) { if (!tcpClient.Connected) { return; } try { this.Send(msg.getMsg()); } catch (Exception e) { RaiseEventClientDC(e.Message); this.tcpClient.Close(); } }
private void OnTCPMessageArrived(object sender, EventArgMessage msg) { Thread moteMessenger = new Thread(new ParameterizedThreadStart(SendMessageToMote)); moteMessenger.Start(msg.getMsg()); }