P25 - adds support from motorola patch groups described by PiccoIntegra in RR post: http://forums.radioreference.com/trunking-control-channel-decoding/308138-question-about-t-g-patching-p25.html

This commit is contained in:
dennis.sheirer
2015-02-20 12:58:41 +00:00
parent ebee420478
commit a0b38afee1
10 changed files with 479 additions and 69 deletions

View File

@@ -5,6 +5,10 @@ import bits.BinaryMessage;
import decode.p25.message.tsbk.motorola.ChannelCWIDUpdate;
import decode.p25.message.tsbk.motorola.MotorolaOpcode;
import decode.p25.message.tsbk.motorola.MotorolaTSBKMessage;
import decode.p25.message.tsbk.motorola.PatchGroupAdd;
import decode.p25.message.tsbk.motorola.PatchGroupDelete;
import decode.p25.message.tsbk.motorola.PatchGroupVoiceChannelGrant;
import decode.p25.message.tsbk.motorola.PatchGroupVoiceChannelGrantUpdate;
import decode.p25.message.tsbk.motorola.SystemLoading;
import decode.p25.message.tsbk.osp.control.AcknowledgeResponse;
import decode.p25.message.tsbk.osp.control.AdjacentStatusBroadcast;
@@ -199,9 +203,17 @@ public class TSBKMessageFactory
switch( motorolaOpcode )
{
case OP0B:
case PATCH_GROUP_ADD:
return new PatchGroupAdd( message, duid, aliasList );
case PATCH_GROUP_DELETE:
return new PatchGroupDelete( message, duid, aliasList );
case PATCH_GROUP_CHANNEL_GRANT:
return new PatchGroupVoiceChannelGrant( message, duid, aliasList );
case PATCH_GROUP_CHANNEL_GRANT_UPDATE:
return new PatchGroupVoiceChannelGrantUpdate( message, duid, aliasList );
case CWID_UPDATE:
return new ChannelCWIDUpdate( message, duid, aliasList );
case OP09:
case SYSTEM_LOAD:
return new SystemLoading( message, duid, aliasList );
default:
}

View File

@@ -34,7 +34,7 @@ public class ChannelCWIDUpdate extends MotorolaTSBKMessage
@Override
public String getEventType()
{
return MotorolaOpcode.OP0B.getDescription();
return MotorolaOpcode.CWID_UPDATE.getDescription();
}
public String getMessage()

View File

