Garmin Fleet Management Controller
2.19.0
|
Go to the source code of this file.
Functions | |
uint32 | UTL_accumulate_crc32 (uint8 const *const data, uint32 const size, uint32 const accumulative_value) |
Accumulate the 32-bit CRC for a block of data. More... | |
uint32 | UTL_calc_crc32 (uint8 const *const data, uint32 const size, uint32 const initial_value) |
Compute and finalize a 32-bit in one shot. More... | |
uint32 | UTL_complete_crc32 (uint32 const actual_crc) |
Complete the 32-bit CRC calculation. More... | |
Variables | |
static uint32 const | my_crc32_tbl [256] |
CRC32 lookup table. This table corresponds to the polynomial 0xEDB88320. More... | |
uint32 UTL_accumulate_crc32 | ( | uint8 const *const | data, |
uint32 const | size, | ||
uint32 const | accumulative_value | ||
) |
Accumulate the 32-bit CRC for a block of data.
This form should be used when computing the CRC32 for data that spans multiple buffers. To use, call this function for each block of data, passing the returned value from one call as the accumulative_value for the next call. Finally, call UTL_complete_crc32 to finalize the value.
data | The array of data bytes to accumulate the CRC32 for. |
size | The number of bytes in data |
accumulative_value | The accumulated CRC32 returned by the last call. |
Definition at line 110 of file utl_crc.cpp.
References my_crc32_tbl, and UTL_complete_crc32().
Referenced by UTL_calc_crc32().
Compute and finalize a 32-bit in one shot.
data | The array of data bytes to compute the CRC32 for. |
size | The number of bytes in data |
initial_value | The initial value of the CRC32, normally 0. |
Definition at line 78 of file utl_crc.cpp.
References UTL_accumulate_crc32(), and UTL_complete_crc32().
Referenced by FmiApplicationLayer::rx().
Complete the 32-bit CRC calculation.
This form should be used when computing the CRC32 for data that spans multiple buffers. To use, call this function for each block of data, passing the returned value from one call as the accumulative_value for the next call. Finally, call UTL_complete_crc32 to finalize the value.
actual_crc | The accumulated CRC from the last call to UTL_accumulate_crc32() |
Definition at line 145 of file utl_crc.cpp.
Referenced by UTL_accumulate_crc32(), and UTL_calc_crc32().
|
static |
CRC32 lookup table. This table corresponds to the polynomial 0xEDB88320.
Definition at line 34 of file utl_crc.cpp.
Referenced by UTL_accumulate_crc32().