Progress with structure to send data
This commit is contained in:
@@ -123,13 +123,14 @@ namespace DoctorApp.Utils
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (DataParser.isRawData(messageBytes))
|
||||
else if (DataParser.isRawDataBikeDoctor(messageBytes))
|
||||
{
|
||||
Console.WriteLine($"Received data: {BitConverter.ToString(payloadbytes)}");
|
||||
MainViewModel.TransferDataToClientBike(payloadbytes);
|
||||
}
|
||||
else if (DataParser.isRawDataBPMDoctor(messageBytes))
|
||||
{
|
||||
MainViewModel.TransferDataToClientBPM(payloadbytes);
|
||||
}
|
||||
|
||||
totalBufferReceived -= expectedMessageLength;
|
||||
expectedMessageLength = BitConverter.ToInt32(totalBuffer, 0);
|
||||
}
|
||||
|
||||
this.stream.BeginRead(this.buffer, 0, this.buffer.Length, new AsyncCallback(OnRead), null);
|
||||
|
||||
Reference in New Issue
Block a user