@@ -2,71 +2,71 @@ package decode.p25.message.tsbk.motorola;
public enum MotorolaOpcode
{
OP00( "OP00:UNKNOWN ", "Opcode 0x00 Unknown", 0x00 ),
OP01( "OP01:UNKNOWN ", "Opcode 0x01 Unknown", 0x01 ),
OP02( "OP02:UNKNOWN ", "Opcode 0x02 Unknown", 0x02 ),
OP03( "OP03:UNKNOWN ", "Opcode 0x03 Unknown", 0x03 ),
OP04( "OP04:UNKNOWN ", "Opcode 0x04 Unknown", 0x04 ),
OP05( "OP05:UNKNOWN ", "Opcode 0x05 Unknown", 0x05 ),
OP06( "OP06:UNKNOWN ", "Opcode 0x06 Unknown", 0x06 ),
OP07( "OP07:UNKNOWN ", "Opcode 0x07 Unknown", 0x07 ),
OP08( "OP08:UNKNOWN ", "Opcode 0x08 Unknown", 0x08 ),
OP09( "OP09:SYSTEM_LOAD", "Opcode 0x09 System Loading", 0x09 ),
PATCH_GROUP_ADD( "ADD PATCH GROUP", "ADD PATCH SUPER GROUP", 0x00 ),
PATCH_GROUP_DELETE( "DELETE PATCH GROUP", "DELETE PATCH SUPER GROUP", 0x01 ),
PATCH_GROUP_CHANNEL_GRANT( "PATCH VOICE CHANNEL GRANT", "PATCH VOICE CHANNEL GRANT", 0x02 ),
PATCH_GROUP_CHANNEL_GRANT_UPDATE( "PATCH VOICE CHANNEL UPDATE", "PATCH VOICE CHANNEL GRANT UPDATE", 0x03 ),
OP04( "MOT OP04:UNKNOWN", "Opcode 0x04 Unknown", 0x04 ),
OP05( "MOT OP05:UNKNOWN ", "Opcode 0x05 Unknown", 0x05 ),
OP06( "MOT OP06:UNKNOWN ", "Opcode 0x06 Unknown", 0x06 ),
OP07( "MOT OP07:UNKNOWN ", "Opcode 0x07 Unknown", 0x07 ),
OP08( "MOT OP08:UNKNOWN ", "Opcode 0x08 Unknown", 0x08 ),
SYSTEM_LOAD( "SYSTEM LOADING", "SYSTEM LOAD", 0x09 ),
OP0A( "OP0A:UNKNOWN ", "Opcode 0x0A Unknown", 0x0A ),
OP0B( "OP0B:CWID_UPDATE", "Opcode 0x0B FCC Callsign", 0x0B ),
OP0C( "OP0C:UNKNOWN ", "Opcode 0x0C Unknown", 0x0C ),
OP0D( "OP0D:UNKNOWN ", "Opcode 0x0D Unknown", 0x0D ),
OP0E( "OP0E:UNKNOWN ", "Opcode 0x0E Unknown", 0x0E ),
OP0F( "OP0F:UNKNOWN ", "Opcode 0x0F Unknown", 0x0F ),
OP10( "OP10:UNKNOWN ", "Opcode 0x10 Unknown", 0x10 ),
OP11( "OP11:UNKNOWN ", "Opcode 0x11 Unknown", 0x11 ),
OP12( "OP12:UNKNOWN ", "Opcode 0x12 Unknown", 0x12 ),
OP13( "OP13:UNKNOWN ", "Opcode 0x13 Unknown", 0x13 ),
OP14( "OP14:UNKNOWN ", "Opcode 0x14 Unknown", 0x14 ),
OP15( "OP15:UNKNOWN ", "Opcode 0x15 Unknown", 0x15 ),
OP16( "OP16:UNKNOWN ", "Opcode 0x16 Unknown", 0x16 ),
OP17( "OP17:UNKNOWN ", "Opcode 0x17 Unknown", 0x17 ),
OP18( "OP18:UNKNOWN ", "Opcode 0x18 Unknown", 0x18 ),
OP19( "OP19:UNKNOWN ", "Opcode 0x19 Unknown", 0x19 ),
OP1A( "OP1A:UNKNOWN ", "Opcode 0x1A Unknown", 0x1A ),
OP1B( "OP1B:UNKNOWN ", "Opcode 0x1B Unknown", 0x1B ),
OP1C( "OP1C:UNKNOWN ", "Opcode 0x1C Unknown", 0x1C ),
OP1D( "OP1D:UNKNOWN ", "Opcode 0x1D Unknown", 0x1D ),
OP1E( "OP1E:UNKNOWN ", "Opcode 0x1E Unknown", 0x1E ),
OP1F( "OP1F:UNKNOWN ", "Opcode 0x1F Unknown", 0x1F ),
OP20( "OP20:UNKNOWN ", "Opcode 0x20 Unknown", 0x20 ),
OP21( "OP21:UNKNOWN ", "Opcode 0x21 Unknown", 0x21 ),
OP22( "OP22:UNKNOWN ", "Opcode 0x22 Unknown", 0x22 ),
OP23( "OP23:UNKNOWN ", "Opcode 0x23 Unknown", 0x23 ),
OP24( "OP24:UNKNOWN ", "Opcode 0x24 Unknown", 0x24 ),
OP25( "OP25:UNKNOWN ", "Opcode 0x25 Unknown", 0x25 ),
OP26( "OP26:UNKNOWN ", "Opcode 0x26 Unknown", 0x26 ),
OP27( "OP27:UNKNOWN ", "Opcode 0x27 Unknown", 0x27 ),
OP28( "OP28:UNKNOWN ", "Opcode 0x28 Unknown", 0x28 ),
OP29( "OP29:UNKNOWN ", "Opcode 0x29 Unknown", 0x29 ),
OP2A( "OP2A:UNKNOWN ", "Opcode 0x2A Unknown", 0x2A ),
OP2B( "OP2B:UNKNOWN ", "Opcode 0x2B Unknown", 0x2B ),
OP2C( "OP2C:UNKNOWN ", "Opcode 0x2C Unknown", 0x2C ),
OP2D( "OP2D:UNKNOWN ", "Opcode 0x2D Unknown", 0x2D ),
OP2E( "OP2E:UNKNOWN ", "Opcode 0x2E Unknown", 0x2E ),
OP2F( "OP2F:UNKNOWN ", "Opcode 0x2F Unknown", 0x2F ),
OP30( "OP30:UNKNOWN ", "Opcode 0x30 Unknown", 0x30 ),
OP31( "OP31:UNKNOWN ", "Opcode 0x31 Unknown", 0x31 ),
OP32( "OP32:UNKNOWN ", "Opcode 0x32 Unknown", 0x32 ),
OP33( "OP33:UNKNOWN ", "Opcode 0x33 Unknown", 0x33 ),
OP34( "OP34:UNKNOWN ", "Opcode 0x34 Unknown", 0x34 ),
OP35( "OP35:UNKNOWN ", "Opcode 0x35 Unknown", 0x35 ),
OP36( "OP36:UNKNOWN ", "Opcode 0x36 Unknown", 0x36 ),
OP37( "OP37:UNKNOWN ", "Opcode 0x37 Unknown", 0x37 ),
OP38( "OP38:UNKNOWN ", "Opcode 0x38 Unknown", 0x38 ),
OP39( "OP39:UNKNOWN ", "Opcode 0x39 Unknown", 0x39 ),
OP3A( "OP3A:UNKNOWN ", "Opcode 0x3A Unknown", 0x3A ),
OP3B( "OP3B:UNKNOWN ", "Opcode 0x3B Unknown", 0x3B ),
OP3C( "OP3C:UNKNOWN ", "Opcode 0x3C Unknown", 0x3C ),
OP3D( "OP3D:UNKNOWN ", "Opcode 0x3D Unknown", 0x3D ),
OP3E( "OP3E:UNKNOWN ", "Opcode 0x3E Unknown", 0x3E ),
OP3F( "OP3F:UNKNOWN ", "Opcode 0x3F Unknown", 0x3F ),
UNKNOWN( "UNKNOWN ", "Unknown", -1 );
CWID_UPDATE( "FCC CWID UPDATE", "FCC CWID CALLSIGN", 0x0B ),
OP0C( "MOT OP0C:UNKNOWN ", "Opcode 0x0C Unknown", 0x0C ),
OP0D( "MOT OP0D:UNKNOWN ", "Opcode 0x0D Unknown", 0x0D ),
OP0E( "MOT OP0E:UNKNOWN ", "Opcode 0x0E Unknown", 0x0E ),
OP0F( "MOT OP0F:UNKNOWN ", "Opcode 0x0F Unknown", 0x0F ),
OP10( "MOT OP10:UNKNOWN ", "Opcode 0x10 Unknown", 0x10 ),
OP11( "MOT OP11:UNKNOWN ", "Opcode 0x11 Unknown", 0x11 ),
OP12( "MOT OP12:UNKNOWN ", "Opcode 0x12 Unknown", 0x12 ),
OP13( "MOT OP13:UNKNOWN ", "Opcode 0x13 Unknown", 0x13 ),
OP14( "MOT OP14:UNKNOWN ", "Opcode 0x14 Unknown", 0x14 ),
OP15( "MOT OP15:UNKNOWN ", "Opcode 0x15 Unknown", 0x15 ),
OP16( "MOT OP16:UNKNOWN ", "Opcode 0x16 Unknown", 0x16 ),
OP17( "MOT OP17:UNKNOWN ", "Opcode 0x17 Unknown", 0x17 ),
OP18( "MOT OP18:UNKNOWN ", "Opcode 0x18 Unknown", 0x18 ),
OP19( "MOT OP19:UNKNOWN ", "Opcode 0x19 Unknown", 0x19 ),
OP1A( "MOT OP1A:UNKNOWN ", "Opcode 0x1A Unknown", 0x1A ),
OP1B( "MOT OP1B:UNKNOWN ", "Opcode 0x1B Unknown", 0x1B ),
OP1C( "MOT OP1C:UNKNOWN ", "Opcode 0x1C Unknown", 0x1C ),
OP1D( "MOT OP1D:UNKNOWN ", "Opcode 0x1D Unknown", 0x1D ),
OP1E( "MOT OP1E:UNKNOWN ", "Opcode 0x1E Unknown", 0x1E ),
OP1F( "MOT OP1F:UNKNOWN ", "Opcode 0x1F Unknown", 0x1F ),
OP20( "MOT OP20:UNKNOWN ", "Opcode 0x20 Unknown", 0x20 ),
OP21( "MOT OP21:UNKNOWN ", "Opcode 0x21 Unknown", 0x21 ),
OP22( "MOT OP22:UNKNOWN ", "Opcode 0x22 Unknown", 0x22 ),
OP23( "MOT OP23:UNKNOWN ", "Opcode 0x23 Unknown", 0x23 ),
OP24( "MOT OP24:UNKNOWN ", "Opcode 0x24 Unknown", 0x24 ),
OP25( "MOT OP25:UNKNOWN ", "Opcode 0x25 Unknown", 0x25 ),
OP26( "MOT OP26:UNKNOWN ", "Opcode 0x26 Unknown", 0x26 ),
OP27( "MOT OP27:UNKNOWN ", "Opcode 0x27 Unknown", 0x27 ),
OP28( "MOT OP28:UNKNOWN ", "Opcode 0x28 Unknown", 0x28 ),
OP29( "MOT OP29:UNKNOWN ", "Opcode 0x29 Unknown", 0x29 ),
OP2A( "MOT OP2A:UNKNOWN ", "Opcode 0x2A Unknown", 0x2A ),
OP2B( "MOT OP2B:UNKNOWN ", "Opcode 0x2B Unknown", 0x2B ),
OP2C( "MOT OP2C:UNKNOWN ", "Opcode 0x2C Unknown", 0x2C ),
OP2D( "MOT OP2D:UNKNOWN ", "Opcode 0x2D Unknown", 0x2D ),
OP2E( "MOT OP2E:UNKNOWN ", "Opcode 0x2E Unknown", 0x2E ),
OP2F( "MOT OP2F:UNKNOWN ", "Opcode 0x2F Unknown", 0x2F ),
OP30( "MOT OP30:UNKNOWN ", "Opcode 0x30 Unknown", 0x30 ),
OP31( "MOT OP31:UNKNOWN ", "Opcode 0x31 Unknown", 0x31 ),
OP32( "MOT OP32:UNKNOWN ", "Opcode 0x32 Unknown", 0x32 ),
OP33( "MOT OP33:UNKNOWN ", "Opcode 0x33 Unknown", 0x33 ),
OP34( "MOT OP34:UNKNOWN ", "Opcode 0x34 Unknown", 0x34 ),
OP35( "MOT OP35:UNKNOWN ", "Opcode 0x35 Unknown", 0x35 ),
OP36( "MOT OP36:UNKNOWN ", "Opcode 0x36 Unknown", 0x36 ),
OP37( "MOT OP37:UNKNOWN ", "Opcode 0x37 Unknown", 0x37 ),
OP38( "MOT OP38:UNKNOWN ", "Opcode 0x38 Unknown", 0x38 ),
OP39( "MOT OP39:UNKNOWN ", "Opcode 0x39 Unknown", 0x39 ),
OP3A( "MOT OP3A:UNKNOWN ", "Opcode 0x3A Unknown", 0x3A ),
OP3B( "MOT OP3B:UNKNOWN ", "Opcode 0x3B Unknown", 0x3B ),
OP3C( "MOT OP3C:UNKNOWN ", "Opcode 0x3C Unknown", 0x3C ),
OP3D( "MOT OP3D:UNKNOWN ", "Opcode 0x3D Unknown", 0x3D ),
OP3E( "MOT OP3E:UNKNOWN ", "Opcode 0x3E Unknown", 0x3E ),
OP3F( "MOT OP3F:UNKNOWN ", "Opcode 0x3F Unknown", 0x3F ),
UNKNOWN( "UNKNOWN OPCODE ", "Unknown", -1 );
private String mLabel;
private String mDescription;

View File

@@ -29,7 +29,6 @@ public class MotorolaTSBKMessage extends TSBKMessage
sb.append( " ENCRYPTED" );
}
sb.append( " OPCD:" );
sb.append( getMotorolaOpcode().getLabel() );
return sb.toString();

