CrcConfiguration class

Configures CRC polynomial, initialization, reflection, and finalization.

polynomial includes its leading coefficient. reflectInput controls the traversal of each input beat. reflectOutput describes the published CRC orientation relative to the conventional non-reflected polynomial.

Annotations

Constructors

CrcConfiguration({required BinaryPolynomial polynomial, BigInt? initialValue, bool reflectInput = false, bool reflectOutput = false, BigInt? finalXor, BigInt? check, BigInt? residue})
Creates a custom CRC configuration.
CrcConfiguration.standard(CrcStandard standard)
Creates a configuration from a cataloged standard.
factory

Properties

check → BigInt?
Optional catalog check value for the ASCII bytes "123456789".
final
configurationSignature → String
A deterministic signature suitable for generated definition names.
no setter
finalXor → BigInt
Final XOR applied after output orientation.
final
hashCode → int
The hash code for this object.
no setteroverride
initialValue → BigInt
Initial register state.
final
mask → BigInt
A mask covering the CRC register.
no setter
polynomial → BinaryPolynomial
The full CRC characteristic polynomial.
final
reflectInput → bool
Whether each input beat is consumed least-significant bit first.
final
reflectOutput → bool
Whether the published CRC is reflected.
final
residue → BigInt?
Optional catalog residue.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width → int
Width of the CRC register.
no setter

Methods

advance(BigInt state, BigInt beat, {required int beatWidth}) → BigInt
Advances state with one packed input beat.
advanceBit(BigInt state, {required bool bit}) → BigInt
Advances state with one bit in serialized arrival order.
checksumBytes(Iterable<int> bytes) → BigInt
Computes the CRC of conventional unsigned bytes.
finalize(BigInt state) → BigInt
Finalizes an internal state into the published checksum.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remainderBytes(Iterable<int> bytes) → BigInt
Computes the internal unfinalized remainder of unsigned bytes.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override