Resolved issue in CRC-CCITT correction method. Added CRC error detection to PDU header block in the message framer, so that we're sure that the number of follow blocks is correct while we're capturing symbols/bits. Set the TDU message error correction to Pass since the CRC is calculated within the message framer and no errant NIDs (TDU) are passed.

This commit is contained in:
dennis.sheirer
2014-12-15 02:01:15 +00:00
parent 9542a74968
commit 2635b58dfc
6 changed files with 30 additions and 15 deletions

View File

@@ -105,7 +105,7 @@ public class CRCP25
if( errorLocation >= 0 )
{
message.flip( errorLocation );
message.flip( errorLocation + NID_MESSAGE_START );
return CRC.CORRECTED;
}
@@ -144,7 +144,7 @@ public class CRCP25
if( errorLocation >= 0 )
{
message.flip( errorLocation );
message.flip( errorLocation + messageStart );
return CRC.CORRECTED;
}
@@ -212,7 +212,7 @@ public class CRCP25
public static void main( String[] args )
{
String raw = "0010011000000111100010111111001111100001111010011110000100010010000001011001000000000000000000000000000000000000000000000000000000000000000000001101000111000011";
String raw = "0010011000000111101010111111001111100001111010011110000100010010000010011001000000101101110000000000000000000000000000000000000000000000000000000001011011001100";
BitSetBuffer message = BitSetBuffer.load( raw );
@@ -220,6 +220,8 @@ public class CRCP25
CRC results = correctCCITT80( message, 64, 144 );
mLog.debug( "COR:" + message.toString() );
mLog.debug( "Results: " + results.getDisplayText() );
}
}