mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-17 02:57:35 -05:00
P25 work in progress
This commit is contained in:
@@ -0,0 +1,155 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
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 AdjacentStatusBroadcastExtended 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[] RF_SUBSYSTEM_ID = { 128,129,130,131,132,133,134,
|
||||
135 };
|
||||
public static final int[] SITE_ID = { 136,137,138,139,140,141,142,143 };
|
||||
public static final int[] TRANSMIT_IDENTIFIER = { 160,161,162,163 };
|
||||
public static final int[] TRANSMIT_CHANNEL = { 164,165,166,167,168,169,170,
|
||||
171,172,173,174,175 };
|
||||
public static final int[] RECEIVE_IDENTIFIER = { 176,177,178,179 };
|
||||
public static final int[] RECEIVE_CHANNEL = { 180,181,182,183,184,185,186,
|
||||
187,188,189,190,191 };
|
||||
public static final int[] SYSTEM_SERVICE_CLASS = { 192,193,194,195,196,197,
|
||||
198,199 };
|
||||
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 AdjacentStatusBroadcastExtended( BitSetBuffer message,
|
||||
DataUnitID duid, AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.ADJACENT_STATUS_BROADCAST.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
sb.append( " LRA:" + getLocationRegistrationArea() );
|
||||
|
||||
sb.append( " SYS:" + getSystemID() );
|
||||
|
||||
sb.append( " RFSS:" + getRFSubsystemID() );
|
||||
|
||||
sb.append( " SITE:" + 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 String getSystemID()
|
||||
{
|
||||
return mMessage.getHex( SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getRFSubsystemID()
|
||||
{
|
||||
return mMessage.getHex( RF_SUBSYSTEM_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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class CallAlertExtended extends PDUMessage
|
||||
{
|
||||
public static final int[] TARGET_ADDRESS = { 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[] WACN = { 128,129,130,131,132,133,134,135,136,137,
|
||||
138,139,140,141,142,143,160,161,162,163 };
|
||||
public static final int[] SYSTEM_ID = { 164,165,166,167,168,169,170,171,172,
|
||||
173,174,175 };
|
||||
public static final int[] SOURCE_ID = { 176,177,178,179,180,181,182,183,184,
|
||||
185,186,187,188,189,190,191,192,193,194,195,196,197,198,199 };
|
||||
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 };
|
||||
|
||||
public CallAlertExtended( BitSetBuffer message,
|
||||
DataUnitID duid, AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.CALL_ALERT.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
sb.append( " FROM:" );
|
||||
sb.append( getSourceID() );
|
||||
|
||||
sb.append( " TO:" );
|
||||
sb.append( getTargetAddress() );
|
||||
|
||||
sb.append( " WACN:" );
|
||||
sb.append( getWACN() );
|
||||
|
||||
sb.append( " SYS:" );
|
||||
sb.append( getSystemID() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
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 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class GroupAffiliationQueryExtended extends PDUMessage
|
||||
{
|
||||
public static final int[] TARGET_ADDRESS = { 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[] WACN = { 128,129,130,131,132,133,134,135,136,137,
|
||||
138,139,140,141,142,143,160,161,162,163 };
|
||||
public static final int[] SYSTEM_ID = { 164,165,166,167,168,169,170,171,172,
|
||||
173,174,175 };
|
||||
public static final int[] SOURCE_ID = { 176,177,178,179,180,181,182,183,184,
|
||||
185,186,187,188,189,190,191,192,193,194,195,196,197,198,199 };
|
||||
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 };
|
||||
|
||||
public GroupAffiliationQueryExtended( BitSetBuffer message,
|
||||
DataUnitID duid, AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.GROUP_AFFILIATION_QUERY.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
sb.append( " FROM:" );
|
||||
sb.append( getSourceID() );
|
||||
|
||||
sb.append( " TO:" );
|
||||
sb.append( getTargetAddress() );
|
||||
|
||||
sb.append( " WACN:" );
|
||||
sb.append( getWACN() );
|
||||
|
||||
sb.append( " SYS:" );
|
||||
sb.append( getSystemID() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
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 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
import decode.p25.reference.Response;
|
||||
|
||||
public class GroupAffiliationResponseExtended extends PDUMessage
|
||||
{
|
||||
public static final int[] TARGET_ADDRESS = { 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[] SOURCE_WACN = { 128,129,130,131,132,133,134,135,
|
||||
136,137,138,139,140,141,142,143,160,161,162,163 };
|
||||
public static final int[] SOURCE_SYSTEM_ID = { 164,165,166,167,168,169,170,
|
||||
171,172,173,174,175 };
|
||||
public static final int[] SOURCE_ID = { 176,177,178,179,180,181,182,183,184,
|
||||
185,186,187,188,189,190,191,192,193,194,195,196,197,198,199 };
|
||||
public static final int[] GROUP_WACN = { 200,201,202,203,204,205,206,207,
|
||||
208,209,210,211,212,213,214,215,216,217,218,219 };
|
||||
public static final int[] GROUP_SYSTEM_ID = { 220,221,222,223,224,225,226,
|
||||
227,228,229,230,231 };
|
||||
public static final int[] GROUP_ID = { 232,233,234,235,236,237,238,239,240,
|
||||
241,242,243,244,245,246,247 };
|
||||
public static final int[] ANNOUNCEMENT_GROUP_ID = { 248,249,250,251,252,253,
|
||||
254,255,256,257,258,259,260,261,262,263 };
|
||||
public static final int[] GROUP_AFFILIATION_RESPONSE_VALUE = { 270,271 };
|
||||
public static final int[] MULTIPLE_BLOCK_CRC = { 320,321,322,323,324,325,
|
||||
326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,
|
||||
343,344,345,346,347,348,349,350,351 };
|
||||
|
||||
public GroupAffiliationResponseExtended( BitSetBuffer message,
|
||||
DataUnitID duid, AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.GROUP_AFFILIATION_RESPONSE.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
sb.append( "AFFILIATION:" );
|
||||
sb.append( getGroupAffiliationResponse().name() );
|
||||
|
||||
sb.append( " TO:" );
|
||||
sb.append( getTargetAddress() );
|
||||
|
||||
sb.append( " FROM:" );
|
||||
sb.append( getSourceID() );
|
||||
|
||||
sb.append( " WACN:" );
|
||||
sb.append( getSourceWACN() );
|
||||
|
||||
sb.append( " SYS:" );
|
||||
sb.append( getSourceSystemID() );
|
||||
|
||||
sb.append( " GROUP:" );
|
||||
sb.append( getGroupID() );
|
||||
|
||||
sb.append( " WACN:" );
|
||||
sb.append( getGroupWACN() );
|
||||
|
||||
sb.append( " SYS:" );
|
||||
sb.append( getGroupSystemID() );
|
||||
|
||||
sb.append( " ANNOUNCEMENT GROUP:" );
|
||||
sb.append( getAnnouncementGroupID() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
public String getSourceWACN()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_WACN, 5 );
|
||||
}
|
||||
|
||||
public String getSourceSystemID()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getSourceID()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ID, 6 );
|
||||
}
|
||||
|
||||
public String getGroupWACN()
|
||||
{
|
||||
return mMessage.getHex( GROUP_WACN, 5 );
|
||||
}
|
||||
|
||||
public String getGroupSystemID()
|
||||
{
|
||||
return mMessage.getHex( GROUP_SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getGroupID()
|
||||
{
|
||||
return mMessage.getHex( GROUP_ID, 4 );
|
||||
}
|
||||
|
||||
public String getAnnouncementGroupID()
|
||||
{
|
||||
return mMessage.getHex( GROUP_ID, 4 );
|
||||
}
|
||||
|
||||
public Response getGroupAffiliationResponse()
|
||||
{
|
||||
return Response.fromValue(
|
||||
mMessage.getInt( GROUP_AFFILIATION_RESPONSE_VALUE ) );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class MessageUpdateExtended extends PDUMessage
|
||||
{
|
||||
public static final int[] TARGET_ADDRESS = { 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[] SOURCE_WACN = { 128,129,130,131,132,133,134,135,136,137,
|
||||
138,139,140,141,142,143,160,161,162,163 };
|
||||
public static final int[] SOURCE_SYSTEM_ID = { 164,165,166,167,168,169,170,171,172,
|
||||
173,174,175 };
|
||||
public static final int[] SOURCE_ID = { 176,177,178,179,180,181,182,183,184,
|
||||
185,186,187,188,189,190,191,192,193,194,195,196,197,198,199 };
|
||||
public static final int[] SHORT_DATA_MESSAGE = { 200,201,202,203,204,205,
|
||||
206,207,208,209,210,211,212,213,214,215 };
|
||||
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 };
|
||||
|
||||
public MessageUpdateExtended( BitSetBuffer message,
|
||||
DataUnitID duid, AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.CALL_ALERT.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
sb.append( " TO:" );
|
||||
sb.append( getTargetAddress() );
|
||||
|
||||
sb.append( " MSG:" );
|
||||
sb.append( getShortDataMessage() );
|
||||
|
||||
sb.append( " FROM:" );
|
||||
sb.append( getSourceID() );
|
||||
|
||||
sb.append( " WACN:" );
|
||||
sb.append( getSourceWACN() );
|
||||
|
||||
sb.append( " SYS:" );
|
||||
sb.append( getSourceSystemID() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
public String getSourceWACN()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_WACN, 5 );
|
||||
}
|
||||
|
||||
public String getSourceSystemID()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getSourceID()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ID, 6 );
|
||||
}
|
||||
|
||||
public String getShortDataMessage()
|
||||
{
|
||||
return mMessage.getHex( SHORT_DATA_MESSAGE, 4 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Encryption;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class ProtectionParameterBroadcast extends PDUMessage
|
||||
{
|
||||
public static final int[] TARGET_ADDRESS = { 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[] ENCRYPTION_TYPE = { 128,129,130,131,132,133,134,
|
||||
135 };
|
||||
public static final int[] ALGORITHM_ID = { 136,137,138,139,140,141,142,143 };
|
||||
public static final int[] KEY_ID = { 160,161,162,163,164,165,166,167,168,
|
||||
169,170,171,172,173,174,175 };
|
||||
public static final int[] INBOUND_INITIALIZATION_VECTOR_A = { 176,177,178,
|
||||
179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,
|
||||
197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,
|
||||
215 };
|
||||
public static final int[] INBOUND_INITIALIZATION_VECTOR_B = { 216,217,218,
|
||||
219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,
|
||||
237,238,239,240,241,242,243,244,245,246,247 };
|
||||
public static final int[] OUTBOUND_INITIALIZATION_VECTOR_A = { 248,249,250,
|
||||
251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,
|
||||
269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,
|
||||
287 };
|
||||
public static final int[] OUTBOUND_INITIALIZATION_VECTOR_B = { 288,289,290,
|
||||
291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,
|
||||
309,310,311,312,313,314,315,316,317,318,319 };
|
||||
public static final int[] MULTIPLE_BLOCK_CRC = { 320,321,322,323,324,325,
|
||||
326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,
|
||||
343,344,345,346,347,348,349,350,351 };
|
||||
|
||||
public ProtectionParameterBroadcast( BitSetBuffer message,
|
||||
DataUnitID duid, AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.PROTECTION_PARAMETER_BROADCAST.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
sb.append( " TO:" );
|
||||
sb.append( getTargetAddress() );
|
||||
|
||||
sb.append( " ENCRYPTION:" );
|
||||
sb.append( getEncryptionType().name() );
|
||||
|
||||
sb.append( " ALGORITHM ID:" );
|
||||
sb.append( getAlgorithmID() );
|
||||
|
||||
sb.append( " KEY ID:" );
|
||||
sb.append( getKeyID() );
|
||||
|
||||
sb.append( " INBOUND IV:" );
|
||||
sb.append( getInboundInitializationVector() );
|
||||
|
||||
sb.append( " OUTBOUND IV:" );
|
||||
sb.append( getOutboundInitializationVector() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
public Encryption getEncryptionType()
|
||||
{
|
||||
return Encryption.fromValue( mMessage.getInt( ENCRYPTION_TYPE ) );
|
||||
}
|
||||
|
||||
public String getAlgorithmID()
|
||||
{
|
||||
return mMessage.getHex( ALGORITHM_ID, 2 );
|
||||
}
|
||||
|
||||
public String getKeyID()
|
||||
{
|
||||
return mMessage.getHex( KEY_ID, 4 );
|
||||
}
|
||||
|
||||
public String getInboundInitializationVector()
|
||||
{
|
||||
return mMessage.getHex( INBOUND_INITIALIZATION_VECTOR_A, 10 ) +
|
||||
mMessage.getHex( INBOUND_INITIALIZATION_VECTOR_B, 8 );
|
||||
}
|
||||
|
||||
public String getOutboundInitializationVector()
|
||||
{
|
||||
return mMessage.getHex( OUTBOUND_INITIALIZATION_VECTOR_A, 10 ) +
|
||||
mMessage.getHex( OUTBOUND_INITIALIZATION_VECTOR_B, 8 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,248 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
import dsp.fsk.P25MessageFramer;
|
||||
|
||||
public class RoamingAddressUpdateExtended extends PDUMessage
|
||||
{
|
||||
public static final int[] TARGET_ADDRESS = { 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 LAST_MESSAGE_INDICATOR = 128;
|
||||
public static final int[] MESSAGE_SEQUENCE_NUMBER = { 132,133,134,135 };
|
||||
public static final int[] WACN_A = { 136,137,138,139,140,141,142,143,160,
|
||||
161,162,163,164,165,166,167,168,169,170,171 };
|
||||
public static final int[] SYSTEM_ID_A = { 172,173,174,175,176,177,178,179,
|
||||
180,181,182,183 };
|
||||
public static final int[] SOURCE_ID_FORMAT_1 = { 184,185,186,187,188,189,
|
||||
190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207 };
|
||||
public static final int[] WACN_B = { 184,185,186,187,188,189,190,191,192,
|
||||
193,194,195,196,197,198,199,200,201,202,203 };
|
||||
public static final int[] SYSTEM_ID_B = { 204,205,206,207,208,209,210,211,
|
||||
212,213,214,215 };
|
||||
public static final int[] WACN_C = { 216,217,218,219,220,221,222,223,224,
|
||||
225,226,227,228,229,230,231,232,233,234,235 };
|
||||
public static final int[] SYSTEM_ID_C = { 236,237,238,239,240,241,242,243,
|
||||
244,245,246,247 };
|
||||
public static final int[] WACN_D = { 248,249,250,251,252,253,254,255,256,
|
||||
257,258,259,260,261,262,263,264,265,266,267 };
|
||||
public static final int[] SYSTEM_ID_D = { 268,269,270,271,272,273,274,275,
|
||||
276,277,278,279 };
|
||||
public static final int[] SOURCE_ID_FORMAT_2 = { 280,281,282,283,284,285,
|
||||
286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303 };
|
||||
public static final int[] WACN_E = { 280,281,282,283,284,285,
|
||||
286,287,288,289,290,291,292,293,294,295,296,297,298,299 };
|
||||
public static final int[] SYSTEM_ID_E = { 300,301,302,303,304,305,306,307,
|
||||
308,309,310,311 };
|
||||
public static final int[] WACN_F = { 312,313,314,315,316,317,318,319,320,
|
||||
321,322,323,324,325,326,327,328,329,330,331 };
|
||||
public static final int[] SYSTEM_ID_F = { 332,333,334,335,336,337,338,339,
|
||||
340,341,342,343 };
|
||||
public static final int[] WACN_G = { 344,345,346,347,348,349,350,351,352,
|
||||
353,354,355,356,357,358,359,360,361,362,363 };
|
||||
public static final int[] SYSTEM_ID_G = { 364,365,366,367,368,369,370,371,
|
||||
372,373,374,375 };
|
||||
public static final int[] SOURCE_ID_FORMAT_3 = { 376,377,378,379,380,381,
|
||||
382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399 };
|
||||
public static final int[] MULTIPLE_BLOCK_CRC_FORMAT_1 = { 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 };
|
||||
public static final int[] MULTIPLE_BLOCK_CRC_FORMAT_2 = { 320,321,322,323,
|
||||
324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,
|
||||
342,343,344,345,346,347,348,349,350,351 };
|
||||
public static final int[] MULTIPLE_BLOCK_CRC_FORMAT_3 = { 416,417,418,419,
|
||||
420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,
|
||||
438,439,440,441,442,443,444,445,446,447 };
|
||||
|
||||
private enum Format{ FORMAT_1, FORMAT_2, FORMAT_3 };
|
||||
|
||||
private Format mFormat;
|
||||
|
||||
public RoamingAddressUpdateExtended( BitSetBuffer message,
|
||||
DataUnitID duid, AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
|
||||
if( mMessage.size() == P25MessageFramer.PDU2_BEGIN )
|
||||
{
|
||||
mFormat = Format.FORMAT_1;
|
||||
}
|
||||
else if( mMessage.size() == P25MessageFramer.PDU3_BEGIN )
|
||||
{
|
||||
mFormat = Format.FORMAT_2;
|
||||
}
|
||||
else if( mMessage.size() == P25MessageFramer.PDU3_DECODED_END )
|
||||
{
|
||||
mFormat = Format.FORMAT_3;
|
||||
}
|
||||
else
|
||||
{
|
||||
mFormat = Format.FORMAT_1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.ROAMING_ADDRESS_UPDATE.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
sb.append( " ROAMING ADDRESS STACK FROM:" );
|
||||
sb.append( getSourceID() );
|
||||
|
||||
if( isLastBlock() )
|
||||
{
|
||||
sb.append( " LAST BLOCK" );
|
||||
}
|
||||
|
||||
sb.append( "MSG SEQ:" );
|
||||
sb.append( getMessageSequenceNumber() );
|
||||
|
||||
sb.append( " TO:" );
|
||||
sb.append( getTargetAddress() );
|
||||
|
||||
sb.append( " WACN A:" + getWACNA() );
|
||||
sb.append( " SYS A:" + getSystemIDA() );
|
||||
|
||||
if( isFormat2() )
|
||||
{
|
||||
sb.append( " WACN B:" + getWACNB() );
|
||||
sb.append( " SYS B:" + getSystemIDB() );
|
||||
sb.append( " WACN C:" + getWACNC() );
|
||||
sb.append( " SYS C:" + getSystemIDC() );
|
||||
sb.append( " WACN D:" + getWACND() );
|
||||
sb.append( " SYS D:" + getSystemIDD() );
|
||||
}
|
||||
|
||||
if( isFormat3() )
|
||||
{
|
||||
sb.append( " WACN E:" + getWACNE() );
|
||||
sb.append( " SYS E:" + getSystemIDE() );
|
||||
sb.append( " WACN F:" + getWACNF() );
|
||||
sb.append( " SYS F:" + getSystemIDF() );
|
||||
sb.append( " WACN G:" + getWACNG() );
|
||||
sb.append( " SYS G:" + getSystemIDG() );
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public boolean isLastBlock()
|
||||
{
|
||||
return mMessage.get( LAST_MESSAGE_INDICATOR );
|
||||
}
|
||||
|
||||
public int getMessageSequenceNumber()
|
||||
{
|
||||
return mMessage.getInt( MESSAGE_SEQUENCE_NUMBER );
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
public String getWACNA()
|
||||
{
|
||||
return mMessage.getHex( WACN_A, 5 );
|
||||
}
|
||||
|
||||
public String getSystemIDA()
|
||||
{
|
||||
return mMessage.getHex( SYSTEM_ID_A, 3 );
|
||||
}
|
||||
|
||||
public String getWACNB()
|
||||
{
|
||||
return isFormat2() ? mMessage.getHex( WACN_B, 5 ) : null;
|
||||
}
|
||||
|
||||
public String getSystemIDB()
|
||||
{
|
||||
return isFormat2() ? mMessage.getHex( SYSTEM_ID_B, 3 ) : null;
|
||||
}
|
||||
|
||||
public String getWACNC()
|
||||
{
|
||||
return isFormat2() ? mMessage.getHex( WACN_C, 5 ) : null;
|
||||
}
|
||||
|
||||
public String getSystemIDC()
|
||||
{
|
||||
return isFormat2() ? mMessage.getHex( SYSTEM_ID_C, 3 ) : null;
|
||||
}
|
||||
|
||||
public String getWACND()
|
||||
{
|
||||
return isFormat2() ? mMessage.getHex( WACN_D, 5 ) : null;
|
||||
}
|
||||
|
||||
public String getSystemIDD()
|
||||
{
|
||||
return isFormat2() ? mMessage.getHex( SYSTEM_ID_D, 3 ) : null;
|
||||
}
|
||||
|
||||
public String getWACNE()
|
||||
{
|
||||
return isFormat3() ? mMessage.getHex( WACN_E, 5 ) : null;
|
||||
}
|
||||
|
||||
public String getSystemIDE()
|
||||
{
|
||||
return isFormat3() ? mMessage.getHex( SYSTEM_ID_E, 3 ) : null;
|
||||
}
|
||||
|
||||
public String getWACNF()
|
||||
{
|
||||
return isFormat3() ? mMessage.getHex( WACN_F, 5 ) : null;
|
||||
}
|
||||
|
||||
public String getSystemIDF()
|
||||
{
|
||||
return isFormat3() ? mMessage.getHex( SYSTEM_ID_F, 3 ) : null;
|
||||
}
|
||||
|
||||
public String getWACNG()
|
||||
{
|
||||
return isFormat3() ? mMessage.getHex( WACN_G, 5 ) : null;
|
||||
}
|
||||
|
||||
public String getSystemIDG()
|
||||
{
|
||||
return isFormat3() ? mMessage.getHex( SYSTEM_ID_G, 3 ) : null;
|
||||
}
|
||||
|
||||
public String getSourceID()
|
||||
{
|
||||
switch( mFormat )
|
||||
{
|
||||
case FORMAT_1:
|
||||
return mMessage.getHex( SOURCE_ID_FORMAT_1, 6 );
|
||||
case FORMAT_2:
|
||||
return mMessage.getHex( SOURCE_ID_FORMAT_2, 6 );
|
||||
case FORMAT_3:
|
||||
return mMessage.getHex( SOURCE_ID_FORMAT_2, 6 );
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isFormat2()
|
||||
{
|
||||
return mFormat != Format.FORMAT_3;
|
||||
}
|
||||
|
||||
public boolean isFormat3()
|
||||
{
|
||||
return mFormat == Format.FORMAT_3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class StatusQueryExtended extends PDUMessage
|
||||
{
|
||||
public static final int[] TARGET_ADDRESS = { 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[] SOURCE_WACN = { 128,129,130,131,132,133,134,135,136,137,
|
||||
138,139,140,141,142,143,160,161,162,163 };
|
||||
public static final int[] SOURCE_SYSTEM_ID = { 164,165,166,167,168,169,170,171,172,
|
||||
173,174,175 };
|
||||
public static final int[] SOURCE_ID = { 176,177,178,179,180,181,182,183,184,
|
||||
185,186,187,188,189,190,191,192,193,194,195,196,197,198,199 };
|
||||
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 };
|
||||
|
||||
public StatusQueryExtended( 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( getMessageStub() );
|
||||
|
||||
sb.append( " TO:" );
|
||||
sb.append( getTargetAddress() );
|
||||
|
||||
sb.append( " FROM:" );
|
||||
sb.append( getSourceID() );
|
||||
|
||||
sb.append( " WACN:" );
|
||||
sb.append( getSourceWACN() );
|
||||
|
||||
sb.append( " SYS:" );
|
||||
sb.append( getSourceSystemID() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
public String getSourceWACN()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_WACN, 5 );
|
||||
}
|
||||
|
||||
public String getSourceSystemID()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getSourceID()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ID, 6 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
|
||||
public class StatusUpdateExtended extends PDUMessage
|
||||
{
|
||||
public static final int[] TARGET_ADDRESS = { 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[] SOURCE_WACN = { 128,129,130,131,132,133,134,135,136,137,
|
||||
138,139,140,141,142,143,160,161,162,163 };
|
||||
public static final int[] SOURCE_SYSTEM_ID = { 164,165,166,167,168,169,170,171,172,
|
||||
173,174,175 };
|
||||
public static final int[] SOURCE_ID = { 176,177,178,179,180,181,182,183,184,
|
||||
185,186,187,188,189,190,191,192,193,194,195,196,197,198,199 };
|
||||
public static final int[] UNIT_STATUS = { 200,201,202,203,204,205,206,207 };
|
||||
public static final int[] USER_STATUS = { 208,209,210,211,212,213,214,215 };
|
||||
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 };
|
||||
|
||||
public StatusUpdateExtended( BitSetBuffer message,
|
||||
DataUnitID duid, AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventType()
|
||||
{
|
||||
return Opcode.STATUS_UPDATE.getDescription();
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
sb.append( " TO:" );
|
||||
sb.append( getTargetAddress() );
|
||||
|
||||
sb.append( " FROM:" );
|
||||
sb.append( getSourceID() );
|
||||
|
||||
sb.append( " WACN:" );
|
||||
sb.append( getSourceWACN() );
|
||||
|
||||
sb.append( " SYS:" );
|
||||
sb.append( getSourceSystemID() );
|
||||
|
||||
sb.append( " STATUS USER:" + getUserStatus() );
|
||||
sb.append( " UNIT:" + getUnitStatus() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
public String getSourceWACN()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_WACN, 5 );
|
||||
}
|
||||
|
||||
public String getSourceSystemID()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_SYSTEM_ID, 3 );
|
||||
}
|
||||
|
||||
public String getSourceID()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ID, 6 );
|
||||
}
|
||||
|
||||
public String getUserStatus()
|
||||
{
|
||||
return mMessage.getHex( USER_STATUS, 2 );
|
||||
}
|
||||
|
||||
public String getUnitStatus()
|
||||
{
|
||||
return mMessage.getHex( UNIT_STATUS, 2 );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package decode.p25.message.pdu.osp.control;
|
||||
|
||||
import alias.AliasList;
|
||||
import bits.BitSetBuffer;
|
||||
import decode.p25.message.pdu.PDUMessage;
|
||||
import decode.p25.reference.DataUnitID;
|
||||
import decode.p25.reference.Opcode;
|
||||
import decode.p25.reference.Response;
|
||||
|
||||
public class UnitRegistrationResponseExtended extends PDUMessage
|
||||
{
|
||||
public static final int[] REGISTRATION_DEFAULT_ADDRESS = { 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[] WACN = { 128,129,130,131,132,133,134,135,
|
||||
136,137,138,139,140,141,142,143,160,161,162,163 };
|
||||
public static final int[] SYSTEM_ID = { 164,165,166,167,168,169,170,
|
||||
171,172,173,174,175 };
|
||||
public static final int[] SOURCE_ID = { 176,177,178,179,180,181,182,183,184,
|
||||
185,186,187,188,189,190,191,192,193,194,195,196,197,198,199 };
|
||||
public static final int[] SOURCE_ADDRESS = { 200,201,202,203,204,205,206,
|
||||
207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223 };
|
||||
public static final int[] UNIT_REGISTRATION_RESPONSE_VALUE = { 230,231 };
|
||||
public static final int[] MULTIPLE_BLOCK_CRC = { 320,321,322,323,324,325,
|
||||
326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,
|
||||
343,344,345,346,347,348,349,350,351 };
|
||||
|
||||
public UnitRegistrationResponseExtended( 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( getMessageStub() );
|
||||
|
||||
sb.append( "REGISTRATION:" );
|
||||
sb.append( getUnitRegistrationResponse().name() );
|
||||
|
||||
sb.append( " SRC ID:" );
|
||||
sb.append( getSourceID() );
|
||||
|
||||
sb.append( " ADDR:" );
|
||||
sb.append( getSourceAddress() );
|
||||
|
||||
sb.append( " WACN:" );
|
||||
sb.append( getWACN() );
|
||||
|
||||
sb.append( " SYS:" );
|
||||
sb.append( getSystemID() );
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
public String getSourceAddress()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
public Response getUnitRegistrationResponse()
|
||||
{
|
||||
return Response.fromValue(
|
||||
mMessage.getInt( UNIT_REGISTRATION_RESPONSE_VALUE ) );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user