-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐞Predefined Crc16.CCITT
is confusing
#145
Comments
Hi @cmcqueen, Thanks for reaching out. You can find a basic outline of the configurations here: Acknowledging this isn't ideal, I'm considering creating a MkDocs plugin to enhance the documentation in regard to the CRC configurations. best |
Will be addressed in 7.0.0 |
One source of confusion is, some literature refers to "the CCITT polynomial" (𝑥16 + 𝑥12 + 𝑥5 + 1; 0x1021) only caring about the polynomial itself, without regard to the other parameters that constitute a CRC algorithm. So from that point-of-view, any CRC that uses the "CCITT polynomial" might be confusingly named a CCITT CRC. Eg Cyclic redundancy check — Polynomial representations (Wikipedia) lists various CRC polynomials including CCITT without other parameters. Since the Catalogue of parametrised CRC algorithms exists and provides a more precise identification of CRC algorithms, it makes sense to follow its nomenclature.
Thanks for that. I appreciate your work to improve this. |
Hi @cmcqueen, thanks for response, yes that's pretty much what happend to me 😅. best |
Summary
The predefined
Crc16.CCITT
has a misleading name. Referring to CRC-16/KERMIT in the CRC catalog, which says it has alias CRC-CCITT, I would expect it to implement that. But it instead appears to implement CRC-16/XMODEM.Reproducing the Issue
I would expect the predefined
Crc16.CCITT
to be equivalent toAnd so calculating the "check" value:
But, that's not the definition of
Crc16.CCITT
. Rather, it appears to really be CRC-16/XMODEM:Documentation
It would be helpful if the documentation has a table of all the predefined CRC algorithms, listing all their configuration parameters, along with a link to the CRC catalog..
The text was updated successfully, but these errors were encountered: