repetition.h File Reference

ECC repetition code. More...

Detailed Description

ECC repetition code.

Author
Joseph Gaeddert
Peter Kietzmann peter.nosp@m..kie.nosp@m.tzman.nosp@m.n@ha.nosp@m.w.ham.nosp@m.burg.nosp@m..de

Definition in file repetition.h.

Go to the source code of this file.

Macros

#define ECC_REPETITION_COUNT   (3)
 Number of repetitions of a byte.
 
#define DECODER_MAJORITY   ((ECC_REPETITION_COUNT - 1) / 2)
 Calculates the majority according to the number of repetitions.
 

Functions

void repetition_encode (unsigned int _dec_msg_len, unsigned char *_msg_dec, unsigned char *_msg_enc)
 encode block of data with ECC_REPETITION_COUNT number of repetitions More...
 
void repetition_decode (unsigned int _dec_msg_len, unsigned char *_msg_enc, unsigned char *_msg_dec)
 decode block of data with ECC_REPETITION_COUNT repetitions More...
 

Function Documentation

◆ repetition_decode()

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

decode block of data with ECC_REPETITION_COUNT repetitions

Parameters
[in]_dec_msg_lendecoded message length (number of bytes)
[in]_msg_encencoded message [size: 1 x ECC_REPETITION_COUNT*_dec_msg_len]
[out]_msg_decdecoded message [size: 1 x _dec_msg_len]

◆ repetition_encode()

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

encode block of data with ECC_REPETITION_COUNT number of repetitions

Parameters
[in]_dec_msg_lendecoded message length (number of bytes)
[in]_msg_decdecoded message [size: 1 x _dec_msg_len]
[out]_msg_encencoded message [size: 1 x ECC_REPETITION_COUNT*_dec_msg_len]