Added CRC checks to 2,3 and 4 block PDU messages. Enforcing message validation via the message processor. Updated the P25 Activity Summary to show frequencies in megahertz and to add site aliasing to the summary text.

This commit is contained in:
dennis.sheirer
2014-12-17 02:10:43 +00:00
parent e7b446b3b5
commit 63eaef664b
25 changed files with 467 additions and 75 deletions

View File

@@ -143,7 +143,18 @@ public class P25Message extends Message
@Override
public boolean isValid()
{
return true;
if( mCRC != null )
{
for( CRC crc: mCRC )
{
if( crc == CRC.FAILED_CRC )
{
return false;
}
}
}
return true;
}
/**

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.tsbk.osp.control.IdentifierUpdate;
@@ -45,6 +46,10 @@ public abstract class UnitToUnitChannelGrantExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU2( mMessage );
}
public String getMessage()

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -37,6 +38,10 @@ public class AdjacentStatusBroadcastExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -24,6 +25,10 @@ public class CallAlertExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -24,6 +25,10 @@ public class GroupAffiliationQueryExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -34,6 +35,10 @@ public class GroupAffiliationResponseExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU2( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -26,6 +27,10 @@ public class MessageUpdateExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -36,6 +37,10 @@ public class NetworkStatusBroadcastExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -38,6 +39,10 @@ public class ProtectionParameterBroadcast extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU2( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -37,6 +38,10 @@ public class RFSSStatusBroadcastExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -69,18 +70,34 @@ public class RoamingAddressUpdateExtended extends PDUMessage
if( mMessage.size() == P25MessageFramer.PDU2_BEGIN )
{
mFormat = Format.FORMAT_1;
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
else if( mMessage.size() == P25MessageFramer.PDU3_BEGIN )
{
mFormat = Format.FORMAT_2;
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU2( mMessage );
}
else if( mMessage.size() == P25MessageFramer.PDU3_DECODED_END )
{
mFormat = Format.FORMAT_3;
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU3( mMessage );
}
else
{
mFormat = Format.FORMAT_1;
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
}

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -24,6 +25,10 @@ public class StatusQueryExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -26,6 +27,10 @@ public class StatusUpdateExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.control;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -28,6 +29,10 @@ public class UnitRegistrationResponseExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU2( mMessage );
}
@Override

View File

@@ -2,6 +2,7 @@ package decode.p25.message.pdu.osp.data;
import java.util.Date;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -42,6 +43,10 @@ public class GroupDataChannelGrantExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.voice;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -40,6 +41,10 @@ public class GroupVoiceChannelGrantExplicit extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -2,6 +2,7 @@ package decode.p25.message.pdu.osp.voice;
import java.util.Date;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -42,6 +43,10 @@ public class TelephoneInterconnectChannelGrantExplicit extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.voice;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -30,6 +31,10 @@ public class UnitToUnitAnswerRequestExplicit extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU1( mMessage );
}
@Override

View File

@@ -1,5 +1,6 @@
package decode.p25.message.pdu.osp.voice;
import crc.CRCP25;
import alias.AliasList;
import bits.BitSetBuffer;
import decode.p25.message.pdu.PDUMessage;
@@ -46,6 +47,10 @@ public class UnitToUnitVoiceChannelGrantUpdateExtended extends PDUMessage
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
/* Header block is already error detected/corrected - perform error
* detection correction on the intermediate and final data blocks */
mCRC[ 1 ] = CRCP25.correctPDU2( mMessage );
}
@Override