Embedded Template Library  1.0
 All Classes Files Functions Variables Typedefs Friends Modules Pages
etl::crc16< ENDIANNESS > Class Template Reference

#include <crc16.h>

Public Types

typedef uint16_t value_type
 

Public Member Functions

 crc16 ()
 Default constructor.
 
template<typename TIterator >
 crc16 (TIterator begin, const TIterator end)
 
void reset ()
 Resets the CRC to the initial state.
 
template<typename TValue >
void add (TValue value)
 
void add (uint8_t value)
 
template<typename TIterator >
void add (TIterator begin, const TIterator end)
 
value_type value () const
 Gets the CRC value.
 
template<typename TValue >
crc16< ENDIANNESS > & operator+= (TValue value)
 
 operator value_type () const
 Conversion operator to value_type.
 

Detailed Description

template<const int ENDIANNESS = endian::little>
class etl::crc16< ENDIANNESS >

Calculates CRC16 using polynomial 0x8005.

Template Parameters
ENDIANNESSThe endianness of the calculation for input types larger than uint8_t. Default = endian::little.

Constructor & Destructor Documentation

template<const int ENDIANNESS = endian::little>
template<typename TIterator >
etl::crc16< ENDIANNESS >::crc16 ( TIterator  begin,
const TIterator  end 
)
inline

Constructor from range.

Parameters
beginStart of the range.
endEnd of the range.

Member Function Documentation

template<const int ENDIANNESS = endian::little>
template<typename TValue >
void etl::crc16< ENDIANNESS >::add ( TValue  value)
inline
Parameters
valueThe value to add to the CRC.
template<const int ENDIANNESS = endian::little>
void etl::crc16< ENDIANNESS >::add ( uint8_t  value)
inline
Parameters
valueThe uint8_t to add to the CRC.
Returns
The CRC result.
template<const int ENDIANNESS = endian::little>
template<typename TIterator >
void etl::crc16< ENDIANNESS >::add ( TIterator  begin,
const TIterator  end 
)
inline
Parameters
beginStart of the range.
endEnd of the range.
template<const int ENDIANNESS = endian::little>
template<typename TValue >
crc16<ENDIANNESS>& etl::crc16< ENDIANNESS >::operator+= ( TValue  value)
inline
Parameters
valueThe value to add to the CRC.

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