Ticket #40615

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

Date d'ouverture: 2020-08-04 21:58 Dernière mise à jour: 2020-08-04 23:24

Rapporteur:
(Anonyme)
Propriétaire:
(Aucun)
Type:
État:
Atteints
Composant:
Jalon:
(Aucun)
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Fixed
Fichier:
Aucun
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Détails

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
  • Résolution Update from Aucun to Fixed
  • État Update from Ouvert to Atteints
Commentaire

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

Attachment File List

No attachments

Modifier

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