◆ jcrc()
Interface for CRC calculation
Use custom polynomials with CRC_POLY. If CRC_POLY is used, all other inputs are required (poly, polylen, zeroinit, swapin, swapout, compout)
- Parameters
-
| auth | - CRC type(CRC5_USB, CRC7_UTMS, CRC8_LTE, CRC11_UTMS, CRC12_UTMS, CRC16_IBM, CRC16_CCITT, CRC24_LTE_A, CRC24_LTE_B, CRC32_IETF, CRC32_IEEE, CRC64_ISO, CRC64_ECMA, CRC_POLY) |
| poly | - Polynomial for CRC calculation |
| polylen | - Polynomial length for CRC calculation |
| zeroinit | - Use all zero initial value for CRC |
| swapin | - Swap input data for CRC value |
| swapout | - Swap output data for CRC value |
| compout | - Complement final result |
◆ partial()
Retrieves the partial CRC value. If result() has previously been called then this function will return a value of zero. In this way a running CRC can be calculated either by calling ProcessData() with multiple sets of data or the partial CRC can be saved, a new CRC engine can be constructed at a latter time, and the partial CRC can be passed in on the first ProcessData() after the new engine is constructed
- Returns
- the partially calculated CRC
◆ ProcessData()
Calculates the CRC for the input data, stays in intermediate state until result() is called at which time swapout and comput are applied
- Parameters
-
| input | - Input data to process |
| length | - Data length |
| partial | - Previous partial calculation of CRC |
◆ result()
Retrieves the CRC value. The final bit-swap and complement is applied only when result() is called
- Parameters
-
| crc | - CRC calculated value |
◆ result_size()
| uint32_t ProtocolPP::jcrc::result_size |
( |
| ) |
|
Size of the result
- Returns
- size of the CRC
The documentation for this class was generated from the following file: