public class CRC
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
int |
checkMessageCRC(int[] messageDecoded)
Checks if a message was received correctly.
|
static int |
countOccurrences(java.lang.String input,
char searchedChar)
Returns the number of occurrences of searchedChar in input.
|
java.lang.String |
parityBit(java.lang.String bitOfText)
Calls xorArray to get a remainder bit sequence depending on the generator polynomal.
|
public int checkMessageCRC(int[] messageDecoded)
messageDecoded
- bit sequence containing the message to be checkedpublic java.lang.String parityBit(java.lang.String bitOfText)
bitOfText
- the message after which the error detection bit sequence is generatedpublic static int countOccurrences(java.lang.String input, char searchedChar)
input
- searchedChar
-