![Timewave DSP-D300 Manual Download Page 99](http://html1.mh-extra.com/html/timewave/dsp-d300/dsp-d300_manual_1117522099.webp)
99
Note the presets on bits 6 and 7 on byte 0. This is the EIF key combined with the CRC.
The CRC is symmetric so that the CRC for the four bytes equals 0 when the CRC is in
the packet.
// Get the CRC polynomial for the entry.
// See: http://docs.afws.net/supportsite/iflows/enhanced_iflows_format.htm
BYTE
jp_getcrc(
BYTE
* eifmsg)
{
BYTE
rem;
BYTE
curbyte;
int
bytecnt, bitcnt;
rem = 0;
for
( bytecnt = 0; bytecnt < 4; ++bytecnt )
{
curbyte
=
eifmsg[bytecnt];
for
(bitcnt = 0; bitcnt < 8; ++bitcnt)
{
rem >>= 1;
if
( ( curbyte & 0x01 ) == 0x01 )
rem
|=
0x80;
curbyte
>>=
1;
if
( ( rem & 0x02 ) == 0x02 )
rem
^=
0x9a;
// XOR 10011010
}
}
return
rem;
}
Note: This is from the NWS web site. Please visit the website for a more complete
explanation.
Summary of Contents for DSP-D300
Page 2: ......
Page 6: ...Table of Figures 106 Glossary 108 Index 110 6...
Page 33: ......
Page 55: ......
Page 59: ......
Page 71: ......
Page 77: ...4 Flip the box over Remove the two circuit board screws These may have washers Board Screws 77...
Page 87: ......
Page 89: ......
Page 97: ......
Page 103: ......
Page 105: ......
Page 107: ......