ProtectionCodec<Logical extends Logic, Protected extends Logic> constructor

ProtectionCodec<Logical extends Logic, Protected extends Logic>({
  1. required String identity,
  2. required int logicalWidth,
  3. required int protectedWidth,
  4. required ProtectionEncoder<Logical, Protected> encode,
  5. required ProtectionDecoder<Logical, Protected> decode,
  6. ProtectionStatusDecoder<Protected>? decodeStatus,
})

Creates a reusable protection capability.

Implementation

ProtectionCodec({
  required this.identity,
  required this.logicalWidth,
  required this.protectedWidth,
  required this.encode,
  required this.decode,
  this.decodeStatus,
}) {
  if (logicalWidth < 1 || protectedWidth < 1) {
    throw RohdHclException('Protection codec widths must be positive.');
  }
}