您好,登錄后才能下訂單哦!
從中找出數據的頭,然后讀取數據
if (readedDataBuffer.Count >= 20) { int removeCount = 0; for (int i = 0; i < readedDataBuffer.Count - 18; ++i) { // 14 7B節點 if (readedDataBuffer[i] == 0xFD & readedDataBuffer[i + 4] == 0x28 & readedDataBuffer[i + 5] == 0x7B) { byte[] data = new byte[20]; /*節點*/ int data31, data32; double v3, T3; data31 = readedDataBuffer[i + 12];//高八位 data32 = readedDataBuffer[i + 13];//低八位 v3 = (data31 * 256 + data32);//電壓值 T3 = -39.66 + 0.01 * v3 + 0.026; tcure = T3; wendu = T3.ToString(); } removeCount++; } }
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。