Basler A620f Manual do Utilizador Página 120

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 144
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 119
Smart Features
6-18 BASLER A620
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;
}
Vista de página 119
1 2 ... 115 116 117 118 119 120 121 122 123 124 125 ... 143 144

Comentários a estes Manuais

Sem comentários