CRC Calculation/Message Validation Support

Detailed Description

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...
 
uint32_t point_one::fusion_engine::messages::CalculateCRC (const void *buffer, size_t length, uint32_t initial_value=0)
 Calculate the CRC for the message (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...
 

Function Documentation

◆ CalculateCRC() [1/2]

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.

◆ CalculateCRC() [2/2]

P1_EXPORT uint32_t point_one::fusion_engine::messages::CalculateCRC ( const void *  buffer,
size_t  length,
uint32_t  initial_value = 0 
)

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

Parameters
bufferA byte buffer containing a payload.
lengthThe length of the buffer.
initial_valueThe seed value of the CRC calculation.
Returns
The calculated CRC value.

Definition at line 45 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 53 of file crc.h.