mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 01:27:34 -05:00
P25 - Updates to Motorola TSBK messages
This commit is contained in:
@@ -2,8 +2,7 @@ package decode.p25.message.tsbk;
|
|||||||
|
|
||||||
import alias.AliasList;
|
import alias.AliasList;
|
||||||
import bits.BinaryMessage;
|
import bits.BinaryMessage;
|
||||||
import decode.p25.message.tsbk.motorola.ChannelCWIDUpdate;
|
import decode.p25.message.tsbk.motorola.ControlChannelBaseStationIdentification;
|
||||||
import decode.p25.message.tsbk.motorola.CongestionHoldOffTimer;
|
|
||||||
import decode.p25.message.tsbk.motorola.MotorolaOpcode;
|
import decode.p25.message.tsbk.motorola.MotorolaOpcode;
|
||||||
import decode.p25.message.tsbk.motorola.MotorolaTSBKMessage;
|
import decode.p25.message.tsbk.motorola.MotorolaTSBKMessage;
|
||||||
import decode.p25.message.tsbk.motorola.PatchGroupAdd;
|
import decode.p25.message.tsbk.motorola.PatchGroupAdd;
|
||||||
@@ -12,6 +11,7 @@ import decode.p25.message.tsbk.motorola.PatchGroupVoiceChannelGrant;
|
|||||||
import decode.p25.message.tsbk.motorola.PatchGroupVoiceChannelGrantUpdate;
|
import decode.p25.message.tsbk.motorola.PatchGroupVoiceChannelGrantUpdate;
|
||||||
import decode.p25.message.tsbk.motorola.PlannedControlChannnelShutdown;
|
import decode.p25.message.tsbk.motorola.PlannedControlChannnelShutdown;
|
||||||
import decode.p25.message.tsbk.motorola.SystemLoading;
|
import decode.p25.message.tsbk.motorola.SystemLoading;
|
||||||
|
import decode.p25.message.tsbk.motorola.TrafficChannelBaseStationIdentification;
|
||||||
import decode.p25.message.tsbk.osp.control.AcknowledgeResponse;
|
import decode.p25.message.tsbk.osp.control.AcknowledgeResponse;
|
||||||
import decode.p25.message.tsbk.osp.control.AdjacentStatusBroadcast;
|
import decode.p25.message.tsbk.osp.control.AdjacentStatusBroadcast;
|
||||||
import decode.p25.message.tsbk.osp.control.AuthenticationCommand;
|
import decode.p25.message.tsbk.osp.control.AuthenticationCommand;
|
||||||
@@ -207,10 +207,8 @@ public class TSBKMessageFactory
|
|||||||
{
|
{
|
||||||
case CCH_PLANNED_SHUTDOWN:
|
case CCH_PLANNED_SHUTDOWN:
|
||||||
return new PlannedControlChannnelShutdown( message, duid, aliasList );
|
return new PlannedControlChannnelShutdown( message, duid, aliasList );
|
||||||
case CWID_UPDATE:
|
case CONTROL_CHANNEL_ID:
|
||||||
return new ChannelCWIDUpdate( message, duid, aliasList );
|
return new ControlChannelBaseStationIdentification( message, duid, aliasList );
|
||||||
case CONGESTION_HOLD_OFF_TIMER:
|
|
||||||
return new CongestionHoldOffTimer( message, duid, aliasList );
|
|
||||||
case PATCH_GROUP_ADD:
|
case PATCH_GROUP_ADD:
|
||||||
return new PatchGroupAdd( message, duid, aliasList );
|
return new PatchGroupAdd( message, duid, aliasList );
|
||||||
case PATCH_GROUP_DELETE:
|
case PATCH_GROUP_DELETE:
|
||||||
@@ -221,6 +219,8 @@ public class TSBKMessageFactory
|
|||||||
return new PatchGroupVoiceChannelGrantUpdate( message, duid, aliasList );
|
return new PatchGroupVoiceChannelGrantUpdate( message, duid, aliasList );
|
||||||
case SYSTEM_LOAD:
|
case SYSTEM_LOAD:
|
||||||
return new SystemLoading( message, duid, aliasList );
|
return new SystemLoading( message, duid, aliasList );
|
||||||
|
case TRAFFIC_CHANNEL_ID:
|
||||||
|
return new TrafficChannelBaseStationIdentification( message, duid, aliasList );
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
package decode.p25.message.tsbk.motorola;
|
|
||||||
|
|
||||||
import alias.AliasList;
|
|
||||||
import bits.BinaryMessage;
|
|
||||||
import decode.p25.reference.DataUnitID;
|
|
||||||
|
|
||||||
public class CongestionHoldOffTimer extends MotorolaTSBKMessage
|
|
||||||
{
|
|
||||||
public CongestionHoldOffTimer( BinaryMessage message,
|
|
||||||
DataUnitID duid,
|
|
||||||
AliasList aliasList )
|
|
||||||
{
|
|
||||||
super( message, duid, aliasList );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getEventType()
|
|
||||||
{
|
|
||||||
return MotorolaOpcode.CONGESTION_HOLD_OFF_TIMER.getDescription();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMessage()
|
|
||||||
{
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
|
|
||||||
sb.append( getMessageStub() );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,7 @@ import decode.p25.message.IBandIdentifier;
|
|||||||
import decode.p25.message.IdentifierReceiver;
|
import decode.p25.message.IdentifierReceiver;
|
||||||
import decode.p25.reference.DataUnitID;
|
import decode.p25.reference.DataUnitID;
|
||||||
|
|
||||||
public class ChannelCWIDUpdate extends MotorolaTSBKMessage
|
public class ControlChannelBaseStationIdentification extends MotorolaTSBKMessage
|
||||||
implements IdentifierReceiver
|
implements IdentifierReceiver
|
||||||
{
|
{
|
||||||
public static final int[] CHARACTER_1 = { 80,81,82,83,84,85 };
|
public static final int[] CHARACTER_1 = { 80,81,82,83,84,85 };
|
||||||
@@ -24,7 +24,7 @@ public class ChannelCWIDUpdate extends MotorolaTSBKMessage
|
|||||||
|
|
||||||
private IBandIdentifier mIdentifierUpdate;
|
private IBandIdentifier mIdentifierUpdate;
|
||||||
|
|
||||||
public ChannelCWIDUpdate( BinaryMessage message,
|
public ControlChannelBaseStationIdentification( BinaryMessage message,
|
||||||
DataUnitID duid,
|
DataUnitID duid,
|
||||||
AliasList aliasList )
|
AliasList aliasList )
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,7 @@ public class ChannelCWIDUpdate extends MotorolaTSBKMessage
|
|||||||
@Override
|
@Override
|
||||||
public String getEventType()
|
public String getEventType()
|
||||||
{
|
{
|
||||||
return MotorolaOpcode.CWID_UPDATE.getDescription();
|
return MotorolaOpcode.CONTROL_CHANNEL_ID.getDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMessage()
|
public String getMessage()
|
||||||
@@ -7,13 +7,13 @@ public enum MotorolaOpcode
|
|||||||
PATCH_GROUP_CHANNEL_GRANT( "PATCH VOICE CHANNEL GRANT", "PATCH VOICE CHANNEL GRANT", 0x02 ),
|
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 ),
|
PATCH_GROUP_CHANNEL_GRANT_UPDATE( "PATCH VOICE CHANNEL UPDATE", "PATCH VOICE CHANNEL GRANT UPDATE", 0x03 ),
|
||||||
OP04( "MOT OP04:UNKNOWN", "Opcode 0x04 Unknown", 0x04 ),
|
OP04( "MOT OP04:UNKNOWN", "Opcode 0x04 Unknown", 0x04 ),
|
||||||
CONGESTION_HOLD_OFF_TIMER( "CONGESTION HOLD-OFF TIMER", "CONGESTION HOLD-OFF TIMER", 0x05 ),
|
TRAFFIC_CHANNEL_ID( "TRAFFIC CHAN STATION ID", "TRAFFIC CHAN STATION ID", 0x05 ),
|
||||||
OP06( "MOT OP06:UNKNOWN ", "Opcode 0x06 Unknown", 0x06 ),
|
OP06( "MOT OP06:UNKNOWN ", "Opcode 0x06 Unknown", 0x06 ),
|
||||||
OP07( "MOT OP07:UNKNOWN ", "Opcode 0x07 Unknown", 0x07 ),
|
OP07( "MOT OP07:UNKNOWN ", "Opcode 0x07 Unknown", 0x07 ),
|
||||||
OP08( "MOT OP08:UNKNOWN ", "Opcode 0x08 Unknown", 0x08 ),
|
OP08( "MOT OP08:UNKNOWN ", "Opcode 0x08 Unknown", 0x08 ),
|
||||||
SYSTEM_LOAD( "SYSTEM LOADING", "SYSTEM LOAD", 0x09 ),
|
SYSTEM_LOAD( "SYSTEM LOADING", "SYSTEM LOAD", 0x09 ),
|
||||||
OP0A( "OP0A:UNKNOWN ", "Opcode 0x0A Unknown", 0x0A ),
|
OP0A( "OP0A:UNKNOWN ", "Opcode 0x0A Unknown", 0x0A ),
|
||||||
CWID_UPDATE( "FCC CWID UPDATE", "FCC CWID CALLSIGN", 0x0B ),
|
CONTROL_CHANNEL_ID( "CONTROL CHAN BASE STATION ID", "CONTROL CHAN BASE STATION ID", 0x0B ),
|
||||||
OP0C( "MOT OP0C:UNKNOWN ", "Opcode 0x0C Unknown", 0x0C ),
|
OP0C( "MOT OP0C:UNKNOWN ", "Opcode 0x0C Unknown", 0x0C ),
|
||||||
OP0D( "MOT OP0D:UNKNOWN ", "Opcode 0x0D Unknown", 0x0D ),
|
OP0D( "MOT OP0D:UNKNOWN ", "Opcode 0x0D Unknown", 0x0D ),
|
||||||
CCH_PLANNED_SHUTDOWN( "PLANNED CONTROL CHANNEL SHUTDOWN ", "PLANNED CONTROL CHANNEL SHUTDOWN", 0x0E ),
|
CCH_PLANNED_SHUTDOWN( "PLANNED CONTROL CHANNEL SHUTDOWN ", "PLANNED CONTROL CHANNEL SHUTDOWN", 0x0E ),
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package decode.p25.message.tsbk.motorola;
|
||||||
|
|
||||||
|
import alias.AliasList;
|
||||||
|
import bits.BinaryMessage;
|
||||||
|
import decode.p25.reference.DataUnitID;
|
||||||
|
|
||||||
|
public class TrafficChannelBaseStationIdentification extends MotorolaTSBKMessage
|
||||||
|
{
|
||||||
|
public static final int[] CHARACTER_1 = { 80,81,82,83,84,85 };
|
||||||
|
public static final int[] CHARACTER_2 = { 86,87,88,89,90,91 };
|
||||||
|
public static final int[] CHARACTER_3 = { 92,93,94,95,96,97 };
|
||||||
|
public static final int[] CHARACTER_4 = { 98,99,100,101,102,103 };
|
||||||
|
public static final int[] CHARACTER_5 = { 104,105,106,107,108,109 };
|
||||||
|
public static final int[] CHARACTER_6 = { 110,111,112,113,114,115 };
|
||||||
|
public static final int[] CHARACTER_7 = { 116,117,118,119,120,121 };
|
||||||
|
public static final int[] CHARACTER_8 = { 122,123,124,125,126,127 };
|
||||||
|
|
||||||
|
public TrafficChannelBaseStationIdentification( BinaryMessage message,
|
||||||
|
DataUnitID duid,
|
||||||
|
AliasList aliasList )
|
||||||
|
{
|
||||||
|
super( message, duid, aliasList );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getEventType()
|
||||||
|
{
|
||||||
|
return MotorolaOpcode.TRAFFIC_CHANNEL_ID.getDescription();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage()
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
sb.append( getMessageStub() );
|
||||||
|
|
||||||
|
sb.append( " ID:" + getID() );
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getID()
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
sb.append( getCharacter( CHARACTER_1 ) );
|
||||||
|
sb.append( getCharacter( CHARACTER_2 ) );
|
||||||
|
sb.append( getCharacter( CHARACTER_3 ) );
|
||||||
|
sb.append( getCharacter( CHARACTER_4 ) );
|
||||||
|
sb.append( getCharacter( CHARACTER_5 ) );
|
||||||
|
sb.append( getCharacter( CHARACTER_6 ) );
|
||||||
|
sb.append( getCharacter( CHARACTER_7 ) );
|
||||||
|
sb.append( getCharacter( CHARACTER_8 ) );
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getCharacter( int[] field )
|
||||||
|
{
|
||||||
|
int value = mMessage.getInt( field );
|
||||||
|
|
||||||
|
if( value != 0 )
|
||||||
|
{
|
||||||
|
return String.valueOf( (char)( value + 43 ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user