View File

@@ -0,0 +1,64 @@
package decode.p25.message.tsbk.motorola;
import alias.AliasList;
import bits.BinaryMessage;
import decode.p25.reference.DataUnitID;
public abstract class PatchGroup extends MotorolaTSBKMessage
{
public static final int[] PATCH_GROUP_ADDRESS = { 80,81,82,83,84,85,86,87,
88,89,90,91,92,93,94,95 };
public static final int[] GROUP_ADDRESS_1 = { 96,97,98,99,100,101,102,103,
104,105,106,107,108,109,110,111 };
public static final int[] GROUP_ADDRESS_2 = { 112,113,114,115,116,117,118,
119,120,121,122,123,124,125,126,127 };
public static final int[] GROUP_ADDRESS_3 = { 128,129,130,131,132,133,134,
135,136,137,138,139,140,141,142,143 };
public PatchGroup( BinaryMessage message, DataUnitID duid,
AliasList aliasList )
{
super( message, duid, aliasList );
}
@Override
public String getMessage()
{
StringBuilder sb = new StringBuilder();
sb.append( getMessageStub() );
sb.append( " PATCH GROUP:" );
sb.append( getPatchGroupAddress() );
sb.append( " GRP1:" );
sb.append( getGroupAddress1() );
sb.append( " GRP2:" );
sb.append( getGroupAddress2() );
sb.append( " GRP3:" );
sb.append( getGroupAddress3() );
return sb.toString();
}
public String getPatchGroupAddress()
{
return mMessage.getHex( PATCH_GROUP_ADDRESS, 4 );
}
public String getGroupAddress1()
{
return mMessage.getHex( GROUP_ADDRESS_1, 4 );
}
public String getGroupAddress2()
{
return mMessage.getHex( GROUP_ADDRESS_2, 4 );
}
public String getGroupAddress3()
{
return mMessage.getHex( GROUP_ADDRESS_3, 4 );
}
}

