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

@@ -59,15 +59,6 @@ public class P25MessageProcessor implements Listener<Message>
mIdentifierMap.put( identifierUpdate.getIdentifier(), identifierUpdate );
}
// if( message instanceof TSBKMessage )
// {
// mLog.debug( message.getMessage() );
// }
// else
// {
// mLog.debug( message.getMessage() + "\t" + message.getBinaryMessage() );
// }
mBroadcaster.broadcast( message );
}

View File

@@ -2,6 +2,7 @@ package decode.p25.message.pdu;
import alias.AliasList;
import bits.BitSetBuffer;
import crc.CRC;
import decode.p25.message.P25Message;
import decode.p25.reference.DataUnitID;
import decode.p25.reference.Opcode;
@@ -28,6 +29,10 @@ public class PDUMessage extends P25Message
public PDUMessage( BitSetBuffer message, DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Setup a CRC array to hold the header CRC and the multi-block CRC */
mCRC = new CRC[ 2 ];
mCRC[ 0 ] = CRC.PASSED;
}
protected String getMessageStub()

View File

@@ -2,6 +2,7 @@ package decode.p25.message.tdu;
import alias.AliasList;
import bits.BitSetBuffer;
import crc.CRC;
import decode.p25.message.P25Message;
import decode.p25.reference.DataUnitID;
@@ -11,5 +12,10 @@ public class TDUMessage extends P25Message
AliasList aliasList )
{
super( message, duid, aliasList );
/* NID CRC is checked in the message framer, thus a constructed message
* means it passed the CRC */
mCRC = new CRC[ 1 ];
mCRC[ 0 ] = CRC.PASSED;
}
}

View File

@@ -17,7 +17,7 @@ public class MotorolaTSBKMessage extends TSBKMessage
{
StringBuilder sb = new StringBuilder();
sb.append( "SYS:" );
sb.append( "NAC:" );
sb.append( getNAC() ); /* NAC is the system id for TSBK messages */
sb.append( " " );
sb.append( getDUID().getLabel() );