mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -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:
@@ -24,6 +24,10 @@ import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import decode.p25.P25ActivitySummary;
|
||||
import alias.esn.Esn;
|
||||
import alias.fleetsync.FleetsyncID;
|
||||
import alias.fleetsync.StatusID;
|
||||
@@ -49,6 +53,8 @@ import alias.uniqueID.UniqueID;
|
||||
@XmlRootElement( name = "alias_list" )
|
||||
public class AliasList implements Comparable<AliasList>
|
||||
{
|
||||
private final static Logger mLog = LoggerFactory.getLogger( AliasList.class );
|
||||
|
||||
private String mName;
|
||||
private ArrayList<Group> mGroups = new ArrayList<Group>();
|
||||
|
||||
|
||||
@@ -59,6 +59,9 @@ public class CRCP25
|
||||
/**
|
||||
* CRC-CCITT 16-bit checksums for a message length of 80 bits plus 16
|
||||
* additional checksums representing CRC checksum bit errors
|
||||
*
|
||||
* Generated by:
|
||||
* CRCUtil.generate( 80, 16, 0x11021l, 0xFFFFl, true );
|
||||
*/
|
||||
public static final int[] CCITT_80_CHECKSUMS = new int[]
|
||||
{
|
||||
@@ -74,6 +77,150 @@ public class CRCP25
|
||||
0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200,
|
||||
0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000
|
||||
};
|
||||
|
||||
/**
|
||||
* CRC-32 checksums for PDU1 ( HEADER + 1 Block ) messages, generated by:
|
||||
*
|
||||
* CRCUtil.generate( 64, 32, 0x104C11DB7l, 0xFFFFFFFFl, true );
|
||||
*/
|
||||
public static final long[] PDU1_CHECKSUMS = new long[]
|
||||
{
|
||||
0x86FFAACCl, 0x411F5BBDl, 0xA08FADDEl, 0x52275834l, 0x2B7322C1l,
|
||||
0x95B99160l, 0x48BC466Bl, 0xA45E2335l, 0xD22F119Al, 0x6B770616l,
|
||||
0x37DB0DD0l, 0x198D0833l, 0x8CC68419l, 0xC663420Cl, 0x61512FDDl,
|
||||
0xB0A897EEl, 0x5A34C52Cl, 0x2F7AEC4Dl, 0x97BD7626l, 0x49BE35C8l,
|
||||
0x26BF943Fl, 0x935FCA1Fl, 0xC9AFE50Fl, 0xE4D7F287l, 0xF26BF943l,
|
||||
0xF935FCA1l, 0xFC9AFE50l, 0x7C2DF1F3l, 0xBE16F8F9l, 0xDF0B7C7Cl,
|
||||
0x6DE530E5l, 0xB6F29872l, 0x5919C2E2l, 0x2EEC6FAAl, 0x1516B90El,
|
||||
0x08EBD25Cl, 0x061567F5l, 0x830AB3FAl, 0x43E5D726l, 0x23926548l,
|
||||
0x13A9BC7Fl, 0x89D4DE3Fl, 0xC4EA6F1Fl, 0xE275378Fl, 0xF13A9BC7l,
|
||||
0xF89D4DE3l, 0xFC4EA6F1l, 0xFE275378l, 0x7D732767l, 0xBEB993B3l,
|
||||
0xDF5CC9D9l, 0xEFAE64ECl, 0x75B7BCADl, 0xBADBDE56l, 0x5F0D61F0l,
|
||||
0x2DE63E23l, 0x96F31F11l, 0xCB798F88l, 0x67DC491Fl, 0xB3EE248Fl,
|
||||
0xD9F71247l, 0xECFB8923l, 0xF67DC491l, 0xFB3EE248l, 0x00000001l,
|
||||
0x00000002l, 0x00000004l, 0x00000008l, 0x00000010l, 0x00000020l,
|
||||
0x00000040l, 0x00000080l, 0x00000100l, 0x00000200l, 0x00000400l,
|
||||
0x00000800l, 0x00001000l, 0x00002000l, 0x00004000l, 0x00008000l,
|
||||
0x00010000l, 0x00020000l, 0x00040000l, 0x00080000l, 0x00100000l,
|
||||
0x00200000l, 0x00400000l, 0x00800000l, 0x01000000l, 0x02000000l,
|
||||
0x04000000l, 0x08000000l, 0x10000000l, 0x20000000l, 0x40000000l,
|
||||
0x80000000l
|
||||
};
|
||||
|
||||
/**
|
||||
* CRC-32 checksums for PDU2 ( HEADER + 2 Blocks ) messages, generated by:
|
||||
*
|
||||
* CRCUtil.generate( 160, 32, 0x104C11DB7l, 0xFFFFFFFFl, true );
|
||||
*/
|
||||
public static final long[] PDU2_CHECKSUMS = new long[]
|
||||
{
|
||||
0x9D231959l, 0xCE918CACl, 0x6528488Dl, 0xB2942446l, 0x5B2A9CF8l,
|
||||
0x2FF5C0A7l, 0x97FAE053l, 0xCBFD7029l, 0xE5FEB814l, 0x709FD2D1l,
|
||||
0xB84FE968l, 0x5E477A6Fl, 0xAF23BD37l, 0xD791DE9Bl, 0xEBC8EF4Dl,
|
||||
0xF5E477A6l, 0x7892B508l, 0x3E29D45Fl, 0x9F14EA2Fl, 0xCF8A7517l,
|
||||
0xE7C53A8Bl, 0xF3E29D45l, 0xF9F14EA2l, 0x7E98298Al, 0x3D2C9A1El,
|
||||
0x1CF6C3D4l, 0x0C1BEF31l, 0x860DF798l, 0x41667517l, 0xA0B33A8Bl,
|
||||
0xD0599D45l, 0xE82CCEA2l, 0x7676E98Al, 0x395BFA1El, 0x1ECD73D4l,
|
||||
0x0D063731l, 0x86831B98l, 0x41210317l, 0xA090818Bl, 0xD04840C5l,
|
||||
0xE8242062l, 0x76729EEAl, 0x3959C1AEl, 0x1ECC6E0Cl, 0x0D06B9DDl,
|
||||
0x86835CEEl, 0x412120ACl, 0x22F01E8Dl, 0x91780F46l, 0x4ADC8978l,
|
||||
0x270ECA67l, 0x93876533l, 0xC9C3B299l, 0xE4E1D94Cl, 0x7010627Dl,
|
||||
0xB808313El, 0x5E649644l, 0x2D52C5F9l, 0x96A962FCl, 0x49343FA5l,
|
||||
0xA49A1FD2l, 0x502D8132l, 0x2A764E42l, 0x175BA9FAl, 0x09CD5A26l,
|
||||
0x068623C8l, 0x01239F3Fl, 0x8091CF9Fl, 0xC048E7CFl, 0xE02473E7l,
|
||||
0xF01239F3l, 0xF8091CF9l, 0xFC048E7Cl, 0x7C62C9E5l, 0xBE3164F2l,
|
||||
0x5D783CA2l, 0x2CDC908Al, 0x140EC69El, 0x0867ED94l, 0x06537811l,
|
||||
0x8329BC08l, 0x43F450DFl, 0xA1FA286Fl, 0xD0FD1437l, 0xE87E8A1Bl,
|
||||
0xF43F450Dl, 0xFA1FA286l, 0x7F6F5F98l, 0x3DD72117l, 0x9EEB908Bl,
|
||||
0xCF75C845l, 0xE7BAE422l, 0x71BDFCCAl, 0x3ABE70BEl, 0x1F3FB684l,
|
||||
0x0DFF5599l, 0x86FFAACCl, 0x411F5BBDl, 0xA08FADDEl, 0x52275834l,
|
||||
0x2B7322C1l, 0x95B99160l, 0x48BC466Bl, 0xA45E2335l, 0xD22F119Al,
|
||||
0x6B770616l, 0x37DB0DD0l, 0x198D0833l, 0x8CC68419l, 0xC663420Cl,
|
||||
0x61512FDDl, 0xB0A897EEl, 0x5A34C52Cl, 0x2F7AEC4Dl, 0x97BD7626l,
|
||||
0x49BE35C8l, 0x26BF943Fl, 0x935FCA1Fl, 0xC9AFE50Fl, 0xE4D7F287l,
|
||||
0xF26BF943l, 0xF935FCA1l, 0xFC9AFE50l, 0x7C2DF1F3l, 0xBE16F8F9l,
|
||||
0xDF0B7C7Cl, 0x6DE530E5l, 0xB6F29872l, 0x5919C2E2l, 0x2EEC6FAAl,
|
||||
0x1516B90El, 0x08EBD25Cl, 0x061567F5l, 0x830AB3FAl, 0x43E5D726l,
|
||||
0x23926548l, 0x13A9BC7Fl, 0x89D4DE3Fl, 0xC4EA6F1Fl, 0xE275378Fl,
|
||||
0xF13A9BC7l, 0xF89D4DE3l, 0xFC4EA6F1l, 0xFE275378l, 0x7D732767l,
|
||||
0xBEB993B3l, 0xDF5CC9D9l, 0xEFAE64ECl, 0x75B7BCADl, 0xBADBDE56l,
|
||||
0x5F0D61F0l, 0x2DE63E23l, 0x96F31F11l, 0xCB798F88l, 0x67DC491Fl,
|
||||
0xB3EE248Fl, 0xD9F71247l, 0xECFB8923l, 0xF67DC491l, 0xFB3EE248l,
|
||||
0x00000001l, 0x00000002l, 0x00000004l, 0x00000008l, 0x00000010l,
|
||||
0x00000020l, 0x00000040l, 0x00000080l, 0x00000100l, 0x00000200l,
|
||||
0x00000400l, 0x00000800l, 0x00001000l, 0x00002000l, 0x00004000l,
|
||||
0x00008000l, 0x00010000l, 0x00020000l, 0x00040000l, 0x00080000l,
|
||||
0x00100000l, 0x00200000l, 0x00400000l, 0x00800000l, 0x01000000l,
|
||||
0x02000000l, 0x04000000l, 0x08000000l, 0x10000000l, 0x20000000l,
|
||||
0x40000000l, 0x80000000l
|
||||
};
|
||||
|
||||
/**
|
||||
* CRC-32 checksums for PDU3 ( HEADER + 3 Blocks ) messages, generated by:
|
||||
*
|
||||
* CRCUtil.generate( 256, 32, 0x104C11DB7l, 0xFFFFFFFFl, true );
|
||||
*/
|
||||
public static final long[] PDU3_CHECKSUMS = new long[]
|
||||
{
|
||||
0xAA5FA470l, 0x574F5CE3l, 0xABA7AE71l, 0xD5D3D738l, 0x68896547l,
|
||||
0xB444B2A3l, 0xDA225951l, 0xED112CA8l, 0x74E8188Fl, 0xBA740C47l,
|
||||
0xDD3A0623l, 0xEE9D0311l, 0xF74E8188l, 0x79C7CE1Fl, 0xBCE3E70Fl,
|
||||
0xDE71F387l, 0xEF38F9C3l, 0xF79C7CE1l, 0xFBCE3E70l, 0x7F8791E3l,
|
||||
0xBFC3C8F1l, 0xDFE1E478l, 0x6D907CE7l, 0xB6C83E73l, 0xDB641F39l,
|
||||
0xEDB20F9Cl, 0x74B98915l, 0xBA5CC48Al, 0x5F4EEC9El, 0x2DC7F894l,
|
||||
0x14837291l, 0x8A41B948l, 0x4740527Fl, 0xA3A0293Fl, 0xD1D0149Fl,
|
||||
0xE8E80A4Fl, 0xF4740527l, 0xFA3A0293l, 0xFD1D0149l, 0xFE8E80A4l,
|
||||
0x7D27CE89l, 0xBE93E744l, 0x5D297D79l, 0xAE94BEBCl, 0x552AD185l,
|
||||
0xAA9568C2l, 0x572A3ABAl, 0x29F59386l, 0x169A4718l, 0x092DAD57l,
|
||||
0x8496D6ABl, 0xC24B6B55l, 0xE125B5AAl, 0x72F2540El, 0x3B19A4DCl,
|
||||
0x1FEC5CB5l, 0x8FF62E5Al, 0x459B99F6l, 0x20AD4220l, 0x12362FCBl,
|
||||
0x891B17E5l, 0xC48D8BF2l, 0x60264B22l, 0x3273AB4Al, 0x1B595B7El,
|
||||
0x0FCC2364l, 0x05869F69l, 0x82C34FB4l, 0x43012901l, 0xA1809480l,
|
||||
0x52A0C49Bl, 0xA950624Dl, 0xD4A83126l, 0x68349648l, 0x367AC5FFl,
|
||||
0x9B3D62FFl, 0xCD9EB17Fl, 0xE6CF58BFl, 0xF367AC5Fl, 0xF9B3D62Fl,
|
||||
0xFCD9EB17l, 0xFE6CF58Bl, 0xFF367AC5l, 0xFF9B3D62l, 0x7DAD106Al,
|
||||
0x3CB606EEl, 0x1C3B8DACl, 0x0C7D480Dl, 0x863EA406l, 0x417FDCD8l,
|
||||
0x22DF60B7l, 0x916FB05Bl, 0xC8B7D82Dl, 0xE45BEC16l, 0x704D78D0l,
|
||||
0x3A4632B3l, 0x9D231959l, 0xCE918CACl, 0x6528488Dl, 0xB2942446l,
|
||||
0x5B2A9CF8l, 0x2FF5C0A7l, 0x97FAE053l, 0xCBFD7029l, 0xE5FEB814l,
|
||||
0x709FD2D1l, 0xB84FE968l, 0x5E477A6Fl, 0xAF23BD37l, 0xD791DE9Bl,
|
||||
0xEBC8EF4Dl, 0xF5E477A6l, 0x7892B508l, 0x3E29D45Fl, 0x9F14EA2Fl,
|
||||
0xCF8A7517l, 0xE7C53A8Bl, 0xF3E29D45l, 0xF9F14EA2l, 0x7E98298Al,
|
||||
0x3D2C9A1El, 0x1CF6C3D4l, 0x0C1BEF31l, 0x860DF798l, 0x41667517l,
|
||||
0xA0B33A8Bl, 0xD0599D45l, 0xE82CCEA2l, 0x7676E98Al, 0x395BFA1El,
|
||||
0x1ECD73D4l, 0x0D063731l, 0x86831B98l, 0x41210317l, 0xA090818Bl,
|
||||
0xD04840C5l, 0xE8242062l, 0x76729EEAl, 0x3959C1AEl, 0x1ECC6E0Cl,
|
||||
0x0D06B9DDl, 0x86835CEEl, 0x412120ACl, 0x22F01E8Dl, 0x91780F46l,
|
||||
0x4ADC8978l, 0x270ECA67l, 0x93876533l, 0xC9C3B299l, 0xE4E1D94Cl,
|
||||
0x7010627Dl, 0xB808313El, 0x5E649644l, 0x2D52C5F9l, 0x96A962FCl,
|
||||
0x49343FA5l, 0xA49A1FD2l, 0x502D8132l, 0x2A764E42l, 0x175BA9FAl,
|
||||
0x09CD5A26l, 0x068623C8l, 0x01239F3Fl, 0x8091CF9Fl, 0xC048E7CFl,
|
||||
0xE02473E7l, 0xF01239F3l, 0xF8091CF9l, 0xFC048E7Cl, 0x7C62C9E5l,
|
||||
0xBE3164F2l, 0x5D783CA2l, 0x2CDC908Al, 0x140EC69El, 0x0867ED94l,
|
||||
0x06537811l, 0x8329BC08l, 0x43F450DFl, 0xA1FA286Fl, 0xD0FD1437l,
|
||||
0xE87E8A1Bl, 0xF43F450Dl, 0xFA1FA286l, 0x7F6F5F98l, 0x3DD72117l,
|
||||
0x9EEB908Bl, 0xCF75C845l, 0xE7BAE422l, 0x71BDFCCAl, 0x3ABE70BEl,
|
||||
0x1F3FB684l, 0x0DFF5599l, 0x86FFAACCl, 0x411F5BBDl, 0xA08FADDEl,
|
||||
0x52275834l, 0x2B7322C1l, 0x95B99160l, 0x48BC466Bl, 0xA45E2335l,
|
||||
0xD22F119Al, 0x6B770616l, 0x37DB0DD0l, 0x198D0833l, 0x8CC68419l,
|
||||
0xC663420Cl, 0x61512FDDl, 0xB0A897EEl, 0x5A34C52Cl, 0x2F7AEC4Dl,
|
||||
0x97BD7626l, 0x49BE35C8l, 0x26BF943Fl, 0x935FCA1Fl, 0xC9AFE50Fl,
|
||||
0xE4D7F287l, 0xF26BF943l, 0xF935FCA1l, 0xFC9AFE50l, 0x7C2DF1F3l,
|
||||
0xBE16F8F9l, 0xDF0B7C7Cl, 0x6DE530E5l, 0xB6F29872l, 0x5919C2E2l,
|
||||
0x2EEC6FAAl, 0x1516B90El, 0x08EBD25Cl, 0x061567F5l, 0x830AB3FAl,
|
||||
0x43E5D726l, 0x23926548l, 0x13A9BC7Fl, 0x89D4DE3Fl, 0xC4EA6F1Fl,
|
||||
0xE275378Fl, 0xF13A9BC7l, 0xF89D4DE3l, 0xFC4EA6F1l, 0xFE275378l,
|
||||
0x7D732767l, 0xBEB993B3l, 0xDF5CC9D9l, 0xEFAE64ECl, 0x75B7BCADl,
|
||||
0xBADBDE56l, 0x5F0D61F0l, 0x2DE63E23l, 0x96F31F11l, 0xCB798F88l,
|
||||
0x67DC491Fl, 0xB3EE248Fl, 0xD9F71247l, 0xECFB8923l, 0xF67DC491l,
|
||||
0xFB3EE248l, 0x00000001l, 0x00000002l, 0x00000004l, 0x00000008l,
|
||||
0x00000010l, 0x00000020l, 0x00000040l, 0x00000080l, 0x00000100l,
|
||||
0x00000200l, 0x00000400l, 0x00000800l, 0x00001000l, 0x00002000l,
|
||||
0x00004000l, 0x00008000l, 0x00010000l, 0x00020000l, 0x00040000l,
|
||||
0x00080000l, 0x00100000l, 0x00200000l, 0x00400000l, 0x00800000l,
|
||||
0x01000000l, 0x02000000l, 0x04000000l, 0x08000000l, 0x10000000l,
|
||||
0x20000000l, 0x40000000l, 0x80000000l
|
||||
};
|
||||
|
||||
/**
|
||||
* Performs CRC check and corrects single-bit errors against the message.
|
||||
@@ -115,6 +262,72 @@ public class CRCP25
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs error detection and single-bit error correction against the
|
||||
* data blocks of a PDU1 message.
|
||||
*/
|
||||
public static CRC correctPDU1( BitSetBuffer message )
|
||||
{
|
||||
return correctPDU( message, PDU1_CHECKSUMS, 224 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs error detection and single-bit error correction against the
|
||||
* data blocks of a PDU2 message.
|
||||
*/
|
||||
public static CRC correctPDU2( BitSetBuffer message )
|
||||
{
|
||||
return correctPDU( message, PDU2_CHECKSUMS, 320 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs error detection and single-bit error correction against the
|
||||
* data blocks of a PDU3 message.
|
||||
*/
|
||||
public static CRC correctPDU3( BitSetBuffer message )
|
||||
{
|
||||
return correctPDU( message, PDU3_CHECKSUMS, 416 );
|
||||
}
|
||||
|
||||
public static CRC correctPDU( BitSetBuffer message, long[] checksums, int crcStart )
|
||||
{
|
||||
long calculated = 0; //Starting value
|
||||
|
||||
int messageStart = 160;
|
||||
|
||||
/* Iterate the set bits and XOR running checksum with lookup value */
|
||||
for (int i = message.nextSetBit( messageStart );
|
||||
i >= messageStart && i < crcStart;
|
||||
i = message.nextSetBit( i+1 ) )
|
||||
{
|
||||
calculated ^= checksums[ i - messageStart ];
|
||||
}
|
||||
|
||||
long checksum = getLongChecksum( message, crcStart, 32 );
|
||||
|
||||
long error = calculated ^ checksum;
|
||||
|
||||
if( error == 0 || error == 0xFFFFFFFFl )
|
||||
{
|
||||
return CRC.PASSED;
|
||||
}
|
||||
else
|
||||
{
|
||||
int errorLocation = getBitError( error, checksums );
|
||||
|
||||
if( errorLocation >= 0 )
|
||||
{
|
||||
message.flip( errorLocation + messageStart );
|
||||
|
||||
return CRC.CORRECTED;
|
||||
}
|
||||
}
|
||||
|
||||
return CRC.FAILED_CRC;
|
||||
}
|
||||
|
||||
/**
|
||||
* Error detection and correction of single-bit errors for CCITT 16-bit
|
||||
* CRC protected 80-bit messages.
|
||||
*/
|
||||
public static CRC correctCCITT80( BitSetBuffer message,
|
||||
int messageStart,
|
||||
@@ -212,13 +425,13 @@ public class CRCP25
|
||||
|
||||
public static void main( String[] args )
|
||||
{
|
||||
String raw = "0010011000000111101010111111001111100001111010011110000100010010000010011001000000101101110000000000000000000000000000000000000000000000000000000001011011001100";
|
||||
String raw = "0010011000001100101001010111110100010101011010011111110010101100001101111111110100000000000000000001001001101001100000010011101000000000000000001000110101001000000000010010011100111111111000110011110000111000011100000000000000001001111001000101101100001010";
|
||||
|
||||
BitSetBuffer message = BitSetBuffer.load( raw );
|
||||
|
||||
mLog.debug( "MSG:" + message.toString() );
|
||||
|
||||
CRC results = correctCCITT80( message, 64, 144 );
|
||||
CRC results = correctPDU1( message );
|
||||
|
||||
mLog.debug( "COR:" + message.toString() );
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
******************************************************************************/
|
||||
package crc;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -52,7 +50,7 @@ public class CRCUtil
|
||||
|
||||
message.set( x );
|
||||
|
||||
message = decode( message, polynomial, crcSize, messageSize );
|
||||
message = decode( message, messageSize, polynomial, crcSize );
|
||||
|
||||
long checksum = message.getLong( checksumIndexes );
|
||||
|
||||
@@ -93,9 +91,9 @@ public class CRCUtil
|
||||
* placed in the crc field which starts at index messageLength
|
||||
*/
|
||||
public static BitSetBuffer decode( BitSetBuffer message,
|
||||
int messageSize,
|
||||
long polynomial,
|
||||
int crcSize,
|
||||
int messageSize )
|
||||
int crcSize )
|
||||
{
|
||||
int MESSAGE_START = 0;
|
||||
|
||||
@@ -115,13 +113,19 @@ public class CRCUtil
|
||||
|
||||
public static void main( String[] args )
|
||||
{
|
||||
long crcCCITT = 0x11021l;
|
||||
long initialFill = 0xFFFFl;
|
||||
|
||||
mLog.debug( "Starting" );
|
||||
|
||||
long[] table = generate( 80, 16, crcCCITT, initialFill, true );
|
||||
long polynomial = 0x104C11DB7l;
|
||||
|
||||
// String raw = "101111101110000000000000001101111110001100111100001110000111000011111111101010111011000011100100";
|
||||
// BitSetBuffer buffer = BitSetBuffer.load( raw );
|
||||
// mLog.debug( "ORIG:" + buffer.toString() );
|
||||
// BitSetBuffer processed = decode( buffer, 64, polynomial, 32 );
|
||||
// mLog.debug( "PROC:" + processed.toString() );
|
||||
|
||||
long[] table = generate( 256, 32, 0x104C11DB7l, 0xFFFFFFFFl, true );
|
||||
|
||||
// long[] table = generate( 80, 16, 0x11021l, 0xFFFFl, true );
|
||||
mLog.debug( toCodeArray( table ) );
|
||||
mLog.debug( "Finished" );
|
||||
}
|
||||
|
||||
@@ -17,15 +17,20 @@
|
||||
******************************************************************************/
|
||||
package decode.p25;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import message.Message;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import sample.Listener;
|
||||
import alias.Alias;
|
||||
import alias.AliasList;
|
||||
import controller.activity.ActivitySummaryProvider;
|
||||
import decode.p25.message.P25Message;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
import decode.p25.message.pdu.osp.control.NetworkStatusBroadcastExtended;
|
||||
import decode.p25.message.pdu.osp.control.RFSSStatusBroadcastExtended;
|
||||
@@ -42,6 +47,12 @@ public class P25ActivitySummary implements ActivitySummaryProvider,
|
||||
{
|
||||
private static final int sINT_NULL_VALUE = -1;
|
||||
|
||||
private final static Logger mLog =
|
||||
LoggerFactory.getLogger( P25ActivitySummary.class );
|
||||
|
||||
private static final DecimalFormat mFrequencyFormatter =
|
||||
new DecimalFormat( "0.000000" );
|
||||
|
||||
private AliasList mAliasList;
|
||||
|
||||
private NetworkStatusBroadcast mNetworkStatus;
|
||||
@@ -69,6 +80,11 @@ public class P25ActivitySummary implements ActivitySummaryProvider,
|
||||
@Override
|
||||
public void receive( Message message )
|
||||
{
|
||||
if( !message.isValid() )
|
||||
{
|
||||
mLog.debug( "Got an invalid message!" );
|
||||
}
|
||||
|
||||
if( message instanceof TSBKMessage )
|
||||
{
|
||||
if( message instanceof AdjacentStatusBroadcast )
|
||||
@@ -118,7 +134,7 @@ public class P25ActivitySummary implements ActivitySummaryProvider,
|
||||
|
||||
sb.append( "Activity Summary\n" );
|
||||
sb.append( "Decoder:\tP25\n" );
|
||||
sb.append( "---------- THIS SITE --------------" );
|
||||
sb.append( "===================== THIS SITE ======================" );
|
||||
|
||||
if( mNetworkStatus != null )
|
||||
{
|
||||
@@ -126,14 +142,6 @@ public class P25ActivitySummary implements ActivitySummaryProvider,
|
||||
sb.append( "\nSYSTEM:\t" + mNetworkStatus.getSystemID() );
|
||||
sb.append( "\nWACN:\t" + mNetworkStatus.getWACN() );
|
||||
sb.append( "\nLRA:\t" + mNetworkStatus.getLocationRegistrationArea() );
|
||||
sb.append( "\nSERVICES:\t" + SystemService.toString(
|
||||
mNetworkStatus.getSystemServiceClass() ) );
|
||||
sb.append( "\nPCCH:\tDNLINK " + mNetworkStatus.getDownlinkFrequency() +
|
||||
" [" + mNetworkStatus.getIdentifier() + "-" +
|
||||
mNetworkStatus.getChannel() + "]\n" );
|
||||
sb.append( "\tUPLINK " + mNetworkStatus.getUplinkFrequency() + " [" +
|
||||
mNetworkStatus.getIdentifier() + "-" +
|
||||
mNetworkStatus.getChannel() + "]\n" );
|
||||
}
|
||||
else if( mNetworkStatusExtended != null )
|
||||
{
|
||||
@@ -141,16 +149,59 @@ public class P25ActivitySummary implements ActivitySummaryProvider,
|
||||
sb.append( "\nSYSTEM:\t" + mNetworkStatusExtended.getSystemID() );
|
||||
sb.append( "\nWACN:\t" + mNetworkStatusExtended.getWACN() );
|
||||
sb.append( "\nLRA:\t" + mNetworkStatusExtended.getLocationRegistrationArea() );
|
||||
sb.append( "\nSERVICES:\t" + SystemService.toString(
|
||||
mNetworkStatusExtended.getSystemServiceClass() ) );
|
||||
sb.append( "\nPCCH:\tDNLINK " + mNetworkStatusExtended.getDownlinkFrequency() +
|
||||
" [" + mNetworkStatusExtended.getTransmitIdentifier() + "-" +
|
||||
mNetworkStatusExtended.getTransmitChannel() + "]\n" );
|
||||
sb.append( "\tUPLINK " + mNetworkStatusExtended.getUplinkFrequency() + " [" +
|
||||
mNetworkStatusExtended.getReceiveIdentifier() + "-" +
|
||||
mNetworkStatusExtended.getReceiveChannel() + "]" );
|
||||
}
|
||||
|
||||
String site = null;
|
||||
|
||||
if( mRFSSStatusMessage != null )
|
||||
{
|
||||
site = mRFSSStatusMessage.getRFSubsystemID() + "-" + mRFSSStatusMessage.getSiteID();
|
||||
}
|
||||
else if( mRFSSStatusMessageExtended != null )
|
||||
{
|
||||
site = mRFSSStatusMessageExtended.getRFSubsystemID() + "-" +
|
||||
mRFSSStatusMessageExtended.getSiteID();
|
||||
}
|
||||
|
||||
sb.append( "\nRFSS-SITE:\t" + site );
|
||||
|
||||
if( mAliasList != null )
|
||||
{
|
||||
Alias siteAlias = mAliasList.getSiteID( site );
|
||||
|
||||
if( siteAlias != null )
|
||||
{
|
||||
sb.append( " " + siteAlias.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
if( mNetworkStatus != null )
|
||||
{
|
||||
sb.append( "\nSERVICES:\t" + SystemService.toString(
|
||||
mNetworkStatus.getSystemServiceClass() ) );
|
||||
sb.append( "\nPCCH:\tDNLINK " + mFrequencyFormatter.format(
|
||||
(double)mNetworkStatus.getDownlinkFrequency() / 1E6d ) +
|
||||
" [" + mNetworkStatus.getIdentifier() + "-" +
|
||||
mNetworkStatus.getChannel() + "]\n" );
|
||||
sb.append( "\tUPLINK " + mFrequencyFormatter.format(
|
||||
(double)mNetworkStatus.getUplinkFrequency() / 1E6d ) + " [" +
|
||||
mNetworkStatus.getIdentifier() + "-" +
|
||||
mNetworkStatus.getChannel() + "]\n" );
|
||||
}
|
||||
else if( mNetworkStatusExtended != null )
|
||||
{
|
||||
sb.append( "\nSERVICES:\t" + SystemService.toString(
|
||||
mNetworkStatusExtended.getSystemServiceClass() ) );
|
||||
sb.append( "\nPCCH:\tDNLINK " + mFrequencyFormatter.format(
|
||||
(double)mNetworkStatusExtended.getDownlinkFrequency() / 1E6d ) +
|
||||
" [" + mNetworkStatusExtended.getTransmitIdentifier() + "-" +
|
||||
mNetworkStatusExtended.getTransmitChannel() + "]\n" );
|
||||
sb.append( "\tUPLINK " + mFrequencyFormatter.format(
|
||||
(double)mNetworkStatusExtended.getUplinkFrequency() / 1E6d ) +
|
||||
" [" + mNetworkStatusExtended.getReceiveIdentifier() + "-" +
|
||||
mNetworkStatusExtended.getReceiveChannel() + "]" );
|
||||
}
|
||||
|
||||
if( mSecondaryControlChannels.isEmpty() )
|
||||
{
|
||||
sb.append( "\nSCCH:\tNONE" );
|
||||
@@ -159,45 +210,33 @@ public class P25ActivitySummary implements ActivitySummaryProvider,
|
||||
{
|
||||
for( SecondaryControlChannelBroadcast sec: mSecondaryControlChannels )
|
||||
{
|
||||
sb.append( "\nSCCH:\tDNLINK " + sec.getDownlinkFrequency1() +
|
||||
sb.append( "\nSCCH:\tDNLINK " + mFrequencyFormatter.format(
|
||||
(double)sec.getDownlinkFrequency1() / 1E6d ) +
|
||||
" [" + sec.getIdentifier1() + "-" + sec.getChannel1() + "]\n" );
|
||||
sb.append( "\tUPLINK " + sec.getUplinkFrequency1() + " [" +
|
||||
sb.append( "\tUPLINK " + mFrequencyFormatter.format(
|
||||
(double)sec.getUplinkFrequency1() / 1E6d ) + " [" +
|
||||
sec.getIdentifier1() + "-" + sec.getChannel1() + "]\n" );
|
||||
|
||||
if( sec.hasChannel2() )
|
||||
{
|
||||
sb.append( "\nSCCH:\tDNLINK " + sec.getDownlinkFrequency2() +
|
||||
sb.append( "\nSCCH:\tDNLINK " + mFrequencyFormatter.format(
|
||||
(double)sec.getDownlinkFrequency2() / 1E6d ) +
|
||||
" [" + sec.getIdentifier2() + "-" + sec.getChannel2() + "]\n" );
|
||||
sb.append( "\tUPLINK " + sec.getUplinkFrequency2() + " [" +
|
||||
sb.append( "\tUPLINK " + mFrequencyFormatter.format(
|
||||
(double)sec.getUplinkFrequency2() / 1E6d ) + " [" +
|
||||
sec.getIdentifier2() + "-" + sec.getChannel2() + "]" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( mRFSSStatusMessage != null )
|
||||
{
|
||||
sb.append( "\nRFSS:\t" + mRFSSStatusMessage.getRFSubsystemID() );
|
||||
sb.append( "\nSITE:\t" + mRFSSStatusMessage.getSiteID() );
|
||||
|
||||
if( mAliasList != null )
|
||||
{
|
||||
/* Add site alias here */
|
||||
}
|
||||
|
||||
}
|
||||
else if( mRFSSStatusMessageExtended != null )
|
||||
{
|
||||
sb.append( "\nRFSS:\t" + mRFSSStatusMessageExtended.getRFSubsystemID() );
|
||||
sb.append( "\nSITE:\t" + mRFSSStatusMessageExtended.getSiteID() );
|
||||
}
|
||||
|
||||
|
||||
sb.append( "\n\n----------- NEIGHBORS -------------" );
|
||||
sb.append( "\n\n=================== NEIGHBORS ======================" );
|
||||
|
||||
if( mNeighborMap.isEmpty() )
|
||||
{
|
||||
sb.append( "\n\tNONE\n" );
|
||||
sb.append( "------------------------\n" );
|
||||
sb.append( "\n----------------------------------------------------" );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -206,11 +245,25 @@ public class P25ActivitySummary implements ActivitySummaryProvider,
|
||||
sb.append( "\nNAC:\t" + neighbor.getNAC() );
|
||||
sb.append( "\nSYSTEM:\t" + neighbor.getSystemID() );
|
||||
sb.append( "\nLRA:\t" + neighbor.getLocationRegistrationArea() );
|
||||
sb.append( "\nRFSS:\t" + neighbor.getRFSS() );
|
||||
sb.append( "\nSITE:\t" + neighbor.getSiteID() );
|
||||
sb.append( "\nPCCH:\tDNLINK " + neighbor.getDownlinkFrequency() +
|
||||
|
||||
String neighborID = neighbor.getRFSS() + "-" + neighbor.getSiteID();
|
||||
sb.append( "\nRFSS-SITE:\t" + neighborID );
|
||||
|
||||
if( mAliasList != null )
|
||||
{
|
||||
Alias siteAlias = mAliasList.getSiteID( neighborID );
|
||||
|
||||
if( siteAlias != null )
|
||||
{
|
||||
sb.append( " " + siteAlias.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
sb.append( "\nPCCH:\tDNLINK " + mFrequencyFormatter.format(
|
||||
(double)neighbor.getDownlinkFrequency() / 1E6d ) +
|
||||
" [" + neighbor.getIdentifier() + "-" + neighbor.getChannel() + "]" );
|
||||
sb.append( "\n\tUPLINK:" + neighbor.getUplinkFrequency() + "\n" );
|
||||
sb.append( "\n\tUPLINK:" + mFrequencyFormatter.format(
|
||||
(double)neighbor.getUplinkFrequency() / 1E6d ) + "\n" );
|
||||
sb.append( "\nSERVICES:\t" + Service.getServices( neighbor.getSystemServiceClass() ) );
|
||||
sb.append( "\n----------------------------------------------------" );
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class P25Decoder extends Decoder implements Instrumentable
|
||||
super( sampleType );
|
||||
|
||||
mAliasList = aliasList;
|
||||
|
||||
|
||||
/**
|
||||
* Only setup a demod chain if we're receiving complex samples. If
|
||||
* we're receiving demodulated samples, they'll be handled the same
|
||||
|
||||
@@ -36,30 +36,33 @@ public class P25MessageProcessor implements Listener<Message>
|
||||
@Override
|
||||
public void receive( Message message )
|
||||
{
|
||||
/* Insert band identifier update messages into channel-type messages */
|
||||
if( message instanceof IdentifierUpdateReceiver )
|
||||
if( message.isValid() )
|
||||
{
|
||||
IdentifierUpdateReceiver receiver = (IdentifierUpdateReceiver)message;
|
||||
|
||||
int[] identifiers = receiver.getIdentifiers();
|
||||
|
||||
for( int identifier: identifiers )
|
||||
/* Insert band identifier update messages into channel-type messages */
|
||||
if( message instanceof IdentifierUpdateReceiver )
|
||||
{
|
||||
receiver.setIdentifierMessage( identifier,
|
||||
mIdentifierMap.get( identifier ) );
|
||||
IdentifierUpdateReceiver receiver = (IdentifierUpdateReceiver)message;
|
||||
|
||||
int[] identifiers = receiver.getIdentifiers();
|
||||
|
||||
for( int identifier: identifiers )
|
||||
{
|
||||
receiver.setIdentifierMessage( identifier,
|
||||
mIdentifierMap.get( identifier ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Store band identifiers so that they can be injected into channel
|
||||
* type messages */
|
||||
if( message instanceof IdentifierUpdate )
|
||||
{
|
||||
IdentifierUpdate identifierUpdate = (IdentifierUpdate)message;
|
||||
/* Store band identifiers so that they can be injected into channel
|
||||
* type messages */
|
||||
if( message instanceof IdentifierUpdate )
|
||||
{
|
||||
IdentifierUpdate identifierUpdate = (IdentifierUpdate)message;
|
||||
|
||||
mIdentifierMap.put( identifierUpdate.getIdentifier(), identifierUpdate );
|
||||
}
|
||||
|
||||
mIdentifierMap.put( identifierUpdate.getIdentifier(), identifierUpdate );
|
||||
mBroadcaster.broadcast( message );
|
||||
}
|
||||
|
||||
mBroadcaster.broadcast( message );
|
||||
}
|
||||
|
||||
public void dispose()
|
||||
|
||||
@@ -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