FW: [ILUG] just out of curiousity...

Stephen_Reilly at dell.com Stephen_Reilly at dell.com
Tue Nov 14 17:42:04 GMT 2000


Kevin,
	try http://www.modicon.com/techpubs/crc7.html, my search engine's
better than yours, so there :) Why aren't you using CRC ?

generation function :

static unsigned char LRC(auchMsg, usDataLen)
unsigned char *auchMsg ;		/* message to calculate  */
unsigned short usDataLen ;		/* LRC upon quantity of  */
	
/* bytes in message      */
{
	unsigned char uchLRC = 0 ;	/* LRC char initialized   */
	while (usDataLen--)		/* pass through message  */ 
		uchLRC += *auchMsg++ ;	/* buffer add buffer byte*/ 
	
/* without carry         */
	return ((unsigned char)(-((char_uchLRC))) ;
	
/* return twos complemen */
}

steve

-----Original Message-----
From: kevin lyda [mailto:kevin at suberic.net]
Sent: Tuesday, November 14, 2000 5:09 PM
To: irish linux users group
Subject: [ILUG] just out of curiousity...


anyone here know what the algorithm for an LRC (longitudinal redundancy
check)?  google isn't helping me out here.  i've got a list of about
1000 pages letting me know it's a error detection algorithm over an
entire message block.  not one of them seems interesting in explaining
*what* algorithm.

and it's kind of linux related - it will be running under linux and i'll
post a c version of the algorithm if people are *really* curious.

kevin

-- 
Irish Linux Users' Group: ilug at linux.ie
http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
List maintainer: listmaster at linux.ie




More information about the ILUG mailing list