RS-232C通信など、通信において文字化けやパケットロスが発生した場合のエラー検知を検討している。
その中で、キーワードとなるのがBCC(Block Checking Character)。
BCCの定義
BCCの定義について良さそうな資料は以下。
福福電子工房さん
http://www.fukufukudenshi.jp/v2/RS-232C/#Step15
LINEEYE. CO. LTD
http://www.lineeye.co.jp/html/term_ayamari.html
Chiaki Komiyaさん
http://www5e.biglobe.ne.jp/~komichan/network/n1_CRC.html
BCCは「水平パリティ」特有の用語なのか、「サムチェック」「巡回符号(CRC)」にも関連するのかは、それぞれの説明で扱いが違うように思う。この点は未消化。
<ETX>
をBCCに含めるか
it must be performed over all chars. excluding the STX and ETX.
From what I know is that BCC is XOR of all the bytes in a given byte stream excluding the first SOH or STX till first ETX or EOT. ETX is included in the BCC.
<ETX>
を{含める/含めない}についても異なる意見がある。