POS傳輸資料給端末機(刷卡機)為 <STX>[DATA]<ETX><LRC>
LRC: Exclusive-Or All Bytes Of Data & Etx (Stx Not Include).
LRC
代碼: 選擇全部
public static byte calculateLRC(byte[] bytes)
{
return bytes.Aggregate<byte, byte>(0, (x, y) => (byte) (x^ y));
}
http://delphi.ktop.com.tw/board.php?cid ... &tid=81418
http://www.blueshop.com.tw/board/FUM200 ... 174J8.html
http://wenku.baidu.com/view/11bb7165783e0912a2162a96