Method: OpenC3::Crc8#initialize

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

#initialize(poly = DEFAULT_POLY, seed = DEFAULT_SEED, xor = false, reflect = false) ⇒ Crc8

Creates a 8 bit CRC algorithm instance. By default it is initialzed to use the CRC-8-DVB-S2 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: false)

    Whether to XOR the CRC result with 0xFF

  • reflect (Boolean) (defaults to: false)

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



232
233
234
235
236
237
# File 'lib/openc3/utilities/crc.rb', line 232

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