Ticket #40615

TTL コマンドリファレンス crc16 の記述について

오픈 날짜: 2020-08-04 21:58 마지막 업데이트: 2020-08-04 23:24

Reporter:
(Anonymous)
소유자:
(None)
Type:
Status:
Closed
Component:
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
None
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Details

https://ja.osdn.net/projects/ttssh2/scm/svn/blobs/head/trunk/teraterm/ttpmacro/ttl.cpp : 616

  1. // CRC-16-CCITT
  2. static unsigned int crc16(int n, unsigned char c[])
  3. {
  4. #define CRC16POLY1 0x1021U /* x^{16}+x^{12}+x^5+1 */
  5. #define CRC16POLY2 0x8408U /* 左右逆転 */

とあることから

https://ttssh2.osdn.jp/manual/4/ja/macro/command/crc16.html

CRC-16-IBMを計算する。

0xA001 (x16+x15+x2+x0)

* CRC-16-CCITTを計算する。

* 0x8408 (x16 + x12 + x5 + x0)

が適切と考えられます。

参考: https://ja.wikipedia.org/wiki/%E5%B7%A1%E5%9B%9E%E5%86%97%E9%95%B7%E6%A4%9C%E6%9F%BB#%E4%B8%BB%E3%81%AA%E6%A8%99%E6%BA%96CRC

以上、よろしくお願いいたします。

Ticket History (2/2 Histories)

2020-08-04 21:58 Updated by: None
  • New Ticket "TTL コマンドリファレンス crc16 の記述について" created
2020-08-04 23:24 Updated by: nmaya
  • Resolution Update from None to Fixed
  • Status Update from Open to Closed
댓글 올리기

報告ありがとうございます。r8867 において修正をコミットしました。

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login