Robox Library for Cpp: tools module 1.0.0
RLibCpp utilities toolset
Public Member Functions | List of all members
Crc16 Class Reference

CRC16 checksums computation tool. More...

#include <crc16.h>

Public Member Functions

 Crc16 ()
 Class constructor.
 
 Crc16 (uint16_t crcBase)
 Class constructor.
 
uint16_t compute (uint8_t data, uint16_t crcBase=Crc16::polySeed)
 Compute the CRC16 value for the specified byte.
 
uint16_t compute (const uint8_t *data, uint32_t count, uint16_t crcBase=Crc16::polySeed)
 Compute the CRC16 value for the specified buffer, starting from the specified offset for the number of byte.
 
uint16_t compute (const ByteVector &data, uint16_t crcBase=Crc16::polySeed)
 Compute the CRC16 value for the specified VyteVect.
 

Detailed Description

CRC16 checksums computation tool.

Constructor & Destructor Documentation

◆ Crc16() [1/2]

Crc16 ( )

Class constructor.

◆ Crc16() [2/2]

Crc16 ( uint16_t crcBase)

Class constructor.

Parameters
crcBaseBase CRC16 value.

Member Function Documentation

◆ compute() [1/3]

uint16_t compute ( const ByteVector & data,
uint16_t crcBase = Crc16::polySeed )

Compute the CRC16 value for the specified VyteVect.

Parameters
dataSource ByteVector.
crcBaseCRC16 base value.
Returns
Return the computed CRC16 value.

◆ compute() [2/3]

uint16_t compute ( const uint8_t * data,
uint32_t count,
uint16_t crcBase = Crc16::polySeed )

Compute the CRC16 value for the specified buffer, starting from the specified offset for the number of byte.

Parameters
dataSource buffer.
countNumber of byte to compute.
crcBaseCRC16 base value.
Returns
Return the computed CRC16 value.

◆ compute() [3/3]

uint16_t compute ( uint8_t data,
uint16_t crcBase = Crc16::polySeed )

Compute the CRC16 value for the specified byte.

Parameters
dataSource byte.
crcBaseCRC16 base value.
Returns
Return the computed CRC16 value.