mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-16 10:37:26 -05:00
P25 More work in progress
This commit is contained in:
@@ -62,7 +62,7 @@ public class AdjacentStatusBroadcast extends TSBKMessage
|
||||
sb.append( " FAILURE-CONDITION" );
|
||||
}
|
||||
|
||||
if( isValid() )
|
||||
if( isValidSiteInformation() )
|
||||
{
|
||||
sb.append( " VALID-INFO" );
|
||||
}
|
||||
@@ -126,31 +126,4 @@ public class AdjacentStatusBroadcast extends TSBKMessage
|
||||
{
|
||||
return mMessage.getInt( SYSTEM_SERVICE_CLASS );
|
||||
}
|
||||
|
||||
public String getSourceAddress()
|
||||
{
|
||||
if( hasAdditionalInformation() && !hasExtendedAddress() )
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFromID()
|
||||
{
|
||||
return getSourceAddress();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToID()
|
||||
{
|
||||
return getTargetAddress();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,12 @@ import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
import decode.p25.reference.Response;
|
||||
|
||||
public class GroupAffiliationResponse extends TSBKMessage
|
||||
{
|
||||
public enum AffiliationStatus { ACCEPT, FAIL, DENY, REFUSED };
|
||||
|
||||
public static final int LOCAL_GLOBAL_AFFILIATION_FLAG = 80;
|
||||
public static final int[] GROUP_AFFILIATION_VALUE = { 86,87 };
|
||||
public static final int[] AFFILIATION_RESPONSE = { 86,87 };
|
||||
public static final int[] ANNOUNCEMENT_GROUP_ADDRESS = { 88,89,90,91,
|
||||
92,93,94,95,96,97,98,99,100,101,102,103 };
|
||||
public static final int[] GROUP_ADDRESS = { 104,105,106,107,108,109,110,111,
|
||||
@@ -38,7 +37,7 @@ public class GroupAffiliationResponse extends TSBKMessage
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( " STATUS:" + getStatus().name() );
|
||||
sb.append( " AFFILIATION:" + getResponse().name() );
|
||||
sb.append( " ANNOUNCE GROUP:" + getAnnouncementGroupAddress() );
|
||||
sb.append( " GRP ADDR:" + getGroupAddress() );
|
||||
sb.append( " TGT ADDR: " + getTargetAddress() );
|
||||
@@ -51,11 +50,11 @@ public class GroupAffiliationResponse extends TSBKMessage
|
||||
return mMessage.get( LOCAL_GLOBAL_AFFILIATION_FLAG) ? " GLOBAL" : " LOCAL";
|
||||
}
|
||||
|
||||
public AffiliationStatus getStatus()
|
||||
public Response getResponse()
|
||||
{
|
||||
int status = mMessage.getInt( GROUP_AFFILIATION_VALUE );
|
||||
int response = mMessage.getInt( AFFILIATION_RESPONSE );
|
||||
|
||||
return AffiliationStatus.values()[ status ];
|
||||
return Response.fromValue( response );
|
||||
}
|
||||
|
||||
public String getAnnouncementGroupAddress()
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
package decode.p25.message.tsbk.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
import decode.p25.reference.Response;
|
||||
|
||||
public class LocationRegistrationResponse extends TSBKMessage
|
||||
{
|
||||
public static final int[] REGISTRATION_RESPONSE = { 86,87 };
|
||||
public static final int[] GROUP_ADDRESS = { 88,89,90,91,92,93,94,95,96,97,
|
||||
98,99,100,101,102,103 };
|
||||
public static final int[] RFSS_ID = { 104,105,106,107,108,109,110,111 };
|
||||
public static final int[] SITE_ID = { 112,113,114,115,116,117,118,119 };
|
||||
public static final int[] TARGET_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 };
|
||||
|
||||
public LocationRegistrationResponse( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.LOCATION_REGISTRATION_RESPONSE.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( " REGISTRATION:" + getResponse().name() );
|
||||
sb.append( " GROUP:" + getGroupAddress() );
|
||||
sb.append( " RFSS: " + getRFSSID() );
|
||||
sb.append( " SITE: " + getSiteID() );
|
||||
sb.append( " TGT ADDR: " + getTargetAddress() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public Response getResponse()
|
||||
{
|
||||
return Response.fromValue( mMessage.getInt( REGISTRATION_RESPONSE ) );
|
||||
}
|
||||
|
||||
public String getGroupAddress()
|
||||
{
|
||||
return mMessage.getHex( GROUP_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
public String getRFSSID()
|
||||
{
|
||||
return mMessage.getHex( RFSS_ID, 2 );
|
||||
}
|
||||
|
||||
public String getSiteID()
|
||||
{
|
||||
return mMessage.getHex( SITE_ID, 2 );
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToID()
|
||||
{
|
||||
return getTargetAddress();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package decode.p25.message.tsbk.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class RFSSStatusBroadcast extends TSBKMessage
|
||||
{
|
||||
public static final int[] LOCATION_REGISTRATION_AREA = { 80,81,82,83,84,85,
|
||||
86,87 };
|
||||
public static final int ACTIVE_NETWORK_CONNECTION_FLAG = 91;
|
||||
public static final int[] SYSTEM_ID = { 92,93,94,95,96,97,98,99,100,101,
|
||||
102,103 };
|
||||
public static final int[] RFSS_ID = { 104,105,106,107,108,109,110,111 };
|
||||
public static final int[] SITE_ID = { 112,113,114,115,116,117,118,119 };
|
||||
public static final int[] CHANNEL = { 120,121,122,123,124,125,126,127,
|
||||
128,129,130,131,132,133,134,135 };
|
||||
public static final int[] SYSTEM_SERVICE_CLASS = { 136,137,138,139,140,141,
|
||||
142,143 };
|
||||
|
||||
public RFSSStatusBroadcast( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.RFSS_STATUS_BROADCAST.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( " LRA:" + getLocationRegistrationArea() );
|
||||
|
||||
sb.append( " SYSID:" + getSystemID() );
|
||||
|
||||
sb.append( " RFSS:" + getRFSS() );
|
||||
|
||||
sb.append( " SITE:" + getSiteID() );
|
||||
|
||||
sb.append( " CHAN:" + getChannel() );
|
||||
|
||||
if( hasActiveNetworkConnection() )
|
||||
{
|
||||
sb.append( " ACTIVE-NETWORK-CONN" );
|
||||
}
|
||||
|
||||
sb.append( SystemService.toString( getSystemServiceClass() ) );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getLocationRegistrationArea()
|
||||
{
|
||||
return mMessage.getHex( LOCATION_REGISTRATION_AREA, 2 );
|
||||
}
|
||||
|
||||
public boolean hasActiveNetworkConnection()
|
||||
{
|
||||
return mMessage.get( ACTIVE_NETWORK_CONNECTION_FLAG );
|
||||
}
|
||||
|
||||
public String getSystemID()
|
||||
{
|
||||
return mMessage.getHex( SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getRFSS()
|
||||
{
|
||||
return mMessage.getHex( RFSS_ID, 2 );
|
||||
}
|
||||
|
||||
public String getSiteID()
|
||||
{
|
||||
return mMessage.getHex( SITE_ID, 2 );
|
||||
}
|
||||
|
||||
public int getChannel()
|
||||
{
|
||||
return mMessage.getInt( CHANNEL );
|
||||
}
|
||||
|
||||
public int getSystemServiceClass()
|
||||
{
|
||||
return mMessage.getInt( SYSTEM_SERVICE_CLASS );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package decode.p25.message.tsbk.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class RadioUnitMonitorCommand extends TSBKMessage
|
||||
{
|
||||
public static final int[] TX_MULTIPLIER = { 94,95 };
|
||||
public static final int[] SOURCE_ADDRESS = { 96,97,98,99,100,101,102,103,
|
||||
104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119 };
|
||||
public static final int[] TARGET_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 };
|
||||
|
||||
public RadioUnitMonitorCommand( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.RADIO_UNIT_MONITOR_COMMAND.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( " MULT:" + getTransmitMultiplier() );
|
||||
sb.append( " SRC ADDR: " + getSourceAddress() );
|
||||
sb.append( " TGT ADDR: " + getTargetAddress() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public int getTransmitMultiplier()
|
||||
{
|
||||
return mMessage.getInt( TX_MULTIPLIER );
|
||||
}
|
||||
|
||||
public String getSourceAddress()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFromID()
|
||||
{
|
||||
return getSourceAddress();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToID()
|
||||
{
|
||||
return getTargetAddress();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package decode.p25.message.tsbk.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
import decode.p25.reference.Response;
|
||||
import decode.p25.reference.StackOperation;
|
||||
|
||||
public class RoamingAddressCommand extends TSBKMessage
|
||||
{
|
||||
public static final int[] STACK_OPERATION = { 80,81,82,83,84,85,86,87 };
|
||||
public static final int[] WACN = { 88,89,90,91,92,93,94,95,96,97,98,99,100,
|
||||
101,102,103,104,105,106,107 };
|
||||
public static final int[] SYSTEM_ID = { 108,109,110,111,112,113,114,115,116,
|
||||
117,118,119 };
|
||||
public static final int[] TARGET_ID = { 120,121,122,123,124,125,126,127,128,
|
||||
129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 };
|
||||
|
||||
public RoamingAddressCommand( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.ROAMING_ADDRESS_COMMAND.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( getStackOperation().name() );
|
||||
sb.append( " WACN:" + getWACN() );
|
||||
sb.append( " SYSTEM: " + getSystemID() );
|
||||
sb.append( " TGT ID: " + getTargetID() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public StackOperation getStackOperation()
|
||||
{
|
||||
return StackOperation.fromValue( mMessage.getInt( STACK_OPERATION ) );
|
||||
}
|
||||
|
||||
public String getWACN()
|
||||
{
|
||||
return mMessage.getHex( WACN, 5 );
|
||||
}
|
||||
|
||||
public String getSystemID()
|
||||
{
|
||||
return mMessage.getHex( SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getTargetID()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ID, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToID()
|
||||
{
|
||||
return getTargetID();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package decode.p25.message.tsbk.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class SecondaryControlChannelBroadcast extends TSBKMessage
|
||||
{
|
||||
public static final int[] RFSS_ID = { 80,81,82,83,84,85,86,87 };
|
||||
public static final int[] SITE_ID = { 88,89,90,91,92,93,94,95 };
|
||||
public static final int[] CHANNEL_1 = { 96,97,98,99,100,101,102,103,104,105,
|
||||
106,107,108,109,110,111 };
|
||||
public static final int[] SYSTEM_SERVICE_CLASS_1 = { 112,113,114,115,116,
|
||||
117,118,119 };
|
||||
public static final int[] CHANNEL_2 = { 120,121,122,123,124,125,126,127,
|
||||
128,129,130,131,132,133,134,135 };
|
||||
public static final int[] SYSTEM_SERVICE_CLASS_2 = { 136,137,138,139,140,
|
||||
141,142,143 };
|
||||
|
||||
public SecondaryControlChannelBroadcast( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.SECONDARY_CONTROL_CHANNEL_BROADCAST.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( " RFSS:" + getRFSS() );
|
||||
|
||||
sb.append( " SITE:" + getSiteID() );
|
||||
|
||||
sb.append( " CHAN 1:" + getChannel1() );
|
||||
|
||||
sb.append( " SVC CLASS 1:" +
|
||||
SystemService.toString( getSystemServiceClass1() ) );
|
||||
|
||||
if( hasChannel2() )
|
||||
{
|
||||
sb.append( " CHAN 2:" + getChannel2() );
|
||||
|
||||
sb.append( " SVC CLASS 2:" +
|
||||
SystemService.toString( getSystemServiceClass2() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.append( " CHAN 2: empty" );
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getRFSS()
|
||||
{
|
||||
return mMessage.getHex( RFSS_ID, 2 );
|
||||
}
|
||||
|
||||
public String getSiteID()
|
||||
{
|
||||
return mMessage.getHex( SITE_ID, 2 );
|
||||
}
|
||||
|
||||
public int getChannel1()
|
||||
{
|
||||
return mMessage.getInt( CHANNEL_1 );
|
||||
}
|
||||
|
||||
public int getSystemServiceClass1()
|
||||
{
|
||||
return mMessage.getInt( SYSTEM_SERVICE_CLASS_1 );
|
||||
}
|
||||
|
||||
public int getChannel2()
|
||||
{
|
||||
return mMessage.getInt( CHANNEL_2 );
|
||||
}
|
||||
|
||||
public int getSystemServiceClass2()
|
||||
{
|
||||
return mMessage.getInt( SYSTEM_SERVICE_CLASS_2 );
|
||||
}
|
||||
|
||||
public boolean hasChannel2()
|
||||
{
|
||||
return getSystemServiceClass2() != 0;
|
||||
}
|
||||
}
|
||||
62
src/decode/p25/message/tsbk/osp/control/StatusQuery.java
Normal file
62
src/decode/p25/message/tsbk/osp/control/StatusQuery.java
Normal file
@@ -0,0 +1,62 @@
|
||||
package decode.p25.message.tsbk.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class StatusQuery extends TSBKMessage
|
||||
{
|
||||
public static final int[] TARGET_ADDRESS = { 96,97,98,99,100,101,102,103,
|
||||
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 };
|
||||
|
||||
public StatusQuery( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.STATUS_QUERY.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( " SRC ADDR: " + getSourceAddress() );
|
||||
sb.append( " TGT ADDR: " + getTargetAddress() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getSourceAddress()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFromID()
|
||||
{
|
||||
return getSourceAddress();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToID()
|
||||
{
|
||||
return getTargetAddress();
|
||||
}
|
||||
}
|
||||
76
src/decode/p25/message/tsbk/osp/control/StatusUpdate.java
Normal file
76
src/decode/p25/message/tsbk/osp/control/StatusUpdate.java
Normal file
@@ -0,0 +1,76 @@
|
||||
package decode.p25.message.tsbk.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class StatusUpdate extends TSBKMessage
|
||||
{
|
||||
public static final int[] USER_STATUS = { 80,81,82,83,84,85,86,87 };
|
||||
public static final int[] UNIT_STATUS = { 88,89,90,91,92,93,94,95 };
|
||||
public static final int[] TARGET_ADDRESS = { 96,97,98,99,100,101,102,103,
|
||||
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 };
|
||||
|
||||
public StatusUpdate( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.STATUS_QUERY.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( " STATUS USER:" + getUserStatus() );
|
||||
sb.append( " UNIT:" + getUnitStatus() );
|
||||
sb.append( " SRC ADDR: " + getSourceAddress() );
|
||||
sb.append( " TGT ADDR: " + getTargetAddress() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getUserStatus()
|
||||
{
|
||||
return mMessage.getHex( USER_STATUS, 2 );
|
||||
}
|
||||
|
||||
public String getUnitStatus()
|
||||
{
|
||||
return mMessage.getHex( UNIT_STATUS, 2 );
|
||||
}
|
||||
|
||||
public String getSourceAddress()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFromID()
|
||||
{
|
||||
return getSourceAddress();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToID()
|
||||
{
|
||||
return getTargetAddress();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package decode.p25.message.tsbk.osp.control;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
import decode.p25.reference.Service;
|
||||
|
||||
public class SystemServiceBroadcast extends TSBKMessage
|
||||
{
|
||||
public static final int[] AVAILABLE_SERVICES = { 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[] SUPPORTED_SERVICES = { 112,113,114,115,116,117,
|
||||
118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135 };
|
||||
public static final int[] REQUEST_PRIORITY_LEVEL = { 136,137,138,139,140,
|
||||
141,142,143 };
|
||||
|
||||
public SystemServiceBroadcast( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.SYSTEM_SERVICE_BROADCAST.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( " SERVICES AVAILABLE " );
|
||||
|
||||
sb.append( getAvailableServices() );
|
||||
|
||||
sb.append( " SUPPORTED " );
|
||||
|
||||
sb.append( getSupportedServices() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public List<Service> getAvailableServices()
|
||||
{
|
||||
long bitmap = mMessage.getLong( AVAILABLE_SERVICES );
|
||||
|
||||
return Service.getServices( bitmap );
|
||||
}
|
||||
|
||||
public List<Service> getSupportedServices()
|
||||
{
|
||||
long bitmap = mMessage.getLong( SUPPORTED_SERVICES );
|
||||
|
||||
return Service.getServices( bitmap );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package decode.p25.message.tsbk.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
import decode.p25.reference.Response;
|
||||
|
||||
public class UnitDeregistrationAcknowledge extends TSBKMessage
|
||||
{
|
||||
public static final int[] WACN = { 88,89,90,91,92,93,94,95,96,97,98,99,100,
|
||||
101,102,103,104,105,106,107 };
|
||||
public static final int[] SYSTEM_ID = { 108,109,110,111,112,113,114,115,
|
||||
116,117,118,119 };
|
||||
public static final int[] SOURCE_ID = { 120,121,122,123,124,125,126,
|
||||
127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143 };
|
||||
|
||||
public UnitDeregistrationAcknowledge( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.UNIT_DEREGISTRATION_ACKNOWLEDGE.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( " WACN:" + getWACN() );
|
||||
sb.append( " SYSTEM:" + getSystemID() );
|
||||
sb.append( " SRC ID: " + getSourceID() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getWACN()
|
||||
{
|
||||
return mMessage.getHex( WACN, 5 );
|
||||
}
|
||||
|
||||
public String getSystemID()
|
||||
{
|
||||
return mMessage.getHex( SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getSourceID()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ID, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToID()
|
||||
{
|
||||
return getSourceID();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package decode.p25.message.tsbk.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class UnitRegistrationCommand extends TSBKMessage
|
||||
{
|
||||
public static final int[] TARGET_ADDRESS = { 96,97,98,99,100,101,102,103,
|
||||
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 };
|
||||
|
||||
public UnitRegistrationCommand( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.UNIT_REGISTRATION_COMMAND.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( " SRC ADDR: " + getSourceAddress() );
|
||||
sb.append( " TGT ADDR: " + getTargetAddress() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getSourceAddress()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFromID()
|
||||
{
|
||||
return getSourceAddress();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToID()
|
||||
{
|
||||
return getTargetAddress();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package decode.p25.message.tsbk.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.tsbk.TSBKMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
import decode.p25.reference.Response;
|
||||
|
||||
public class UnitRegistrationResponse extends TSBKMessage
|
||||
{
|
||||
public static final int[] REGISTRATION_RESPONSE = { 82,83 };
|
||||
public static final int[] SYSTEM_ID = { 84,85,86,87,88,89,90,91,92,93,94,95 };
|
||||
public static final int[] SOURCE_ID = { 96,97,98,99,100,101,102,103,
|
||||
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 };
|
||||
|
||||
public UnitRegistrationResponse( BitSetBuffer message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.UNIT_REGISTRATION_RESPONSE.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( super.getMessage() );
|
||||
|
||||
sb.append( " REGISTRATION:" + getResponse().name() );
|
||||
sb.append( " SYSTEM:" + getSystemID() );
|
||||
sb.append( " SRC ID: " + getSourceID() );
|
||||
sb.append( " SRC ADDR: " + getSourceAddress() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public Response getResponse()
|
||||
{
|
||||
return Response.fromValue( mMessage.getInt( REGISTRATION_RESPONSE ) );
|
||||
}
|
||||
|
||||
public String getSystemID()
|
||||
{
|
||||
return mMessage.getHex( SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getSourceID()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ID, 6 );
|
||||
}
|
||||
|
||||
public String getSourceAddress()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToID()
|
||||
{
|
||||
return getSourceAddress();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user