CRC Calculation/Message Validation Support

Functions

uint32_t point_one::fusion_engine::messages::CalculateCRC (const void *buffer)
 Calculate the CRC for the message (header + payload) contained in the buffer. More...
 
bool point_one::fusion_engine::messages::IsValid (const void *buffer)
 Check if the message contained in the buffer has a valid CRC. More...
 

Detailed Description

Function Documentation

◆ CalculateCRC()

P1_EXPORT uint32_t point_one::fusion_engine::messages::CalculateCRC ( const void *  buffer)

Calculate the CRC for the message (header + payload) contained in the buffer.

Parameters
bufferA byte buffer containing a MessageHeader and payload.
Returns
The calculated CRC value.

Definition at line 57 of file crc.cc.

◆ IsValid()

bool point_one::fusion_engine::messages::IsValid ( const void *  buffer)
inline

Check if the message contained in the buffer has a valid CRC.

Parameters
bufferA byte buffer containing a MessageHeader and payload.
Returns
true if the CRC value in the header matches the CRC computed from the current contents.

Definition at line 41 of file crc.h.