semf
|
The semf::app::Crc interface class is used for computing a of cyclic redundancy check (CRC) of the input data. The crc can be computed in one step using the calculate()
function or it can be calculated in many steps where every time a certain chunk of data is fed to the function accumulate()
. For computing the crc of new data one has to reset the semf::app::Crc object using the reset()
function.
semf::CrcSoftware class inherits from semf::app::Crc interface and computes the crc of the input data using the main processing unit. If the hardware has a specific controller to compute the crc value a class that inherits from semf::app::Crc should be implemented and used instead.
In the following example we use the 32 bit software crc from the semf library.