mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
P25 work in progress - final check-in of channel state and activity summary processing of TSBK and PDU messages and event generation.
This commit is contained in:
@@ -7,11 +7,11 @@ import decode.p25.reference.DataUnitID;
|
||||
|
||||
public abstract class GroupChannelGrantExplicit extends ChannelGrant
|
||||
{
|
||||
public static final int[] TRANSMIT_CHANNEL_ID = { 96,97,98,99 };
|
||||
public static final int[] TRANSMIT_CHANNEL_NUMBER = { 100,101,102,103,
|
||||
public static final int[] TRANSMIT_IDENTIFIER = { 96,97,98,99 };
|
||||
public static final int[] TRANSMIT_NUMBER = { 100,101,102,103,
|
||||
104,105,106,107,108,109,110,111 };
|
||||
public static final int[] RECEIVE_CHANNEL_ID = { 112,113,114,115 };
|
||||
public static final int[] RECEIVE_CHANNEL_NUMBER = { 116,117,118,119,
|
||||
public static final int[] RECEIVE_IDENTIFIER = { 112,113,114,115 };
|
||||
public static final int[] RECEIVE_NUMBER = { 116,117,118,119,
|
||||
120,121,122,123,124,125,126,127 };
|
||||
public static final int[] GROUP_ADDRESS = { 128,129,130,131,132,133,134,135,
|
||||
136,137,138,139,140,141,142,143 };
|
||||
@@ -38,10 +38,10 @@ public abstract class GroupChannelGrantExplicit extends ChannelGrant
|
||||
}
|
||||
|
||||
sb.append( " XMIT:" );
|
||||
sb.append( getTransmitChannelID() + "/" + getTransmitChannelNumber() );
|
||||
sb.append( getTransmitChannelIdentifier() + "/" + getTransmitChannelNumber() );
|
||||
|
||||
sb.append( " RCV:" );
|
||||
sb.append( getReceiveChannelID() + "/" + getReceiveChannelNumber() );
|
||||
sb.append( getReceiveChannelIdentifier() + "/" + getReceiveChannelNumber() );
|
||||
|
||||
sb.append( " GRP:" );
|
||||
sb.append( getGroupAddress() );
|
||||
@@ -49,24 +49,34 @@ public abstract class GroupChannelGrantExplicit extends ChannelGrant
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public int getTransmitChannelID()
|
||||
public int getTransmitChannelIdentifier()
|
||||
{
|
||||
return mMessage.getInt( TRANSMIT_CHANNEL_ID );
|
||||
return mMessage.getInt( TRANSMIT_IDENTIFIER );
|
||||
}
|
||||
|
||||
public int getTransmitChannelNumber()
|
||||
{
|
||||
return mMessage.getInt( TRANSMIT_CHANNEL_NUMBER );
|
||||
return mMessage.getInt( TRANSMIT_NUMBER );
|
||||
}
|
||||
|
||||
public int getReceiveChannelID()
|
||||
public String getTransmitChannel()
|
||||
{
|
||||
return mMessage.getInt( RECEIVE_CHANNEL_ID );
|
||||
return getTransmitChannelIdentifier() + "-" + getTransmitChannelNumber();
|
||||
}
|
||||
|
||||
public int getReceiveChannelIdentifier()
|
||||
{
|
||||
return mMessage.getInt( RECEIVE_IDENTIFIER );
|
||||
}
|
||||
|
||||
public int getReceiveChannelNumber()
|
||||
{
|
||||
return mMessage.getInt( RECEIVE_CHANNEL_NUMBER );
|
||||
return mMessage.getInt( RECEIVE_NUMBER );
|
||||
}
|
||||
|
||||
public String getReceiveChannel()
|
||||
{
|
||||
return getReceiveChannelIdentifier() + "-" + getReceiveChannelNumber();
|
||||
}
|
||||
|
||||
public String getGroupAddress()
|
||||
@@ -77,12 +87,12 @@ public abstract class GroupChannelGrantExplicit extends ChannelGrant
|
||||
@Override
|
||||
public void setIdentifierMessage( int identifier, IdentifierUpdate message )
|
||||
{
|
||||
if( identifier == getTransmitChannelID() )
|
||||
if( identifier == getTransmitChannelIdentifier() )
|
||||
{
|
||||
mTransmitIdentifierUpdate = message;
|
||||
}
|
||||
|
||||
if( identifier == getReceiveChannelID() )
|
||||
if( identifier == getReceiveChannelIdentifier() )
|
||||
{
|
||||
mReceiveIdentifierUpdate = message;
|
||||
}
|
||||
@@ -92,19 +102,19 @@ public abstract class GroupChannelGrantExplicit extends ChannelGrant
|
||||
public int[] getIdentifiers()
|
||||
{
|
||||
int[] identifiers = new int[ 2 ];
|
||||
identifiers[ 0 ] = getTransmitChannelID();
|
||||
identifiers[ 1 ] = getReceiveChannelID();
|
||||
identifiers[ 0 ] = getTransmitChannelIdentifier();
|
||||
identifiers[ 1 ] = getReceiveChannelIdentifier();
|
||||
|
||||
return identifiers;
|
||||
}
|
||||
|
||||
public long getDownlinkFrequency()
|
||||
{
|
||||
return calculateDownlink( mTransmitIdentifierUpdate, getChannel() );
|
||||
return calculateDownlink( mTransmitIdentifierUpdate, getTransmitChannelNumber() );
|
||||
}
|
||||
|
||||
public long getUplinkFrequency()
|
||||
{
|
||||
return calculateUplink( mReceiveIdentifierUpdate, getChannel() );
|
||||
return calculateUplink( mReceiveIdentifierUpdate, getReceiveChannelNumber() );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user