mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -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:
8
src/message/IMessageListener.java
Normal file
8
src/message/IMessageListener.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package message;
|
||||
|
||||
import sample.Listener;
|
||||
|
||||
public interface IMessageListener
|
||||
{
|
||||
public Listener<Message> getMessageListener();
|
||||
}
|
||||
9
src/message/IMessageProvider.java
Normal file
9
src/message/IMessageProvider.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package message;
|
||||
|
||||
import sample.Listener;
|
||||
|
||||
public interface IMessageProvider
|
||||
{
|
||||
public void addMessageListener( Listener<Message> listener );
|
||||
public void removeMessageListener( Listener<Message> listener );
|
||||
}
|
||||
@@ -23,8 +23,8 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import map.Plottable;
|
||||
import module.decode.event.MessageDetailsProvider;
|
||||
import alias.Alias;
|
||||
import controller.activity.MessageDetailsProvider;
|
||||
|
||||
public abstract class Message implements MessageDetailsProvider
|
||||
{
|
||||
|
||||
@@ -19,6 +19,18 @@ package message;
|
||||
|
||||
public enum MessageDirection
|
||||
{
|
||||
ISW, //Inbound Status Word
|
||||
OSW; //Outbound Status Word
|
||||
ISW( "Mobile (ISW)" ), //Inbound Status Word
|
||||
OSW( "Tower (OSW)" ); //Outbound Status Word
|
||||
|
||||
private String mLabel;
|
||||
|
||||
private MessageDirection( String label )
|
||||
{
|
||||
mLabel = label;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return mLabel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
package message;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import controller.channel.Channel;
|
||||
import decode.DecoderType;
|
||||
import decode.config.AuxDecodeConfiguration;
|
||||
import decode.fleetsync2.FleetsyncMessageFilter;
|
||||
import decode.lj1200.LJ1200MessageFilter;
|
||||
import decode.ltrnet.LTRNetMessageFilter;
|
||||
import decode.ltrstandard.LTRStandardMessageFilter;
|
||||
import decode.mdc1200.MDCMessageFilter;
|
||||
import decode.mpt1327.MPT1327MessageFilter;
|
||||
import decode.p25.message.filter.P25MessageFilterSet;
|
||||
import decode.passport.PassportMessageFilter;
|
||||
import filter.AllPassFilter;
|
||||
import filter.FilterSet;
|
||||
import filter.IFilter;
|
||||
|
||||
/**
|
||||
* Constructs message filters for each of the decoder types
|
||||
*/
|
||||
public class MessageFilterFactory
|
||||
{
|
||||
/**
|
||||
* Assembles a filter set containing filters for the primary channel
|
||||
* decoder and each of the auxiliary decoders
|
||||
*/
|
||||
public static FilterSet<Message> getMessageFilter( Channel channel )
|
||||
{
|
||||
FilterSet<Message> filterSet = new FilterSet<Message>(
|
||||
"Message Filter: " + channel.getChannelDisplayName() );
|
||||
|
||||
filterSet.addFilters( getMessageFilters(
|
||||
channel.getDecodeConfiguration().getDecoderType() ) );
|
||||
|
||||
AuxDecodeConfiguration auxConfig = channel.getAuxDecodeConfiguration();
|
||||
|
||||
for( DecoderType decoderType: auxConfig.getAuxDecoders() )
|
||||
{
|
||||
filterSet.addFilters( getMessageFilters( decoderType ) );
|
||||
}
|
||||
|
||||
/* If we don't have any filters, add an ALL-PASS filter */
|
||||
if( filterSet.getFilters().isEmpty() )
|
||||
{
|
||||
filterSet.addFilter( new AllPassFilter<Message>() );
|
||||
}
|
||||
|
||||
return filterSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a set of IMessageFilter objects (FilterSets or Filters) that
|
||||
* can process all of the messages produced by the specified decoder type.
|
||||
*/
|
||||
public static List<IFilter<Message>> getMessageFilters( DecoderType decoder )
|
||||
{
|
||||
ArrayList<IFilter<Message>> filters = new ArrayList<IFilter<Message>>();
|
||||
|
||||
switch( decoder )
|
||||
{
|
||||
case ACARS:
|
||||
break;
|
||||
case AIS:
|
||||
break;
|
||||
case AM:
|
||||
break;
|
||||
case APRS:
|
||||
break;
|
||||
case DMR:
|
||||
break;
|
||||
case FLEETSYNC2:
|
||||
filters.add( new FleetsyncMessageFilter() );
|
||||
break;
|
||||
case LJ_1200:
|
||||
filters.add( new LJ1200MessageFilter() );
|
||||
break;
|
||||
case LTR_NET:
|
||||
filters.add( new LTRNetMessageFilter() );
|
||||
break;
|
||||
case LTR_STANDARD:
|
||||
filters.add( new LTRStandardMessageFilter() );
|
||||
break;
|
||||
case MDC1200:
|
||||
filters.add( new MDCMessageFilter() );
|
||||
break;
|
||||
case MOTOROLA_TYPE_2:
|
||||
break;
|
||||
case MPT1327:
|
||||
filters.add( new MPT1327MessageFilter() );
|
||||
break;
|
||||
case NBFM:
|
||||
break;
|
||||
case NXDN:
|
||||
break;
|
||||
case P25_PHASE1:
|
||||
case P25_PHASE2:
|
||||
filters.add( new P25MessageFilterSet() );
|
||||
break;
|
||||
case PASSPORT:
|
||||
filters.add( new PassportMessageFilter() );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return filters;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user