View File

@@ -0,0 +1,20 @@
package decode.p25.message.tsbk.motorola;
import alias.AliasList;
import bits.BinaryMessage;
import decode.p25.reference.DataUnitID;
public class PatchGroupAdd extends PatchGroup
{
public PatchGroupAdd( BinaryMessage message, DataUnitID duid,
AliasList aliasList )
{
super( message, duid, aliasList );
}
@Override
public String getEventType()
{
return MotorolaOpcode.PATCH_GROUP_ADD.getLabel();
}
}

View File

@@ -0,0 +1,20 @@
package decode.p25.message.tsbk.motorola;
import alias.AliasList;
import bits.BinaryMessage;
import decode.p25.reference.DataUnitID;
public class PatchGroupDelete extends PatchGroup
{
public PatchGroupDelete( BinaryMessage message, DataUnitID duid,
AliasList aliasList )
{
super( message, duid, aliasList );
}
@Override
public String getEventType()
{
return MotorolaOpcode.PATCH_GROUP_DELETE.getLabel();
}
}

View File

@@ -0,0 +1,149 @@
package decode.p25.message.tsbk.motorola;
import alias.AliasList;
import bits.BinaryMessage;
import decode.p25.message.IdentifierProvider;
import decode.p25.message.IdentifierReceiver;
import decode.p25.reference.DataUnitID;
public class PatchGroupVoiceChannelGrant extends MotorolaTSBKMessage
implements IdentifierReceiver
{
/* Service Options */
public static final int EMERGENCY_FLAG = 80;
public static final int ENCRYPTED_CHANNEL_FLAG = 81;
public static final int DUPLEX_MODE = 82;
public static final int SESSION_MODE = 83;
public static final int[] PRIORITY = { 85,86,87 };
public static final int[] CHANNEL = { 88,89,90,91 };
public static final int[] IDENTIFIER = { 92,93,94,95,96,97,98,99,100,101,
102,103 };
public static final int[] PATCH_GROUP_ADDRESS = { 104,105,106,107,108,109,
110,111,112,113,114,115,116,117,118,119 };
public static final int[] SOURCE_ADDRESS = { 120,121,122,123,124,125,126,
127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 };
private IdentifierProvider mIdentifierUpdate;
public PatchGroupVoiceChannelGrant( BinaryMessage message, DataUnitID duid,
AliasList aliasList )
{
super( message, duid, aliasList );
}
@Override
public String getEventType()
{
return MotorolaOpcode.PATCH_GROUP_CHANNEL_GRANT.getLabel();
}
@Override
public String getMessage()
{
StringBuilder sb = new StringBuilder();
sb.append( getMessageStub() );
if( isEmergency() )
{
sb.append( " EMERGENCY" );
}
sb.append( " PATCH GROUP:" );
sb.append( getPatchGroupAddress() );
sb.append( " FROM:" );
sb.append( getSourceAddress() );
sb.append( " PRI:" );
sb.append( getPriority() );
sb.append( " CHAN:" );
sb.append( getChannelIdentifier() + "-" + getChannelNumber() );
sb.append( " DN:" + getDownlinkFrequency() );
sb.append( " UP:" + getUplinkFrequency() );
return sb.toString();
}
public String getPatchGroupAddress()
{
return mMessage.getHex( PATCH_GROUP_ADDRESS, 4 );
}
public String getSourceAddress()
{
return mMessage.getHex( SOURCE_ADDRESS, 6 );
}
public boolean isEmergency()
{
return mMessage.get( EMERGENCY_FLAG );
}
public boolean isEncryptedChannel()
{
return mMessage.get( ENCRYPTED_CHANNEL_FLAG );
}
public DuplexMode getDuplexMode()
{
return mMessage.get( DUPLEX_MODE ) ? DuplexMode.FULL : DuplexMode.HALF;
}
public SessionMode getSessionMode()
{
return mMessage.get( SESSION_MODE ) ?
SessionMode.CIRCUIT : SessionMode.PACKET;
}
/**
* 1 = Lowest, 4 = Default, 7 = Highest
*/
public int getPriority()
{
return mMessage.getInt( PRIORITY );
}
public int getChannelIdentifier()
{
return mMessage.getInt( IDENTIFIER );
}
public int getChannelNumber()
{
return mMessage.getInt( CHANNEL );
}
public String getChannel()
{
return getChannelIdentifier() + "-" + getChannelNumber();
}
@Override
public void setIdentifierMessage( int identifier, IdentifierProvider message )
{
mIdentifierUpdate = message;
}
@Override
public int[] getIdentifiers()
{
int[] identifiers = new int[ 1 ];
identifiers[ 0 ] = getChannelIdentifier();
return identifiers;
}
public long getDownlinkFrequency()
{
return calculateDownlink( mIdentifierUpdate, getChannelNumber() );
}
public long getUplinkFrequency()
{
return calculateUplink( mIdentifierUpdate, getChannelNumber() );
}
}

