Pummpcomm v2.5.1 Pummpcomm.Crc.Crc16 View Source
16-bit Cyclic Redundancy Check.
Link to this section Summary
Functions
Checks CRC16 sent in page
matches CRC16 calculated from rest of page
CRC16 of binary
The section of page
that does not contain the crc_data
Link to this section Functions
Checks CRC16 sent in page
matches CRC16 calculated from rest of page
.
Returns
{:error, "Page is too short"}
- if the page is too short{:fail, "<actual-crc-16> does not match <expected-crc-16>"}
- CRC16 in page does not match calculated CRC16 for page{:ok, expected_crc16}
-expected_crc16
extracted frompage
.
CRC16 of binary
The section of page
that does not contain the crc_data