public void SerialPort1_DataReceived(object sender, DataReceivedArgs e) //FIFO { foreach (byte b in e.Data) { DecodeMessage(b); } }
private void SerialPort1_DataReceived(object sender, DataReceivedArgs e) { for (int i = 0; i < e.Data.Length; i++) { DecodeMessage(e.Data[i]); } }
async void holder_OnDataReceived(object sender, DataReceivedArgs e) { var data = (ProcessedMsg)e.Data; this.StoredList.Add(data); await this.DetectSave(); }
public void DecodeMsgReceived(object sender, DataReceivedArgs e) { foreach (var b in e.Data) { DecodeMessage(b); } }
public void OnHerkulexSendToSerial(byte[] data) { DataReceivedArgs arg = new DataReceivedArgs(); arg.Data = data; OnHerkulexSendToSerialEvent?.Invoke(this, arg); }
public void SerialPort_DataReceived(object sender, DataReceivedArgs e) { for (int i = 0; i < e.Data.Length; i++) { byteListReceived.Enqueue(e.Data[i]); } }
private void SocketOnDataReceived(DataReceivedArgs args) { lock (_handleLock) { _receiveBuffer.AddBytes(args.Data); _lastActive = DateTime.UtcNow; Handle(); } }
private void SerialPort1_DataReceived(object sender, DataReceivedArgs e) { robot.receivedText += Encoding.UTF8.GetString(e.Data, 0, e.Data.Length); for (int i = 0; i < e.Data.Length; i++) { robot.byteListReceived.Enqueue(e.Data[i]); } }
private void SerialPort1_DataReceived(object sender, DataReceivedArgs e) { //receivedtext += Encoding.UTF8.GetString(e.Data, 0, e.Data.Length); for (int i = 0; i < e.Data.Length; i++) { DecodeMessage(e.Data[i]); } }
private void SerialPort1_DataReceived(object sender, DataReceivedArgs e) { //robot.receivedMessage += Encoding.UTF8.GetString(e.Data, 0, e.Data.Length); foreach (byte b in e.Data) { DecodeMessage(b); } }
private void SerialPort_DataReceived(object sender, DataReceivedArgs e) { for (int i = 0; i < e.Data.Length; i++) { //robot.byteListReceived.Enqueue(e.Data[i]); decodeMsg(e.Data[i]); } }
private void OnClient_MainDataReceived(object sender, DataReceivedArgs e) { Device.BeginInvokeOnMainThread(async() => { // This gets called but it never fires the MainDataReceived event because _stream.DataAvailable (in Client.Receiver) is never true! // Except once just to show that this code works. await DisplayAlert("Success", $"Received this '{e.Data}' from the server!", ":-)"); }); }
private void OnDataReceived(object sender, DataReceivedArgs e) { EventHandler <DataReceivedArgs> handler = MainDataReceived; if (handler != null) { MainDataReceived(this, e); // re-raise event } }
private void TcpAdapter_OnDataReceivedEvent(object sender, DataReceivedArgs e) { //On deserialize le message JSON en provenance de la Referee Box string s = Encoding.ASCII.GetString(e.Data); var refBoxCommand = JsonConvert.DeserializeObject <RefBoxMessage>(s); var msg = ZeroFormatterSerializer.Serialize <ZeroFormatterMsg>(refBoxCommand); OnMulticastSendRefBoxCommand(msg); }
public void SerialPort1_DataReceived(object sender, DataReceivedArgs e) { int i; robot.receivedText += Encoding.UTF8.GetString(e.Data, 0, e.Data.Length); for (i = 0; i < e.Data.Length; i++) { DecodeMessage(e.Data[i]); //robot.byteListReceived.Enqueue(e.Data[i]); } }
private void mBulkInOut_DataReceived(object sender, DataReceivedArgs e) { if (InvokeRequired) { Invoke(new DataRecvDelegate(OnDataReceived), new object[] { sender, e }); } else { OnDataReceived(sender, e); } }
public void SerialPort1_DataReceived(object sender, DataReceivedArgs e) { for (int i = 0; i < e.Data.Length; i++) { robot.byteListReceived.Enqueue(e.Data[i]); } //foreach(var c in e.Data) //{ // robot.byteListReceived.Enqueue(c); //} }
private void SerialPort_OnDataReceived(object sender, DataReceivedArgs e) { byte[] dataReceived = new byte[e.Data.Length]; foreach (byte b in e.Data) { dataReceived[b] = e.Data[b]; } OnDataReceivedEvent?.Invoke(this, new DataReceivedArgs { Data = dataReceived }); }
private void OnDataReceived_Loop(object sender, DataReceivedArgs e) { UsbEndpointBase epSendender = (UsbEndpointBase)sender; String sTemp = ""; for (int i = 0; i < e.Count; i++) { sTemp += e.Buffer[i].ToString("X2"); } Debug.Print(" Len:" + e.Count.ToString() + " Data:" + sTemp); }
/// <summary> /// This is called whenever data is received from the client /// </summary> /// <param name="args"></param> private void SocketOnDataReceived(DataReceivedArgs args) { if (!_canReceive) { return; } lock (_fk) { Interlocked.Add(ref Server.ReceivedIncrement, args.Data.Length); _receiveBuffer.AddBytes(args.Data); // -- Add the bytes into our receive buffer.. _lastActive = DateTime.UtcNow; } }
private void OnDataReceived(object sender, DataReceivedArgs args) { switch (args.Type) { case DataType.SceneState: SceneState.FromByteArray(args.Buffer, ref this.sceneState); this.OnSceneData(); break; case DataType.InputState: InputState.FromByteArray(args.Buffer, ref this.inputState); this.OnInputData(); break; } }
private void Reader_ReceiveData(object sender, DataReceivedArgs e) { txtType.Text = e.DL.Record.DocumentType; txtNumber.Text = e.DL.Record.LicenseNumber; txtIDState.Text = e.DL.Record.JurisdictionCode; txtFname.Text = e.DL.Record.FirstName; txtMname.Text = e.DL.Record.MiddleName; txtLname.Text = e.DL.Record.LastName; txtSuffix.Text = e.DL.Record.NameSuffix; txtAdd1.Text = e.DL.Record.Address1; txtAdd2.Text = e.DL.Record.Address2; txtCity.Text = e.DL.Record.City; txtState.Text = e.DL.Record.JurisdictionCode; txtZip.Text = e.DL.Record.PostalCode; }
private void MySockOnDataReceived(DataReceivedArgs args) { lock (_receiveBuffer) { if (_receiveBuffer.Length == 0) { _receiveBuffer = args.Data; return; } var tempBuff = new byte[_receiveBuffer.Length + args.Data.Length]; Buffer.BlockCopy(_receiveBuffer, 0, tempBuff, 0, _receiveBuffer.Length); Buffer.BlockCopy(args.Data, 0, tempBuff, _receiveBuffer.Length, args.Data.Length); _receiveBuffer = tempBuff; } }
private void OnDataReceived(DataReceivedArgs args, int index) { lock (_receiveBuffer[index]) { if (_receiveBuffer.Length == 0) { _receiveBuffer[index] = args.Data; return; } var tempBuff = new byte[_receiveBuffer[index].Length + args.Data.Length]; Buffer.BlockCopy(_receiveBuffer[index], 0, tempBuff, 0, _receiveBuffer[index].Length); Buffer.BlockCopy(args.Data, 0, tempBuff, _receiveBuffer[index].Length, args.Data.Length); _receiveBuffer[index] = tempBuff; } //Debug.info("Read [" + index + "] : " ); }
private async void UDPDataReceived(object sender, DataReceivedArgs e) { string data = Encoding.UTF8.GetString(e.data); System.Diagnostics.Trace.TraceInformation(data); QSO qso = qsoFactory.create(data); if (qso == null) { return; } //System.Diagnostics.Trace.TraceInformation(qso.toJSON()); dgvQSOInsert(qso); ProtoBufSerialization.Write <QSO>(qsoFilePath, qso, true); await http.postQso(qso); }
private void OnDataReceived(object sender, DataReceivedArgs e) { switch (miTestType) { case 1: OnDataReceived_Benchmark(sender, e); break; case 3: OnDataReceived_Benchmark(sender, e); break; default: break; } }
private void MySockOnDataReceived(DataReceivedArgs args) { System.Diagnostics.Debug.WriteLine("MySockOnDataReceived"); lock (_receiveBuffer) { if (_receiveBuffer.Length == 0) { _receiveBuffer = args.Data; return; } var tempBuff = new byte[_receiveBuffer.Length + args.Data.Length]; Buffer.BlockCopy(_receiveBuffer, 0, tempBuff, 0, _receiveBuffer.Length); Buffer.BlockCopy(args.Data, 0, tempBuff, _receiveBuffer.Length, args.Data.Length); _receiveBuffer = tempBuff; } }
private void SocketOnDataReceived(DataReceivedArgs args) { WriteToBox("Data Received"); var readBuffer = args.Data; int bytesRead = readBuffer.Length; // There might be more data, so store the data received so far. StringBuilder sb = new StringBuilder(); sb.Append(Encoding.ASCII.GetString( readBuffer, 0, bytesRead)); String content = sb.ToString(); Console.WriteLine("Read {0} bytes from socket. \n Data : {1}", content.Length, content); }
async void Holder_OnDataReceived(object sender, DataReceivedArgs e) { if (e.Data != null) { var msg = (BaseMessage)e.Data; if (msg != null) { var client = this.Clients.FirstOrDefault(c => c.Value.AcceptMessageType.Equals(msg.GetType())); if (client != null) { try { await client.Value.Send(msg); } catch (Exception ex) { this.Processed(this, new ProcessedArgs(msg.MsgType, msg.ID, ex)); Console.WriteLine(ex.Message); } } } } }
private void MySockOnDataReceived(DataReceivedArgs args) { lock (_receiveBuffer) { if (_receiveBuffer.Length == 0) { _receiveBuffer = args.Data; return; } var tempBuff = new byte[_receiveBuffer.Length + args.Data.Length]; Buffer.BlockCopy(_receiveBuffer, 0, tempBuff, 0, _receiveBuffer.Length); Buffer.BlockCopy(args.Data, 0, tempBuff, _receiveBuffer.Length, args.Data.Length); _receiveBuffer = tempBuff; } //string asAscii = Encoding.ASCII.GetString(args.Data); //WriteToBox("Got Data: " + asAscii.Replace("\r\n", "")); //if (asAscii.Contains("451")) { // _mySock.Send(Encoding.ASCII.GetBytes("NICK u24something\r\n")); // _mySock.Send(Encoding.ASCII.GetBytes("USER u24something u24something bla :u24something\r\n")); // _mySock.Send(Encoding.ASCII.GetBytes("MODE u24something +B-x\r\n")); //} }