View File

@@ -0,0 +1,146 @@
package decode.p25.message.tsbk.motorola;
import alias.AliasList;
import bits.BinaryMessage;
import decode.p25.message.IdentifierProvider;
import decode.p25.message.IdentifierReceiver;
import decode.p25.reference.DataUnitID;
public class PatchGroupVoiceChannelGrantUpdate extends MotorolaTSBKMessage
implements IdentifierReceiver
{
public static final int[] CHANNEL_1 = { 80,81,82,83 };
public static final int[] IDENTIFIER_1 = { 84,85,86,87,88,89,90,91,92,93,94,
95 };
public static final int[] PATCH_GROUP_ADDRESS_1 = { 96,97,98,99,100,101,102,
103,104,105,106,107,108,109,110,111 };
public static final int[] CHANNEL_2 = { 112,113,114,115 };
public static final int[] IDENTIFIER_2 = { 116,117,118,119,120,121,122,123,
124,125,126,127 };
public static final int[] PATCH_GROUP_ADDRESS_2 = { 128,129,130,131,132,133,
134,135,136,137,138,139,140,141,142,143 };
private IdentifierProvider mIdentifierUpdate1;
private IdentifierProvider mIdentifierUpdate2;
public PatchGroupVoiceChannelGrantUpdate( BinaryMessage message,
DataUnitID duid, AliasList aliasList )
{
super( message, duid, aliasList );
}
@Override
public String getEventType()
{
return MotorolaOpcode.PATCH_GROUP_CHANNEL_GRANT_UPDATE.getLabel();
}
@Override
public String getMessage()
{
StringBuilder sb = new StringBuilder();
sb.append( getMessageStub() );
sb.append( " PATCH GRP1:" );
sb.append( getPatchGroupAddress1() );
sb.append( " GRP2:" );
sb.append( getPatchGroupAddress2() );
sb.append( " CHAN 1:" );
sb.append( getChannel1() );
sb.append( " DN:" + getDownlinkFrequency1() );
sb.append( " CHAN 2:" );
sb.append( getChannel2() );
sb.append( " DN:" + getDownlinkFrequency2() );
return sb.toString();
}
public String getPatchGroupAddress1()
{
return mMessage.getHex( PATCH_GROUP_ADDRESS_1, 4 );
}
public String getPatchGroupAddress2()
{
return mMessage.getHex( PATCH_GROUP_ADDRESS_2, 4 );
}
public int getChannelIdentifier1()
{
return mMessage.getInt( IDENTIFIER_1 );
}
public int getChannelNumber1()
{
return mMessage.getInt( CHANNEL_1 );
}
public String getChannel1()
{
return getChannelIdentifier1() + "-" + getChannelNumber1();
}
public int getChannelIdentifier2()
{
return mMessage.getInt( IDENTIFIER_2 );
}
public int getChannelNumber2()
{
return mMessage.getInt( CHANNEL_2 );
}
public String getChannel2()
{
return getChannelIdentifier2() + "-" + getChannelNumber2();
}
@Override
public void setIdentifierMessage( int identifier, IdentifierProvider message )
{
if( identifier == getChannelIdentifier1() )
{
mIdentifierUpdate1 = message;
}
if( identifier == getChannelIdentifier2() )
{
mIdentifierUpdate2 = message;
}
}
@Override
public int[] getIdentifiers()
{
int[] identifiers = new int[ 2 ];
identifiers[ 0 ] = getChannelIdentifier1();
identifiers[ 1 ] = getChannelIdentifier2();
return identifiers;
}
public long getDownlinkFrequency1()
{
return calculateDownlink( mIdentifierUpdate1, getChannelNumber1() );
}
public long getUplinkFrequency1()
{
return calculateUplink( mIdentifierUpdate1, getChannelNumber1() );
}
public long getDownlinkFrequency2()
{
return calculateDownlink( mIdentifierUpdate2, getChannelNumber2() );
}
public long getUplinkFrequency2()
{
return calculateUplink( mIdentifierUpdate2, getChannelNumber2() );
}
}

View File

@@ -16,7 +16,7 @@ public class SystemLoading extends MotorolaTSBKMessage
@Override
public String getEventType()
{
return MotorolaOpcode.OP09.getLabel();
return MotorolaOpcode.SYSTEM_LOAD.getLabel();
}
@Override