问题描述
问候,
目前我正在制作一个允许我下载存储在某些乐器中的数据的应用程序。使用以下方法,我能够下载仪器两个通道中包含的信息(一个仪器有两个连接捕获器的通道)
Regards,
Currently I am making an application that allows me to download the data stored in certain instruments. Using the following method, I was able to download the information contained in the two channels of the instrument (an instrument has two channels which connect captors)
Private Sub DownMesure_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)Handles DownMesure.Click
SModem.DownloadMesure(CaptSonde, Data1, Data2)
For Each itemData1 As Byte In Data1
MsgBox((itemData1 / 10).ToString)
Next
End Sub
现在,Data1和Data2代表存储每个通道数据的字节数组。 Data1存储数据轨道1和Data2数据存储轨道2.我需要将数据转换为Double类型的数据。
有人可以告诉我如何程序那部分?换句话说,因为我可以将这些数据(字节)转换为数据(双)。
谢谢
Now, Data1 and Data2 represent the array of bytes that store the data of each channel. Data1 stores data track 1 and Data2 data stored track 2. I need that data to be transformed into data of type Double.
Could someone give me an idea of how to program that part? Put another way, as I can do the transformation of these data (bytes) to Data (Double).
Thanks
推荐答案
Dim d As Double = BitConverter.ToDouble(bytes, 0)
希望这会有所帮助。
Hope this helps.
这篇关于如何在Double类型的数据中转换Bytes类型的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!