mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-16 10:37:26 -05:00
P25 work in progress.
This commit is contained in:
146
src/decode/p25/message/pdu/NetworkStatusBroadcastExtended.java
Normal file
146
src/decode/p25/message/pdu/NetworkStatusBroadcastExtended.java
Normal file
@@ -0,0 +1,146 @@
|
||||
package decode.p25.message.pdu;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.osp.control.IdentifierUpdate;
|
||||
import decode.p25.message.tsbk.osp.control.IdentifierUpdateReceiver;
|
||||
import decode.p25.message.tsbk.osp.control.SystemService;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class NetworkStatusBroadcastExtended extends PDUMessage
|
||||
implements IdentifierUpdateReceiver
|
||||
{
|
||||
public static final int[] LRA = { 88,89,90,91,92,93,94,95 };
|
||||
public static final int[] SYSTEM_ID = { 100,101,102,103,104,105,106,107,108,
|
||||
109,110,111 };
|
||||
public static final int[] WACN = { 160,161,162,163,164,165,166,167,168,169,
|
||||
170,171,172,173,174,175,176,177,178,179 };
|
||||
public static final int[] TRANSMIT_IDENTIFIER = { 184,185,186,187 };
|
||||
public static final int[] TRANSMIT_CHANNEL = { 188,189,190,191,192,193,194,
|
||||
195,196,197,198,199 };
|
||||
public static final int[] RECEIVE_IDENTIFIER = { 200,201,202,203 };
|
||||
public static final int[] RECEIVE_CHANNEL = { 204,205,206,207,208,209,210,
|
||||
211,212,213,214,215 };
|
||||
public static final int[] SYSTEM_SERVICE_CLASS = { 216,217,218,219,220,221,
|
||||
222,223 };
|
||||
public static final int[] MULTIPLE_BLOCK_CRC = { 224,225,226,227,228,229,
|
||||
230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,
|
||||
248,249,250,251,252,253,254,255 };
|
||||
|
||||
private IdentifierUpdate mTransmitIdentifierUpdate;
|
||||
private IdentifierUpdate mReceiveIdentifierUpdate;
|
||||
|
||||
public NetworkStatusBroadcastExtended( BitSetBuffer message,
|
||||
DataUnitID duid, AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.NETWORK_STATUS_BROADCAST.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
sb.append( " LRA:" + getLocationRegistrationArea() );
|
||||
|
||||
sb.append( " WACN:" + getWACN() );
|
||||
|
||||
sb.append( " SYS:" + getSystemID() );
|
||||
|
||||
sb.append( " CTRL CHAN:" + getReceiveIdentifier() + "-" + getReceiveChannel() );
|
||||
|
||||
sb.append( " DN:" + getDownlinkFrequency() );
|
||||
|
||||
sb.append( " " + getTransmitIdentifier() + "-" + getTransmitChannel() );
|
||||
|
||||
sb.append( " UP:" + getUplinkFrequency() );
|
||||
|
||||
sb.append( " SYS SVC CLASS:" +
|
||||
SystemService.toString( getSystemServiceClass() ) );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
public String getLocationRegistrationArea()
|
||||
{
|
||||
return mMessage.getHex( LRA, 2 );
|
||||
}
|
||||
|
||||
public String getSystemID()
|
||||
{
|
||||
return mMessage.getHex( SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getWACN()
|
||||
{
|
||||
return mMessage.getHex( WACN, 6 );
|
||||
}
|
||||
|
||||
public int getTransmitIdentifier()
|
||||
{
|
||||
return mMessage.getInt( TRANSMIT_IDENTIFIER );
|
||||
}
|
||||
|
||||
public int getTransmitChannel()
|
||||
{
|
||||
return mMessage.getInt( TRANSMIT_CHANNEL );
|
||||
}
|
||||
|
||||
public int getReceiveIdentifier()
|
||||
{
|
||||
return mMessage.getInt( RECEIVE_IDENTIFIER );
|
||||
}
|
||||
|
||||
public int getReceiveChannel()
|
||||
{
|
||||
return mMessage.getInt( RECEIVE_CHANNEL );
|
||||
}
|
||||
|
||||
public int getSystemServiceClass()
|
||||
{
|
||||
return mMessage.getInt( SYSTEM_SERVICE_CLASS );
|
||||
}
|
||||
|
||||
public long getDownlinkFrequency()
|
||||
{
|
||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannel() );
|
||||
}
|
||||
|
||||
public long getUplinkFrequency()
|
||||
{
|
||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannel() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIdentifierMessage( int identifier, IdentifierUpdate message )
|
||||
{
|
||||
if( identifier == getTransmitIdentifier() )
|
||||
{
|
||||
mTransmitIdentifierUpdate = message;
|
||||
}
|
||||
|
||||
if( identifier == getReceiveIdentifier() )
|
||||
{
|
||||
mReceiveIdentifierUpdate = message;
|
||||
}
|
||||
}
|
||||
|
||||
public int[] getIdentifiers()
|
||||
{
|
||||
int[] idens = new int[ 2 ];
|
||||
|
||||
idens[ 0 ] = getTransmitIdentifier();
|
||||
idens[ 1 ] = getReceiveIdentifier();
|
||||
|
||||
return idens;
|
||||
}
|
||||
}
|
||||
@@ -4,156 +4,157 @@ import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.P25Message;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
import decode.p25.reference.PDUFormat;
|
||||
import decode.p25.reference.ServiceAccessPoint;
|
||||
import decode.p25.reference.Vendor;
|
||||
|
||||
public class PDUMessage extends P25Message
|
||||
{
|
||||
public static final int PDU_HEADER_DUMMY1 = 66; //Always 0
|
||||
public static final int PDU_HEADER_CONFIRMATION_REQUIRED = 67;
|
||||
public static final int PDU_HEADER_DIRECTION_FLAG = 68;
|
||||
public static final int[] PDU_HEADER_FORMAT = { 69,70,71,72,73 };
|
||||
public static final int PDU_HEADER_DUMMY2 = 74; //Always 1
|
||||
public static final int PDU_HEADER_DUMMY3 = 75; //Always 1
|
||||
public static final int[] PDU_HEADER_SAP_ID = { 76,77,78,79,80 };
|
||||
public static final int[] PDU_HEADER_VENDOR_ID = { 81,82,83,84,85,86,87,88 };
|
||||
public static final int[] PDU_HEADER_LOGICAL_LINK_ID = { 89,90,91,92,93,94,
|
||||
97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114 };
|
||||
public static final int PDU_HEADER_FULL_MESSAGE_FLAG = 115;
|
||||
public static final int[] PDU_HEADER_BLOCKS_TO_FOLLOW = { 116,117,118,119,
|
||||
120,121,122 };
|
||||
public static final int PDU_HEADER_DUMMY4 = 123; //Always 0
|
||||
public static final int PDU_HEADER_DUMMY5 = 124; //Always 0
|
||||
public static final int PDU_HEADER_DUMMY6 = 125; //Always 0
|
||||
public static final int[] PDU_HEADER_PAD_BLOCKS = { 126,127,128,129,130 };
|
||||
public static final int PDU_HEADER_RESYNCHRONIZE_FLAG = 131;
|
||||
public static final int[] PDU_HEADER_SEQUENCE_NUMBER = { 132,133,134 };
|
||||
public static final int[] PDU_HEADER_FRAGMENT_SEQUENCE_NUMBER = { 135,136,
|
||||
137,138 };
|
||||
public static final int PDU_HEADER_DUMMY7 = 139; //Always 0
|
||||
public static final int PDU_HEADER_DUMMY8 = 140; //Always 0
|
||||
public static final int[] PDU_HEADER_DATA_HEADER_OFFSET = { 141,142,143,
|
||||
144,145,146 };
|
||||
public static final int[] PDU_HEADER_CRC = { 147,148,149,150,151,152,153,154,
|
||||
155,156,157,158,159,160,161,162 };
|
||||
public static final int CONFIRMATION_REQUIRED_INDICATOR = 65;
|
||||
public static final int PACKET_DIRECTION_INDICATOR = 66;
|
||||
public static final int[] FORMAT = { 67,68,69,70,71 };
|
||||
public static final int[] SAP_ID = { 74,75,76,77,78,79 };
|
||||
public static final int[] VENDOR_ID = { 80,81,82,83,84,85,86,87 };
|
||||
public static final int[] LOGICAL_LINK_ID = { 88,89,90,91,92,93,94,95,96,97,
|
||||
98,99,100,101,102,103,104,105,106,107,108,109,110,111 };
|
||||
public static final int[] BLOCKS_TO_FOLLOW = { 113,114,115,116,117,118,119 };
|
||||
public static final int[] PAD_OCTET_COUNT = { 123,124,125,126,127 };
|
||||
public static final int[] OPCODE = { 122,123,124,125,126,127 };
|
||||
public static final int[] DATA_HEADER_OFFSET = { 138,139,140,141,142,143 };
|
||||
public static final int[] PDU_CRC = { 144,145,146,147,148,149,150,151,152,
|
||||
153,154,155,156,157,158,159 };
|
||||
|
||||
//status 166,167
|
||||
public PDUMessage( BitSetBuffer message, DataUnitID duid, AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
public String getConfirmation()
|
||||
protected String getMessageStub()
|
||||
{
|
||||
return mMessage.get( PDU_HEADER_CONFIRMATION_REQUIRED ) ? "CON" : "UNC";
|
||||
}
|
||||
|
||||
public String getDirection()
|
||||
{
|
||||
return mMessage.get( PDU_HEADER_DIRECTION_FLAG ) ? "OSP" : "ISP";
|
||||
}
|
||||
|
||||
public PDUFormat getFormat()
|
||||
{
|
||||
return PDUFormat.fromValue( mMessage.getInt( PDU_HEADER_FORMAT ) );
|
||||
}
|
||||
|
||||
public ServiceAccessPoint getServiceAccessPoint()
|
||||
{
|
||||
return ServiceAccessPoint.fromValue( mMessage.getInt( PDU_HEADER_SAP_ID ) );
|
||||
}
|
||||
|
||||
public Vendor getVendor()
|
||||
{
|
||||
return Vendor.fromValue( mMessage.getInt( PDU_HEADER_VENDOR_ID ) );
|
||||
}
|
||||
|
||||
public String getLogicalLinkID()
|
||||
{
|
||||
return mMessage.getHex( PDU_HEADER_LOGICAL_LINK_ID, 6 );
|
||||
}
|
||||
|
||||
public boolean isFullMessage()
|
||||
{
|
||||
return mMessage.get( PDU_HEADER_FULL_MESSAGE_FLAG );
|
||||
}
|
||||
|
||||
public int getBlockCount()
|
||||
{
|
||||
return mMessage.getInt( PDU_HEADER_BLOCKS_TO_FOLLOW );
|
||||
}
|
||||
|
||||
public int getPadBlockCount()
|
||||
{
|
||||
return mMessage.getInt( PDU_HEADER_PAD_BLOCKS );
|
||||
}
|
||||
|
||||
public boolean isResync()
|
||||
{
|
||||
return mMessage.get( PDU_HEADER_RESYNCHRONIZE_FLAG );
|
||||
}
|
||||
|
||||
public int getSequenceNumber()
|
||||
{
|
||||
return mMessage.getInt( PDU_HEADER_SEQUENCE_NUMBER );
|
||||
}
|
||||
|
||||
public int getFragmentSequenceNumber()
|
||||
{
|
||||
return mMessage.getInt( PDU_HEADER_FRAGMENT_SEQUENCE_NUMBER );
|
||||
}
|
||||
|
||||
public int getDataHeaderOffset()
|
||||
{
|
||||
return mMessage.getInt( PDU_HEADER_DATA_HEADER_OFFSET );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
Vendor vendor = getVendor();
|
||||
|
||||
sb.append( "NAC:" );
|
||||
sb.append( getNAC() );
|
||||
sb.append( " " );
|
||||
sb.append( getDUID().getLabel() );
|
||||
|
||||
if( vendor == Vendor.STANDARD )
|
||||
{
|
||||
sb.append( " " );
|
||||
sb.append( getOpcode().getLabel() );
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append( " " );
|
||||
sb.append( vendor.getLabel() );
|
||||
sb.append( " OPCD:" );
|
||||
sb.append( mMessage.getHex( OPCODE, 2 ) );
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
switch( getFormat() )
|
||||
{
|
||||
case ALTERNATE_MULTI_BLOCK_TRUNKING_CONTROL:
|
||||
break;
|
||||
case UNCONFIRMED_MULTI_BLOCK_TRUNKING_CONTROL:
|
||||
sb.append( " PAD OCTETS:" + getPadOctetCount() );
|
||||
sb.append( " DATA HDR OFFSET:" + getDataHeaderOffset() );
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
sb.append( " " );
|
||||
sb.append( getConfirmation() );
|
||||
sb.append( " " );
|
||||
sb.append( getDirection() );
|
||||
sb.append( " FMT:" );
|
||||
sb.append( getFormat().getLabel() );
|
||||
|
||||
switch( getFormat() )
|
||||
{
|
||||
case ALTERNATE_MULTI_BLOCK_TRUNKING_CONTROL:
|
||||
case UNCONFIRMED_MULTI_BLOCK_TRUNKING_CONTROL:
|
||||
sb.append( " SAP:" );
|
||||
sb.append( getServiceAccessPoint().getLabel() );
|
||||
sb.append( " VEND:" );
|
||||
sb.append( getVendor().getLabel() );
|
||||
sb.append( " LLID:" );
|
||||
sb.append( getLogicalLinkID() );
|
||||
sb.append( " FMF:" );
|
||||
sb.append( isFullMessage() ? "1" : "0" );
|
||||
sb.append( " BLKS:" );
|
||||
sb.append( getBlockCount() );
|
||||
sb.append( " PAD:" );
|
||||
sb.append( getPadBlockCount() );
|
||||
sb.append( " RESYNC:" );
|
||||
sb.append( isResync() ? "1" : "0" );
|
||||
sb.append( " SEQ:" );
|
||||
sb.append( getSequenceNumber() );
|
||||
sb.append( " FRAG:" );
|
||||
sb.append( getFragmentSequenceNumber() );
|
||||
sb.append( " DHO:" );
|
||||
sb.append( getDataHeaderOffset() );
|
||||
break;
|
||||
default:
|
||||
}
|
||||
sb.append( " SAP:" );
|
||||
sb.append( getServiceAccessPoint().getLabel() );
|
||||
sb.append( " VEND:" );
|
||||
sb.append( getVendor().getLabel() );
|
||||
sb.append( " LLID:" );
|
||||
sb.append( getLogicalLinkID() );
|
||||
sb.append( " BLKS TO FOLLOW:" );
|
||||
sb.append( getBlocksToFollowCount() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getConfirmation()
|
||||
{
|
||||
return mMessage.get( CONFIRMATION_REQUIRED_INDICATOR ) ? "CON" : "UNC";
|
||||
}
|
||||
|
||||
public String getDirection()
|
||||
{
|
||||
return mMessage.get( PACKET_DIRECTION_INDICATOR ) ? "OSP" : "ISP";
|
||||
}
|
||||
|
||||
public PDUFormat getFormat()
|
||||
{
|
||||
return PDUFormat.fromValue( mMessage.getInt( FORMAT ) );
|
||||
}
|
||||
|
||||
public ServiceAccessPoint getServiceAccessPoint()
|
||||
{
|
||||
return ServiceAccessPoint.fromValue( mMessage.getInt( SAP_ID ) );
|
||||
}
|
||||
|
||||
public Vendor getVendor()
|
||||
{
|
||||
return Vendor.fromValue( mMessage.getInt( VENDOR_ID ) );
|
||||
}
|
||||
|
||||
public String getLogicalLinkID()
|
||||
{
|
||||
return mMessage.getHex( LOGICAL_LINK_ID, 6 );
|
||||
}
|
||||
|
||||
public int getBlocksToFollowCount()
|
||||
{
|
||||
return mMessage.getInt( BLOCKS_TO_FOLLOW );
|
||||
}
|
||||
|
||||
public int getPadOctetCount()
|
||||
{
|
||||
if( getFormat() == PDUFormat.UNCONFIRMED_MULTI_BLOCK_TRUNKING_CONTROL )
|
||||
{
|
||||
return mMessage.getInt( PAD_OCTET_COUNT );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Opcode getOpcode()
|
||||
{
|
||||
if( getFormat() == PDUFormat.ALTERNATE_MULTI_BLOCK_TRUNKING_CONTROL )
|
||||
{
|
||||
return Opcode.fromValue( mMessage.getInt( OPCODE ) );
|
||||
}
|
||||
|
||||
return Opcode.UNKNOWN;
|
||||
}
|
||||
|
||||
public int getDataHeaderOffset()
|
||||
{
|
||||
if( getFormat() == PDUFormat.UNCONFIRMED_MULTI_BLOCK_TRUNKING_CONTROL )
|
||||
{
|
||||
return mMessage.getInt( DATA_HEADER_OFFSET );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
57
src/decode/p25/message/pdu/PDUMessageFactory.java
Normal file
57
src/decode/p25/message/pdu/PDUMessageFactory.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package decode.p25.message.pdu;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
import decode.p25.reference.PDUFormat;
|
||||
import decode.p25.reference.Vendor;
|
||||
|
||||
public class PDUMessageFactory
|
||||
{
|
||||
public static PDUMessage getMessage( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
PDUFormat format = PDUFormat.fromValue(
|
||||
message.getInt( PDUMessage.FORMAT ) );
|
||||
|
||||
switch( format )
|
||||
{
|
||||
case ALTERNATE_MULTI_BLOCK_TRUNKING_CONTROL:
|
||||
Vendor vendor = Vendor.fromValue(
|
||||
message.getInt( PDUMessage.VENDOR_ID ) );
|
||||
|
||||
switch( vendor )
|
||||
{
|
||||
case STANDARD:
|
||||
Opcode opcode = Opcode.fromValue(
|
||||
message.getInt( PDUMessage.OPCODE ) );
|
||||
|
||||
switch( opcode )
|
||||
{
|
||||
case NETWORK_STATUS_BROADCAST:
|
||||
return new NetworkStatusBroadcastExtended(
|
||||
message, duid, aliasList );
|
||||
case RFSS_STATUS_BROADCAST:
|
||||
return new RFSSStatusBroadcastExtended( message,
|
||||
duid, aliasList );
|
||||
default:
|
||||
break;
|
||||
}
|
||||
case MOTOROLA:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return new PDUMessage( message, duid, aliasList );
|
||||
|
||||
case UNCONFIRMED_MULTI_BLOCK_TRUNKING_CONTROL:
|
||||
return new PDUMessage( message, duid, aliasList );
|
||||
|
||||
default:
|
||||
return new PDUMessage( message, duid, aliasList );
|
||||
}
|
||||
}
|
||||
}
|
||||
157
src/decode/p25/message/pdu/RFSSStatusBroadcastExtended.java
Normal file
157
src/decode/p25/message/pdu/RFSSStatusBroadcastExtended.java
Normal file
@@ -0,0 +1,157 @@
|
||||
package decode.p25.message.pdu;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.osp.control.IdentifierUpdate;
|
||||
import decode.p25.message.tsbk.osp.control.IdentifierUpdateReceiver;
|
||||
import decode.p25.message.tsbk.osp.control.SystemService;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class RFSSStatusBroadcastExtended extends PDUMessage
|
||||
implements IdentifierUpdateReceiver
|
||||
{
|
||||
public static final int[] LRA = { 88,89,90,91,92,93,94,95 };
|
||||
public static final int ACTIVE_NETWORK_CONNECTION_INDICATOR = 99;
|
||||
public static final int[] SYSTEM_ID = { 100,101,102,103,104,105,106,107,108,
|
||||
109,110,111 };
|
||||
public static final int[] RFSS_ID = { 160,161,162,163,164,165,166,167 };
|
||||
public static final int[] SITE_ID = { 168,169,170,171,172,173,174,175 };
|
||||
public static final int[] TRANSMIT_IDENTIFIER = { 184,185,186,187 };
|
||||
public static final int[] TRANSMIT_CHANNEL = { 188,189,190,191,192,193,194,
|
||||
195,196,197,198,199 };
|
||||
public static final int[] RECEIVE_IDENTIFIER = { 200,201,202,203 };
|
||||
public static final int[] RECEIVE_CHANNEL = { 204,205,206,207,208,209,210,
|
||||
211,212,213,214,215 };
|
||||
public static final int[] SYSTEM_SERVICE_CLASS = { 216,217,218,219,220,221,
|
||||
222,223 };
|
||||
public static final int[] MULTIPLE_BLOCK_CRC = { 224,225,226,227,228,229,
|
||||
230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,
|
||||
248,249,250,251,252,253,254,255 };
|
||||
|
||||
private IdentifierUpdate mTransmitIdentifierUpdate;
|
||||
private IdentifierUpdate mReceiveIdentifierUpdate;
|
||||
|
||||
public RFSSStatusBroadcastExtended( BitSetBuffer message,
|
||||
DataUnitID duid, AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.NETWORK_STATUS_BROADCAST.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
sb.append( " LRA:" + getLocationRegistrationArea() );
|
||||
|
||||
sb.append( " SYS:" + getSystemID() );
|
||||
|
||||
sb.append( " SITE:" + getRFSubsystemID() + "-" + getSiteID() );
|
||||
|
||||
sb.append( " CTRL CHAN:" + getReceiveIdentifier() + "-" + getReceiveChannel() );
|
||||
|
||||
sb.append( " DN:" + getDownlinkFrequency() );
|
||||
|
||||
sb.append( " " + getTransmitIdentifier() + "-" + getTransmitChannel() );
|
||||
|
||||
sb.append( " UP:" + getUplinkFrequency() );
|
||||
|
||||
sb.append( " SYS SVC CLASS:" +
|
||||
SystemService.toString( getSystemServiceClass() ) );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
public String getLocationRegistrationArea()
|
||||
{
|
||||
return mMessage.getHex( LRA, 2 );
|
||||
}
|
||||
|
||||
public boolean hasActiveNetworkConnection()
|
||||
{
|
||||
return mMessage.get( ACTIVE_NETWORK_CONNECTION_INDICATOR );
|
||||
}
|
||||
|
||||
public String getSystemID()
|
||||
{
|
||||
return mMessage.getHex( SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getRFSubsystemID()
|
||||
{
|
||||
return mMessage.getHex( RFSS_ID, 2 );
|
||||
}
|
||||
|
||||
public String getSiteID()
|
||||
{
|
||||
return mMessage.getHex( SITE_ID, 2 );
|
||||
}
|
||||
|
||||
public int getTransmitIdentifier()
|
||||
{
|
||||
return mMessage.getInt( TRANSMIT_IDENTIFIER );
|
||||
}
|
||||
|
||||
public int getTransmitChannel()
|
||||
{
|
||||
return mMessage.getInt( TRANSMIT_CHANNEL );
|
||||
}
|
||||
|
||||
public int getReceiveIdentifier()
|
||||
{
|
||||
return mMessage.getInt( RECEIVE_IDENTIFIER );
|
||||
}
|
||||
|
||||
public int getReceiveChannel()
|
||||
{
|
||||
return mMessage.getInt( RECEIVE_CHANNEL );
|
||||
}
|
||||
|
||||
public int getSystemServiceClass()
|
||||
{
|
||||
return mMessage.getInt( SYSTEM_SERVICE_CLASS );
|
||||
}
|
||||
|
||||
public long getDownlinkFrequency()
|
||||
{
|
||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannel() );
|
||||
}
|
||||
|
||||
public long getUplinkFrequency()
|
||||
{
|
||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannel() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIdentifierMessage( int identifier, IdentifierUpdate message )
|
||||
{
|
||||
if( identifier == getTransmitIdentifier() )
|
||||
{
|
||||
mTransmitIdentifierUpdate = message;
|
||||
}
|
||||
|
||||
if( identifier == getReceiveIdentifier() )
|
||||
{
|
||||
mReceiveIdentifierUpdate = message;
|
||||
}
|
||||
}
|
||||
|
||||
public int[] getIdentifiers()
|
||||
{
|
||||
int[] idens = new int[ 2 ];
|
||||
|
||||
idens[ 0 ] = getTransmitIdentifier();
|
||||
idens[ 1 ] = getReceiveIdentifier();
|
||||
|
||||
return idens;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user