Functions
crc.c File Reference

Defines the CRC table and the functions to compute and validate the CRC of an SBF block. More...

#include <rosaic/crc/crc.h>
Include dependency graph for crc.c:

Go to the source code of this file.

Functions

uint16_t compute16CCITT (const void *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 void *block)
 Validates whether the calculated CRC of the SBF block at hand matches the CRC field of the streamed SBF block. More...
 

Detailed Description

Defines the CRC table and the functions to compute and validate the CRC of an SBF block.

Date
17/08/20

Definition in file crc.c.

Function Documentation

◆ compute16CCITT()

uint16_t compute16CCITT ( const void *  buf,
size_t  buf_length 
)

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

Note that a void pointer is a pointer that has no associated data type with it. A void pointer can hold address of any type and can be typcasted to any type.

Definition at line 43 of file crc.c.

◆ isValid()

bool isValid ( const void *  block)

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 68 of file crc.c.



rosaic
Author(s): Tibor Dome
autogenerated on Wed Oct 14 2020 03:43:50