repetition.h

ECC repetition code.

ECC_REPETITION_COUNT

Number of repetitions of a byte.

1
(3)
DECODER_MAJORITY

Calculates the majority according to the number of repetitions.

1
((ECC_REPETITION_COUNT - 1) / 2)
void repetition_encode(unsigned int _dec_msg_len, unsigned char * _msg_dec, unsigned char * _msg_enc)

encode block of data with repetition.h::ECC_REPETITION_COUNT number of repetitions

Parameters

_dec_msg_len:decoded message length (number of bytes)
_msg_dec:decoded message [size: 1 x _dec_msg_len]
_msg_enc:encoded message [size: 1 x ECC_REPETITION_COUNT*_dec_msg_len]

void repetition_decode(unsigned int _dec_msg_len, unsigned char * _msg_enc, unsigned char * _msg_dec)

decode block of data with repetition.h::ECC_REPETITION_COUNT repetitions

Parameters

_dec_msg_len:decoded message length (number of bytes)
_msg_enc:encoded message [size: 1 x ECC_REPETITION_COUNT*_dec_msg_len]
_msg_dec:decoded message [size: 1 x _dec_msg_len]