mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Initial commit of redesigned internal processing and audio management.
Note: Several of the decoders are currently non-functioning in this commit. If you want the latest functioning codebase, please checkout the commit prior to this one. All decoders will eventually be updated with this new architecture. Currently broken: - Logging and recording - Aux decoders (Fleetsync/MDC/LoJack/Tait) - LTR/Passport decoders Changes in this commit: - Module architecture for decoders and components with central provisioning by the DecoderFactory - Transition from Complex sample stream processing to float buffer processing for improved memory management - Redesigned filter structures - to support buffers and streams - Resolved several memory leak issues - Universal sharing of the thread pool manager - Added centralized audio management with call/user prioritization and new gui with mute/volume controls - Embedded audio metadata for eventual streaming support - Redesigned ProcessingChain to support independent re-use - Added new TrafficChannelManager to handle traffic channel allocations - Traffic Channel pool size and Call timeout available in P25 and MPT1327 configs - Redesigned channel and decoder gui components
This commit is contained in:
75
src/module/decode/p25/message/tsbk/UnitChannelGrant.java
Normal file
75
src/module/decode/p25/message/tsbk/UnitChannelGrant.java
Normal file
@@ -0,0 +1,75 @@
|
||||
package module.decode.p25.message.tsbk;
|
||||
|
||||
import module.decode.p25.reference.DataUnitID;
|
||||
import alias.Alias;
|
||||
import alias.AliasList;
|
||||
import bits.BinaryMessage;
|
||||
|
||||
public abstract class UnitChannelGrant extends ChannelGrant
|
||||
{
|
||||
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 UnitChannelGrant( BinaryMessage message,
|
||||
DataUnitID duid,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( message, duid, aliasList );
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( getMessageStub() );
|
||||
|
||||
if( isEmergency() )
|
||||
{
|
||||
sb.append( " EMERGENCY" );
|
||||
}
|
||||
|
||||
sb.append( " FROM:" );
|
||||
sb.append( getSourceAddress() );
|
||||
|
||||
sb.append( " TO:" );
|
||||
sb.append( getTargetAddress() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getTargetAddress()
|
||||
{
|
||||
return mMessage.getHex( TARGET_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
public String getSourceAddress()
|
||||
{
|
||||
return mMessage.getHex( SOURCE_ADDRESS, 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFromID()
|
||||
{
|
||||
return getSourceAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Alias getFromIDAlias()
|
||||
{
|
||||
if( mAliasList != null )
|
||||
{
|
||||
return mAliasList.getTalkgroupAlias( getFromID() );
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getToID()
|
||||
{
|
||||
return getTargetAddress();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user