Smart Features
6-18
BASLER A102
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;
}
Содержание A102f
Страница 1: ...USER S MANUAL Document Number DA00063006 Release Date 7 December 2010 ...
Страница 4: ......
Страница 25: ...Basic Operation Standard Features BASLER A102f 3 3 DRAFT Figure 3 2 Block Diagram ...
Страница 62: ...Basic Operation Standard Features 3 40 BASLER A102f DRAFT ...
Страница 166: ...Mechanical Considerations 7 6 BASLER A102f DRAFT ...