
Smart Features
6-18
BASLER A640
f
DRAFT
/** \brief Verifies a frame buffer's CRC checksum
* \param pData Pointer to the frame
* \param nbyLength Size of frame in bytes
* \return 1, if the check succeeds, 0 otherwise
*/
int CheckBuffer(const unsigned char* pData, unsigned long nbyLength )
{
unsigned long nCurrentCRC, nDesiredCRC;
/* Calculate the CRC checksum of the buffer. Don't take the last four bytes
containing the checksum into account */
nCurrentCRC = CRC16(pData, nbyLength - sizeof( unsigned long ) );
/* Retrieve the desired CRC value from the data buffer */
nDesiredCRC = ((unsigned long*) pData)[ nbyLength / sizeof ( unsigned long ) - 1];
/* Return TRUE if they are equal */
return nCurrentCRC == nDesiredCRC;
}
Summary of Contents for A640F
Page 1: ...USER S MANUAL Document Number DA00073201 Release Date 1 June 2005...
Page 4: ......
Page 14: ...Introduction 1 6 BASLER A640f DRAFT...
Page 20: ...Camera Interface 2 6 BASLER A640f DRAFT Figure 2 3 I O Schematic...
Page 163: ...Smart Features BASLER A640f 6 27 DRAFT Figure 6 6 Sample Text File for Use With Upload Button...
Page 180: ...Technical Support 8 2 BASLER A640f DRAFT...
Page 184: ...Revision History ii BASLER A640f DRAFT...
Page 186: ...Feedback iv BASLER A640f DRAFT...