mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-13 09:07:27 -05:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user