Method: OpenC3::Crc32#initialize

Defined in:
lib/openc3/utilities/crc.rb

#initialize(poly = DEFAULT_POLY, seed = DEFAULT_SEED, xor = true, reflect = true) ⇒ Crc32

Creates a 32 bit CRC algorithm instance. By default it is initialzed to use the CRC-32 algorithm.

Parameters:

  • poly (Integer) (defaults to: DEFAULT_POLY)

    Polynomial to use when calculating the CRC

  • seed (Integer) (defaults to: DEFAULT_SEED)

    Seed value to start the calculation

  • xor (Boolean) (defaults to: true)

    Whether to XOR the CRC result with 0xFFFF

  • reflect (Boolean) (defaults to: true)

    Whether to bit reverse each byte of data before calculating the CRC



247
248
249
250
251
252
# File 'lib/openc3/utilities/crc.rb', line 247

def initialize(poly = DEFAULT_POLY,
               seed = DEFAULT_SEED,
               xor = true,
               reflect = true)
  super(poly, seed, xor, reflect)
end