HammingCode
HammingCode(
block_size: int = 16, debug: Debug = Debug.DEPLOY
)
EDAC System to deal with data that needs hamming code
Args
- debug (Debug, optional) : Debug level. Defaults to False.
Methods:
._decode
._decode(
data: int
)
Decode the given data
Args
- data (int) : the given data
- check (int) : parity bytes
Returns
- tuple : the results of the decode see more
._encode
._encode(
data: int
)
Encode the given data
Args
- data (int) : the data in integer
Returns
- int : the encoded data in integer
._create_table
._create_table(
data: int
)
Create the hamming table according to the given block size
Args
- data (int) : data
Returns
- list : hamming table