Functions
crc Namespace Reference

Functions

uint16_t compute16CCITT (const uint8_t *buf, size_t buf_length)
 This function computes the CRC-8-CCITT (Cyclic Redundancy Check) of a buffer "buf" of "buf_length" bytes. More...
 
bool isValid (const std::vector< uint8_t > &message)
 Validates whether the calculated CRC of the SBF block at hand matches the CRC field of the streamed SBF block. More...
 

Function Documentation

◆ compute16CCITT()

uint16_t crc::compute16CCITT ( const uint8_t *  buf,
size_t  buf_length 
)

This function computes the CRC-8-CCITT (Cyclic Redundancy Check) of a buffer "buf" of "buf_length" bytes.

Parameters
[in]bufThe buffer at hand
[in]buf_lengthNumber of bytes in "buf"
Returns
The calculated CRC

Definition at line 42 of file crc.cpp.

◆ isValid()

bool crc::isValid ( const std::vector< uint8_t > &  message)

Validates whether the calculated CRC of the SBF block at hand matches the CRC field of the streamed SBF block.

Parameters
blockThe SBF block that we are interested in
Returns
True if the CRC check of the SBFBlock has passed, false otherwise

Definition at line 71 of file crc.cpp.



septentrio_gnss_driver
Author(s): Tibor Dome
autogenerated on Wed Nov 22 2023 04:04:28