Beispiel #1
0
 private UInt16[] GenerateTable(IPolynomial16 polynomial)
 {
     UInt16[] csTable = new UInt16[256];
     for (UInt16 i = 0; i <= 255; i++)
     {
         csTable[i] = GetCRC(i, polynomial.Poly);
     }
     return(csTable);
 }
Beispiel #2
0
        static Polynomials()
        {
            CRC8          = new Crc8Usual();
            CRC8_CDMA2000 = new Crc8CDMA2000();
            CRC8_DARC     = new Crc8DARC();
            CRC8_DVBS2    = new Crc8DVBS2();
            CRC8_EBU      = new Crc8EBU();
            CRC8_ICODE    = new Crc8ICODE();
            CRC8_ITU      = new Crc8ITU();
            CRC8_MAXIM    = new Crc8MAXIM();
            CRC8_ROHC     = new Crc8ROHC();
            CRC8_WCDMA    = new Crc8WCDMA();

            CRC16_CCITT     = new Crc16CCITT();
            CRC16_ARC       = new Crc16ARC();
            CRC16_AUG_CCITT = new Crc16AugCCITT();
            CRC16_BUYPASS   = new Crc16BUYPASS();
            CRC16_CDMA2000  = new Crc16CDMA2000();
            CRC16_DDS110    = new Crc16DDS110();
            CRC16_DECT_R    = new Crc16DECT_R();
            CRC16_DECT_X    = new Crc16DECT_X();
            CRC16_DNP       = new Crc16DNP();
            CRC16_EN13757   = new Crc16EN13757();
            CRC16_GENIBUS   = new Crc16GENIBUS();
            CRC16_MAXIM     = new Crc16Maxim();
            CRC16_MCRF4XX   = new Crc16MCRF4XX();
            CRC16_RIELLO    = new Crc16RIELLO();
            CRC16_T10DIF    = new Crc16T10DIF();
            CRC16_TELEDISK  = new Crc16Teledisk();
            CRC16_TMS37157  = new Crc16TMS37157();
            CRC16_USB       = new Crc16USB();
            CRC16_A         = new Crc16A();
            CRC16_KERMIT    = new Crc16KERMIT();
            CRC16_MODBUS    = new Crc16Modbus();
            CRC16_X25       = new Crc16X25();
            CRC16_XMODEM    = new Crc16Xmodem();
        }
Beispiel #3
0
 public CrcCalc16(IPolynomial16 polynomial)
 {
     poly  = polynomial;
     table = GenerateTable(poly);
 }