ldas-tools-framecpp 3.0.4
Loading...
Searching...
No Matches
FrameCPP::Common::cksum_impl< CRC > Class Template Reference

Compute CRC checksum with length encoding. More...

#include <cksum.hh>

Public Types

typedef CRC crc_type
 CRC algorithm.
 
typedef std::size_t size_type
 Type which holds the number of bytes processed.
 
typedef uint32_t value_type
 Type to hold the calculated checksum.
 

Public Member Functions

void process_bytes (void const *buffer, size_type byte_count)
 Updates the interim CRC.
 
value_type checksum () const
 Retrieve the CRC value.
 
void reset ()
 Allow the stucture to be reused.
 
void process_bytes (void const *buffer, size_type byte_count)
 Updates the interim CRC.
 
value_type checksum () const
 Retrieve the CRC value.
 
void reset ()
 Allow the stucture to be reused.
 

Detailed Description

template<typename CRC>
class FrameCPP::Common::cksum_impl< CRC >

Compute CRC checksum with length encoding.


This implements the calculation of a CRC checksum with

the addition of the number of bytes at the end.


This implements the calculation of a CRC checksum with

the addition of the number of bytes at the end.

Member Function Documentation

◆ checksum() [1/2]

template<typename CRC >
value_type FrameCPP::Common::cksum_impl< CRC >::checksum ( ) const
inline

Retrieve the CRC value.


Returns

The calculated CRC value

◆ checksum() [2/2]

template<typename CRC >
value_type FrameCPP::Common::cksum_impl< CRC >::checksum ( ) const
inline

Retrieve the CRC value.


Returns

The calculated CRC value

◆ process_bytes() [1/2]

template<typename CRC >
void FrameCPP::Common::cksum_impl< CRC >::process_bytes ( void const * buffer,
size_type byte_count )
inline

Updates the interim CRC.


Parameters
[in]bufferBuffer of bytes to be applied to the interim CRC
[in]byte_count

Number of bytes in buffer to be applied to the interim CRC

◆ process_bytes() [2/2]

template<typename CRC >
void FrameCPP::Common::cksum_impl< CRC >::process_bytes ( void const * buffer,
size_type byte_count )
inline

Updates the interim CRC.


Parameters
[in]bufferBuffer of bytes to be applied to the interim CRC
[in]byte_count

Number of bytes in buffer to be applied to the interim CRC

◆ reset() [1/2]

template<typename CRC >
void FrameCPP::Common::cksum_impl< CRC >::reset ( )
inline

Allow the stucture to be reused.


This method resets the CRC state back to its initial configuration allowing it to be used to calculate

a new CRC checksum.

◆ reset() [2/2]

template<typename CRC >
void FrameCPP::Common::cksum_impl< CRC >::reset ( )
inline

Allow the stucture to be reused.


This method resets the CRC state back to its initial configuration allowing it to be used to calculate

a new CRC checksum.


The documentation for this class was generated from the following files: