mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Work in progress
This commit is contained in:
@@ -109,7 +109,7 @@ public class ProcessingChain implements IChannelEventListener
|
||||
private ScheduledFuture<?> mBufferProcessingTask;
|
||||
private AtomicBoolean mRunning = new AtomicBoolean();
|
||||
|
||||
private Source mSource;
|
||||
protected Source mSource;
|
||||
private List<Module> mModules = new ArrayList<>();
|
||||
private IFrequencyCorrectionController mFrequencyCorrectionController;
|
||||
|
||||
|
||||
@@ -26,11 +26,12 @@ import javax.swing.JComboBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import module.decode.config.DecodeConfigFactory;
|
||||
import module.decode.config.DecodeConfiguration;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import controller.Editor;
|
||||
import controller.channel.AbstractChannelEditor;
|
||||
import controller.channel.Channel;
|
||||
import controller.channel.ChannelNode;
|
||||
import controller.channel.ChannelValidationException;
|
||||
|
||||
@@ -41,6 +42,11 @@ public class DecodeComponentEditor extends AbstractChannelEditor
|
||||
private JComboBox<DecoderType> mComboDecoders;
|
||||
|
||||
private DecodeEditor mEditor;
|
||||
|
||||
public DecodeComponentEditor()
|
||||
{
|
||||
this( new ChannelNode( new Channel() ) );
|
||||
}
|
||||
|
||||
public DecodeComponentEditor( ChannelNode channelNode )
|
||||
{
|
||||
@@ -95,7 +101,7 @@ public class DecodeComponentEditor extends AbstractChannelEditor
|
||||
}
|
||||
|
||||
//Change to the new one
|
||||
mEditor = DecoderFactory.getPanel( config, mChannelNode );
|
||||
mEditor = DecoderFactory.getEditorPanel( config, mChannelNode );
|
||||
|
||||
add( mEditor, "span 2,center" );
|
||||
|
||||
@@ -127,6 +133,11 @@ public class DecodeComponentEditor extends AbstractChannelEditor
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public DecodeConfiguration getDecodeConfig()
|
||||
{
|
||||
return mEditor.getConfig();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save()
|
||||
|
||||
@@ -24,11 +24,15 @@ import java.util.List;
|
||||
import message.Message;
|
||||
import message.MessageDirection;
|
||||
import module.Module;
|
||||
import module.decode.am.AMDecoder;
|
||||
import module.decode.am.AMDecoderPanel;
|
||||
import module.decode.config.AuxDecodeConfiguration;
|
||||
import module.decode.config.DecodeConfiguration;
|
||||
import module.decode.fleetsync2.Fleetsync2Decoder;
|
||||
import module.decode.fleetsync2.Fleetsync2DecoderPanel;
|
||||
import module.decode.fleetsync2.FleetsyncMessageFilter;
|
||||
import module.decode.lj1200.LJ1200Decoder;
|
||||
import module.decode.lj1200.LJ1200DecoderPanel;
|
||||
import module.decode.lj1200.LJ1200MessageFilter;
|
||||
import module.decode.ltrnet.DecodeConfigLTRNet;
|
||||
import module.decode.ltrnet.LTRNetDecoder;
|
||||
@@ -41,6 +45,7 @@ import module.decode.ltrstandard.LTRStandardDecoderPanel;
|
||||
import module.decode.ltrstandard.LTRStandardEditor;
|
||||
import module.decode.ltrstandard.LTRStandardMessageFilter;
|
||||
import module.decode.mdc1200.MDCDecoder;
|
||||
import module.decode.mdc1200.MDCDecoderPanel;
|
||||
import module.decode.mdc1200.MDCMessageFilter;
|
||||
import module.decode.mpt1327.DecodeConfigMPT1327;
|
||||
import module.decode.mpt1327.MPT1327ConfigEditor;
|
||||
@@ -60,11 +65,14 @@ import module.decode.p25.P25_C4FMDecoder;
|
||||
import module.decode.p25.P25_LSMDecoder;
|
||||
import module.decode.p25.audio.P25AudioModule;
|
||||
import module.decode.p25.message.filter.P25MessageFilterSet;
|
||||
import module.decode.passport.PassportDecoder;
|
||||
import module.decode.passport.PassportDecoderPanel;
|
||||
import module.decode.passport.PassportEditor;
|
||||
import module.decode.passport.PassportMessageFilter;
|
||||
import module.decode.state.DecoderPanel;
|
||||
import module.decode.state.TrafficChannelManager;
|
||||
import module.decode.tait.Tait1200Decoder;
|
||||
import module.decode.tait.Tait1200DecoderPanel;
|
||||
import module.demodulate.fm.FMDemodulatorModule;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
@@ -295,34 +303,32 @@ public class DecoderFactory
|
||||
{
|
||||
switch( decoder.getDecoderType() )
|
||||
{
|
||||
// case AM:
|
||||
// break;
|
||||
// case FLEETSYNC2:
|
||||
// break;
|
||||
// case LJ_1200:
|
||||
// break;
|
||||
case AM:
|
||||
return new AMDecoderPanel( settingsManager, (AMDecoder)decoder );
|
||||
case FLEETSYNC2:
|
||||
return new Fleetsync2DecoderPanel( settingsManager, (Fleetsync2Decoder)decoder );
|
||||
case LJ_1200:
|
||||
return new LJ1200DecoderPanel( settingsManager, (LJ1200Decoder)decoder );
|
||||
case LTR_NET:
|
||||
return new LTRNetDecoderPanel( settingsManager, (LTRNetDecoder)decoder );
|
||||
case LTR_STANDARD:
|
||||
return new LTRStandardDecoderPanel( settingsManager, (LTRStandardDecoder)decoder );
|
||||
// case MDC1200:
|
||||
// break;
|
||||
case MDC1200:
|
||||
return new MDCDecoderPanel( settingsManager, (MDCDecoder)decoder );
|
||||
case MPT1327:
|
||||
return new MPT1327DecoderPanel( settingsManager, (MPT1327Decoder)decoder );
|
||||
case NBFM:
|
||||
return new NBFMDecoderPanel( settingsManager, decoder );
|
||||
case P25_PHASE1:
|
||||
return new P25DecoderPanel( settingsManager, (P25Decoder)decoder );
|
||||
// case PASSPORT:
|
||||
// break;
|
||||
case PASSPORT:
|
||||
return new PassportDecoderPanel( settingsManager, (PassportDecoder)decoder );
|
||||
case TAIT_1200:
|
||||
break;
|
||||
return new Tait1200DecoderPanel( settingsManager, (Tait1200Decoder)decoder );
|
||||
default:
|
||||
throw new IllegalArgumentException( "Unrecognized decoder: " +
|
||||
decoder.getDecoderType().getDisplayString() );
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -393,7 +399,7 @@ public class DecoderFactory
|
||||
return filters;
|
||||
}
|
||||
|
||||
public static DecodeEditor getPanel( DecodeConfiguration config,
|
||||
public static DecodeEditor getEditorPanel( DecodeConfiguration config,
|
||||
ChannelNode channelNode )
|
||||
{
|
||||
DecodeEditor configuredPanel;
|
||||
|
||||
@@ -19,6 +19,7 @@ package module.decode.fleetsync2;
|
||||
|
||||
import instrument.Instrumentable;
|
||||
import instrument.tap.Tap;
|
||||
import instrument.tap.TapGroup;
|
||||
import instrument.tap.stream.BinaryTap;
|
||||
import instrument.tap.stream.FloatBufferTap;
|
||||
|
||||
@@ -56,7 +57,7 @@ public class Fleetsync2Decoder extends Decoder implements IRealBufferListener,
|
||||
private static final int sMESSAGE_LENGTH = 537;
|
||||
|
||||
/* Instrumentation Taps */
|
||||
private ArrayList<Tap> mAvailableTaps;
|
||||
private ArrayList<TapGroup> mAvailableTaps;
|
||||
private static final String INSTRUMENT_BANDPASS_FILTER_TO_FSK2_DEMOD =
|
||||
"Tap Point: Bandpass Filter > < FSK2 Decoder";
|
||||
private static final String INSTRUMENT_FSK2_DECODER_TO_MESSAGE_FRAMER =
|
||||
@@ -113,26 +114,31 @@ public class Fleetsync2Decoder extends Decoder implements IRealBufferListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Tap> getTaps()
|
||||
public List<TapGroup> getTapGroups()
|
||||
{
|
||||
if( mAvailableTaps == null )
|
||||
{
|
||||
mAvailableTaps = new ArrayList<Tap>();
|
||||
mAvailableTaps = new ArrayList<TapGroup>();
|
||||
|
||||
TapGroup group = new TapGroup( "Fleetsync 2 Decoder" );
|
||||
|
||||
mAvailableTaps.add( new FloatBufferTap(
|
||||
group.add( new FloatBufferTap(
|
||||
INSTRUMENT_BANDPASS_FILTER_TO_FSK2_DEMOD, 0, 0.5f ) );
|
||||
mAvailableTaps.addAll( mFSKDecoder.getTaps() );
|
||||
mAvailableTaps.add( new BinaryTap(
|
||||
group.add( new BinaryTap(
|
||||
INSTRUMENT_FSK2_DECODER_TO_MESSAGE_FRAMER, 0, 0.025f ) );
|
||||
|
||||
mAvailableTaps.add( group );
|
||||
|
||||
mAvailableTaps.addAll( mFSKDecoder.getTapGroups() );
|
||||
}
|
||||
|
||||
return mAvailableTaps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTap( Tap tap )
|
||||
public void registerTap( Tap tap )
|
||||
{
|
||||
mFSKDecoder.addTap( tap );
|
||||
mFSKDecoder.registerTap( tap );
|
||||
|
||||
switch( tap.getName() )
|
||||
{
|
||||
@@ -150,9 +156,9 @@ public class Fleetsync2Decoder extends Decoder implements IRealBufferListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTap( Tap tap )
|
||||
public void unregisterTap( Tap tap )
|
||||
{
|
||||
mFSKDecoder.removeTap( tap );
|
||||
mFSKDecoder.unregisterTap( tap );
|
||||
|
||||
switch( tap.getName() )
|
||||
{
|
||||
|
||||
@@ -20,8 +20,13 @@ package module.decode.fleetsync2;
|
||||
import java.awt.EventQueue;
|
||||
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JSeparator;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import alias.Alias;
|
||||
import module.decode.DecoderFactory;
|
||||
import module.decode.state.ChangedAttribute;
|
||||
import module.decode.state.DecoderPanel;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
@@ -32,23 +37,25 @@ import settings.SettingsManager;
|
||||
|
||||
public class Fleetsync2DecoderPanel extends DecoderPanel
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final static Logger mLog = LoggerFactory.getLogger( Fleetsync2DecoderPanel.class );
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final String PROTOCOL = "FSync II";
|
||||
|
||||
private JLabel mFromLabel = new JLabel( " " );
|
||||
private JLabel mFrom = new JLabel();
|
||||
private JLabel mFromAlias = new JLabel();
|
||||
|
||||
private JLabel mToLabel = new JLabel();
|
||||
private JLabel mToLabel = new JLabel( " " );
|
||||
private JLabel mTo = new JLabel( " " );
|
||||
private JLabel mToAlias = new JLabel();
|
||||
private JLabel mToAlias = new JLabel( " " );
|
||||
|
||||
private JLabel mFromLabel = new JLabel( " " );
|
||||
private JLabel mFrom = new JLabel( " " );
|
||||
private JLabel mFromAlias = new JLabel( " " );
|
||||
|
||||
private JLabel mProtocol = new JLabel( PROTOCOL );
|
||||
private JLabel mMessage = new JLabel();
|
||||
private JLabel mMessageType = new JLabel();
|
||||
private JLabel mMessage = new JLabel( " " );
|
||||
private JLabel mMessageType = new JLabel( " " );
|
||||
|
||||
public Fleetsync2DecoderPanel( SettingsManager settingsManager,
|
||||
Fleetsync2Decoder decoder )
|
||||
Fleetsync2Decoder decoder )
|
||||
{
|
||||
super( settingsManager, decoder );
|
||||
|
||||
@@ -73,25 +80,40 @@ public class Fleetsync2DecoderPanel extends DecoderPanel
|
||||
|
||||
setLayout( new MigLayout( "insets 1 0 0 0", "[grow,fill]", "[]0[]0[]") );
|
||||
|
||||
mFromLabel.setFont( mFontAuxDecoder );
|
||||
add( mFromLabel );
|
||||
mFrom.setFont( mFontAuxDecoder );
|
||||
add( mFrom );
|
||||
mFromAlias.setFont( mFontAuxDecoder );
|
||||
add( mFromAlias, "wrap" );
|
||||
|
||||
mToLabel.setFont( mFontAuxDecoder );
|
||||
mToLabel.setForeground( mColorLabelAuxDecoder );
|
||||
add( mToLabel );
|
||||
|
||||
mTo.setFont( mFontAuxDecoder );
|
||||
mTo.setForeground( mColorLabelAuxDecoder );
|
||||
add( mTo );
|
||||
|
||||
mToAlias.setFont( mFontAuxDecoder );
|
||||
mToAlias.setForeground( mColorLabelAuxDecoder );
|
||||
add( mToAlias, "wrap" );
|
||||
|
||||
mFromLabel.setFont( mFontAuxDecoder );
|
||||
mFromLabel.setForeground( mColorLabelAuxDecoder );
|
||||
add( mFromLabel );
|
||||
|
||||
mFrom.setFont( mFontAuxDecoder );
|
||||
mFrom.setForeground( mColorLabelAuxDecoder );
|
||||
add( mFrom );
|
||||
|
||||
mFromAlias.setFont( mFontAuxDecoder );
|
||||
mFromAlias.setForeground( mColorLabelAuxDecoder );
|
||||
add( mFromAlias, "wrap" );
|
||||
|
||||
mProtocol.setFont( mFontAuxDecoder );
|
||||
mProtocol.setForeground( mColorLabelAuxDecoder );
|
||||
add( mProtocol );
|
||||
|
||||
mMessageType.setFont( mFontAuxDecoder );
|
||||
mMessageType.setForeground( mColorLabelAuxDecoder );
|
||||
add( mMessageType );
|
||||
|
||||
mMessage.setFont( mFontAuxDecoder );
|
||||
mMessage.setForeground( mColorLabelAuxDecoder );
|
||||
add( mMessage, "wrap" );
|
||||
}
|
||||
|
||||
@@ -110,21 +132,23 @@ public class Fleetsync2DecoderPanel extends DecoderPanel
|
||||
|
||||
if( from != null )
|
||||
{
|
||||
mFromLabel.setText( "FM:" );
|
||||
mFromLabel.setText( "FROM:" );
|
||||
mFrom.setText( from );
|
||||
}
|
||||
else
|
||||
{
|
||||
mFromLabel.setText( " " );
|
||||
mFrom.setText( " " );
|
||||
}
|
||||
mFrom.setText( from );
|
||||
break;
|
||||
case FROM_TALKGROUP_ALIAS:
|
||||
Alias fromAlias = getState().getFromIDAlias();
|
||||
|
||||
if( fromAlias != null )
|
||||
{
|
||||
mFromAlias.setText( fromAlias.getName() );
|
||||
}
|
||||
setAliasLabel( mFromAlias, getState().getFromIDAlias() );
|
||||
break;
|
||||
case MESSAGE:
|
||||
mMessage.setText( getState().getMessage() );
|
||||
break;
|
||||
case MESSAGE_TYPE:
|
||||
mMessageType.setText( getState().getMessageType() );
|
||||
break;
|
||||
case TO_TALKGROUP:
|
||||
String to = getState().getToID();
|
||||
@@ -132,26 +156,16 @@ public class Fleetsync2DecoderPanel extends DecoderPanel
|
||||
if( to != null )
|
||||
{
|
||||
mToLabel.setText( "TO:" );
|
||||
mTo.setText( to );
|
||||
}
|
||||
else
|
||||
{
|
||||
mToLabel.setText( " " );
|
||||
mTo.setText( " " );
|
||||
}
|
||||
mTo.setText( to );
|
||||
break;
|
||||
case TO_TALKGROUP_ALIAS:
|
||||
Alias toAlias = getState().getToIDAlias();
|
||||
|
||||
if( toAlias != null )
|
||||
{
|
||||
mToAlias.setText( toAlias.getName() );
|
||||
}
|
||||
break;
|
||||
case MESSAGE:
|
||||
mMessage.setText( getState().getMessage() );
|
||||
break;
|
||||
case MESSAGE_TYPE:
|
||||
mMessageType.setText( getState().getMessageType() );
|
||||
setAliasLabel( mToAlias, getState().getToIDAlias() );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -52,8 +52,6 @@ public class FleetsyncDecoderState extends DecoderState
|
||||
public void dispose()
|
||||
{
|
||||
super.dispose();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,6 +94,8 @@ public class FleetsyncDecoderState extends DecoderState
|
||||
|
||||
if( fleetsync.isValid() )
|
||||
{
|
||||
State state = State.CALL;
|
||||
|
||||
setFromID( fleetsync.getFromID() );
|
||||
setFromIDAlias( fleetsync.getFromIDAlias() );
|
||||
mIdents.add( fleetsync.getFromID() );
|
||||
@@ -115,6 +115,7 @@ public class FleetsyncDecoderState extends DecoderState
|
||||
{
|
||||
case GPS:
|
||||
setMessage( fleetsync.getGPSLocation() );
|
||||
state = State.DATA;
|
||||
break;
|
||||
case STATUS:
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -129,10 +130,12 @@ public class FleetsyncDecoderState extends DecoderState
|
||||
}
|
||||
|
||||
setMessage( sb.toString() );
|
||||
state = State.DATA;
|
||||
break;
|
||||
case EMERGENCY:
|
||||
case LONE_WORKER_EMERGENCY:
|
||||
mEmergencyIdents.add( fleetsync.getFromID() );
|
||||
state = State.DATA;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -145,9 +148,9 @@ public class FleetsyncDecoderState extends DecoderState
|
||||
|
||||
broadcast( fsCallEvent );
|
||||
|
||||
/* Broadcast decode event. If the primary state is not already
|
||||
* in a call state, then we'll use a default decoded data state */
|
||||
broadcast( new DecoderStateEvent( this, Event.DECODE, State.DATA ) );
|
||||
/* Broadcast decode event so that the channel state will
|
||||
* kick in and reset everything */
|
||||
broadcast( new DecoderStateEvent( this, Event.DECODE, state ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ package module.decode.lj1200;
|
||||
|
||||
import instrument.Instrumentable;
|
||||
import instrument.tap.Tap;
|
||||
import instrument.tap.TapGroup;
|
||||
import instrument.tap.stream.BinaryTap;
|
||||
import instrument.tap.stream.FloatBufferTap;
|
||||
import instrument.tap.stream.FloatTap;
|
||||
@@ -58,7 +59,7 @@ public class LJ1200Decoder extends Decoder implements IRealBufferListener,
|
||||
private static final int MESSAGE_LENGTH = 80;
|
||||
|
||||
/* Instrumentation Taps */
|
||||
private ArrayList<Tap> mAvailableTaps;
|
||||
private ArrayList<TapGroup> mAvailableTaps;
|
||||
private static final String INSTRUMENT_BANDPASS_FILTER_TO_FSK2_DEMOD =
|
||||
"Tap Point: Bandpass Filter > < FSK2 Decoder";
|
||||
private static final String INSTRUMENT_FSK2_DECODER_TO_MESSAGE_FRAMER =
|
||||
@@ -131,26 +132,30 @@ public class LJ1200Decoder extends Decoder implements IRealBufferListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Tap> getTaps()
|
||||
public List<TapGroup> getTapGroups()
|
||||
{
|
||||
if( mAvailableTaps == null )
|
||||
{
|
||||
mAvailableTaps = new ArrayList<Tap>();
|
||||
mAvailableTaps = new ArrayList<TapGroup>();
|
||||
|
||||
TapGroup group = new TapGroup( "LJ-1200 Decoder" );
|
||||
|
||||
mAvailableTaps.add( new FloatTap(
|
||||
group.add( new FloatTap(
|
||||
INSTRUMENT_BANDPASS_FILTER_TO_FSK2_DEMOD, 0, 0.5f ) );
|
||||
mAvailableTaps.addAll( mFSKDecoder.getTaps() );
|
||||
mAvailableTaps.add( new BinaryTap(
|
||||
group.add( new BinaryTap(
|
||||
INSTRUMENT_FSK2_DECODER_TO_MESSAGE_FRAMER, 0, 0.025f ) );
|
||||
|
||||
mAvailableTaps.add( group );
|
||||
mAvailableTaps.addAll( mFSKDecoder.getTapGroups() );
|
||||
}
|
||||
|
||||
return mAvailableTaps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTap( Tap tap )
|
||||
public void registerTap( Tap tap )
|
||||
{
|
||||
mFSKDecoder.addTap( tap );
|
||||
mFSKDecoder.registerTap( tap );
|
||||
|
||||
switch( tap.getName() )
|
||||
{
|
||||
@@ -168,9 +173,9 @@ public class LJ1200Decoder extends Decoder implements IRealBufferListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTap( Tap tap )
|
||||
public void unregisterTap( Tap tap )
|
||||
{
|
||||
mFSKDecoder.removeTap( tap );
|
||||
mFSKDecoder.unregisterTap( tap );
|
||||
|
||||
switch( tap.getName() )
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ import settings.ColorSetting.ColorSettingName;
|
||||
import settings.Setting;
|
||||
import settings.SettingsManager;
|
||||
|
||||
public class LJ1200Panel extends DecoderPanel
|
||||
public class LJ1200DecoderPanel extends DecoderPanel
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final String PROTOCOL = "LJ-1200";
|
||||
@@ -37,7 +37,7 @@ public class LJ1200Panel extends DecoderPanel
|
||||
private JLabel mTo = new JLabel();
|
||||
private JLabel mToAlias = new JLabel();
|
||||
|
||||
public LJ1200Panel( SettingsManager settingsManager, LJ1200Decoder decoder )
|
||||
public LJ1200DecoderPanel( SettingsManager settingsManager, LJ1200Decoder decoder )
|
||||
{
|
||||
super( settingsManager, decoder );
|
||||
|
||||
@@ -19,6 +19,7 @@ package module.decode.ltrnet;
|
||||
|
||||
import instrument.Instrumentable;
|
||||
import instrument.tap.Tap;
|
||||
import instrument.tap.TapGroup;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -42,7 +43,7 @@ public class LTRNetDecoder extends Decoder
|
||||
private MessageFramer mLTRMessageFramer;
|
||||
private LTRNetMessageProcessor mLTRMessageProcessor;
|
||||
|
||||
private List<Tap> mAvailableTaps;
|
||||
private List<TapGroup> mAvailableTaps;
|
||||
|
||||
public LTRNetDecoder( DecodeConfigLTRNet config, AliasList aliasList )
|
||||
{
|
||||
@@ -87,27 +88,27 @@ public class LTRNetDecoder extends Decoder
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Tap> getTaps()
|
||||
public List<TapGroup> getTapGroups()
|
||||
{
|
||||
if( mAvailableTaps == null )
|
||||
{
|
||||
mAvailableTaps = new ArrayList<Tap>();
|
||||
mAvailableTaps = new ArrayList<TapGroup>();
|
||||
|
||||
mAvailableTaps.addAll( mLTRFSKDecoder.getTaps() );
|
||||
mAvailableTaps.addAll( mLTRFSKDecoder.getTapGroups() );
|
||||
}
|
||||
|
||||
return mAvailableTaps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTap( Tap tap )
|
||||
public void registerTap( Tap tap )
|
||||
{
|
||||
mLTRFSKDecoder.addTap( tap );
|
||||
mLTRFSKDecoder.registerTap( tap );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTap( Tap tap )
|
||||
public void unregisterTap( Tap tap )
|
||||
{
|
||||
mLTRFSKDecoder.removeTap( tap );
|
||||
mLTRFSKDecoder.unregisterTap( tap );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,19 +98,7 @@ public class LTRNetDecoderPanel extends DecoderPanel
|
||||
break;
|
||||
case TO_TALKGROUP_ALIAS:
|
||||
Alias tgAlias = state.getToTalkgroupAlias();
|
||||
|
||||
if( tgAlias != null )
|
||||
{
|
||||
mTalkgroupAlias.setText( tgAlias.getName() );
|
||||
String iconNameString = tgAlias.getIconName();
|
||||
mTalkgroupAlias.setIcon( mSettingsManager
|
||||
.getImageIcon( iconNameString, SettingsManager.DEFAULT_ICON_SIZE ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mTalkgroupAlias.setText( null );
|
||||
mTalkgroupAlias.setIcon( null );
|
||||
}
|
||||
setAliasLabel( mTalkgroupAlias, tgAlias );
|
||||
break;
|
||||
case DESCRIPTION:
|
||||
mDescription.setText( state.getDescription() );
|
||||
|
||||
@@ -22,8 +22,12 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import message.Message;
|
||||
import module.decode.event.CallEvent.CallEventType;
|
||||
import module.decode.mpt1327.MPT1327DecoderState;
|
||||
import module.decode.state.ChangedAttribute;
|
||||
import module.decode.state.DecoderState;
|
||||
import module.decode.state.DecoderStateEvent;
|
||||
@@ -34,6 +38,8 @@ import alias.AliasList;
|
||||
|
||||
public class LTRNetDecoderState extends DecoderState
|
||||
{
|
||||
private final static Logger mLog = LoggerFactory.getLogger( LTRNetDecoderState.class );
|
||||
|
||||
private DecimalFormat mDecimalFormatter = new DecimalFormat( "0.00000" );
|
||||
|
||||
private TreeSet<String> mTalkgroups = new TreeSet<String>();
|
||||
@@ -530,6 +536,7 @@ public class LTRNetDecoderState extends DecoderState
|
||||
|
||||
private void processCallMessage( LTRNetMessage message )
|
||||
{
|
||||
mLog.debug( "Processing Call Message [" + message.getMessage() + "]" );
|
||||
LTRCallEvent current = getCurrentLTRCallEvent();
|
||||
|
||||
int group = message.getGroup();
|
||||
@@ -589,11 +596,15 @@ public class LTRNetDecoderState extends DecoderState
|
||||
|
||||
broadcast( mCurrentCallEvent );
|
||||
|
||||
mLog.debug( "Decoder State: Call Start" );
|
||||
|
||||
broadcast( new DecoderStateEvent( this, Event.START,
|
||||
( type == CallEventType.CALL ) ? State.CALL : State.DATA ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mLog.debug( "Decoder State: Call Continuation Group:" + group );
|
||||
|
||||
broadcast( new DecoderStateEvent( this, Event.CONTINUATION,
|
||||
( group == 253 || group == 254 ) ? State.DATA : State.CALL ) );
|
||||
}
|
||||
@@ -611,6 +622,7 @@ public class LTRNetDecoderState extends DecoderState
|
||||
|
||||
mCurrentCallEvent = null;
|
||||
|
||||
mLog.debug( "Decoder State: Call End" );
|
||||
broadcast( new DecoderStateEvent( this, Event.END, State.FADE ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ package module.decode.mdc1200;
|
||||
|
||||
import instrument.Instrumentable;
|
||||
import instrument.tap.Tap;
|
||||
import instrument.tap.TapGroup;
|
||||
import instrument.tap.stream.BinaryTap;
|
||||
import instrument.tap.stream.FloatBufferTap;
|
||||
import instrument.tap.stream.FloatTap;
|
||||
@@ -58,7 +59,7 @@ public class MDCDecoder extends Decoder implements IRealBufferListener,
|
||||
private static final int sMESSAGE_LENGTH = 304;
|
||||
|
||||
/* Instrumentation Taps */
|
||||
private ArrayList<Tap> mAvailableTaps;
|
||||
private ArrayList<TapGroup> mAvailableTaps;
|
||||
private static final String INSTRUMENT_BANDPASS_FILTER_TO_FSK2_DEMOD =
|
||||
"Tap Point: Bandpass Filter > < FSK2 Decoder";
|
||||
private static final String INSTRUMENT_FSK2_DECODER_TO_NRZ_DECODER =
|
||||
@@ -120,28 +121,32 @@ public class MDCDecoder extends Decoder implements IRealBufferListener,
|
||||
|
||||
/* Instrumentation */
|
||||
@Override
|
||||
public List<Tap> getTaps()
|
||||
public List<TapGroup> getTapGroups()
|
||||
{
|
||||
if( mAvailableTaps == null )
|
||||
{
|
||||
mAvailableTaps = new ArrayList<Tap>();
|
||||
mAvailableTaps = new ArrayList<TapGroup>();
|
||||
|
||||
TapGroup group = new TapGroup( "MDC-1200 Decoder" );
|
||||
|
||||
mAvailableTaps.add(
|
||||
group.add(
|
||||
new FloatTap( INSTRUMENT_BANDPASS_FILTER_TO_FSK2_DEMOD, 0, 0.5f ) );
|
||||
mAvailableTaps.addAll( mFSKDecoder.getTaps() );
|
||||
mAvailableTaps.add(
|
||||
group.add(
|
||||
new BinaryTap( INSTRUMENT_FSK2_DECODER_TO_NRZ_DECODER, 0, 0.025f ) );
|
||||
mAvailableTaps.add(
|
||||
group.add(
|
||||
new BinaryTap( INSTRUMENT_NRZI_DECODER_TO_MESSAGE_FRAMER, 0, 0.025f ) );
|
||||
|
||||
mAvailableTaps.add( group );
|
||||
mAvailableTaps.addAll( mFSKDecoder.getTapGroups() );
|
||||
}
|
||||
|
||||
return mAvailableTaps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTap( Tap tap )
|
||||
public void registerTap( Tap tap )
|
||||
{
|
||||
mFSKDecoder.addTap( tap );
|
||||
mFSKDecoder.registerTap( tap );
|
||||
|
||||
switch( tap.getName() )
|
||||
{
|
||||
@@ -168,9 +173,9 @@ public class MDCDecoder extends Decoder implements IRealBufferListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTap( Tap tap )
|
||||
public void unregisterTap( Tap tap )
|
||||
{
|
||||
mFSKDecoder.removeTap( tap );
|
||||
mFSKDecoder.unregisterTap( tap );
|
||||
|
||||
switch( tap.getName() )
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ import settings.ColorSetting.ColorSettingName;
|
||||
import settings.Setting;
|
||||
import settings.SettingsManager;
|
||||
|
||||
public class MDCPanel extends DecoderPanel
|
||||
public class MDCDecoderPanel extends DecoderPanel
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final String sPROTOCOL = "MDC-1200";
|
||||
@@ -47,7 +47,7 @@ public class MDCPanel extends DecoderPanel
|
||||
private JLabel mMessage = new JLabel();
|
||||
private JLabel mMessageType = new JLabel();
|
||||
|
||||
public MDCPanel( SettingsManager settingsManager, MDCDecoder decoder )
|
||||
public MDCDecoderPanel( SettingsManager settingsManager, MDCDecoder decoder )
|
||||
{
|
||||
super( settingsManager, decoder );
|
||||
|
||||
@@ -19,6 +19,7 @@ package module.decode.mpt1327;
|
||||
|
||||
import instrument.Instrumentable;
|
||||
import instrument.tap.Tap;
|
||||
import instrument.tap.TapGroup;
|
||||
import instrument.tap.stream.BinaryTap;
|
||||
import instrument.tap.stream.FloatBufferTap;
|
||||
import instrument.tap.stream.FloatTap;
|
||||
@@ -26,11 +27,12 @@ import instrument.tap.stream.FloatTap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import module.decode.Decoder;
|
||||
import module.decode.DecoderType;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import module.decode.Decoder;
|
||||
import module.decode.DecoderType;
|
||||
import sample.Broadcaster;
|
||||
import sample.Listener;
|
||||
import sample.real.IRealBufferListener;
|
||||
@@ -38,7 +40,6 @@ import sample.real.RealBuffer;
|
||||
import alias.AliasList;
|
||||
import bits.MessageFramer;
|
||||
import bits.SyncPattern;
|
||||
import controller.channel.Channel;
|
||||
import controller.channel.Channel.ChannelType;
|
||||
import controller.channel.map.ChannelMap;
|
||||
import dsp.filter.FilterFactory;
|
||||
@@ -77,7 +78,7 @@ public class MPT1327Decoder extends Decoder
|
||||
"Tap Point: Low Pass Filter > < Decoder";
|
||||
private static final String INSTRUMENT_DECODER_TO_FRAMER =
|
||||
"Tap Point: Decoder > < Sync Detect/Message Framer";
|
||||
private List<Tap> mAvailableTaps;
|
||||
private List<TapGroup> mAvailableTaps;
|
||||
|
||||
private HalfBandFilter_RB_RB mDecimationFilter;
|
||||
private RealFIRFilter_RB_RB mLowPassFilter;
|
||||
@@ -191,31 +192,35 @@ public class MPT1327Decoder extends Decoder
|
||||
|
||||
/* Instrumentation Taps */
|
||||
@Override
|
||||
public List<Tap> getTaps()
|
||||
public List<TapGroup> getTapGroups()
|
||||
{
|
||||
if( mAvailableTaps == null )
|
||||
{
|
||||
mAvailableTaps = new ArrayList<Tap>();
|
||||
mAvailableTaps = new ArrayList<TapGroup>();
|
||||
|
||||
TapGroup group = new TapGroup( "MPT-1327 Decoder" );
|
||||
|
||||
mAvailableTaps.add(
|
||||
group.add(
|
||||
new FloatTap( INSTRUMENT_HB1_FILTER_TO_LOW_PASS, 0, 0.5f ) );
|
||||
mAvailableTaps.add(
|
||||
group.add(
|
||||
new FloatTap( INSTRUMENT_LOW_PASS_TO_DECODER, 0, 0.5f ) );
|
||||
mAvailableTaps.add(
|
||||
group.add(
|
||||
new BinaryTap( INSTRUMENT_DECODER_TO_FRAMER, 0, 0.025f ) );
|
||||
|
||||
mAvailableTaps.add( group );
|
||||
|
||||
/* Add the taps from the FSK decoder */
|
||||
mAvailableTaps.addAll( mFSKDecoder.getTaps() );
|
||||
mAvailableTaps.addAll( mFSKDecoder.getTapGroups() );
|
||||
}
|
||||
|
||||
return mAvailableTaps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTap( Tap tap )
|
||||
public void registerTap( Tap tap )
|
||||
{
|
||||
/* Send request to decoder */
|
||||
mFSKDecoder.addTap( tap );
|
||||
mFSKDecoder.registerTap( tap );
|
||||
|
||||
switch( tap.getName() )
|
||||
{
|
||||
@@ -238,9 +243,9 @@ public class MPT1327Decoder extends Decoder
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTap( Tap tap )
|
||||
public void unregisterTap( Tap tap )
|
||||
{
|
||||
mFSKDecoder.removeTap( tap );
|
||||
mFSKDecoder.unregisterTap( tap );
|
||||
|
||||
switch( tap.getName() )
|
||||
{
|
||||
|
||||
@@ -27,7 +27,6 @@ import net.miginfocom.swing.MigLayout;
|
||||
import settings.ColorSetting;
|
||||
import settings.Setting;
|
||||
import settings.SettingsManager;
|
||||
import alias.Alias;
|
||||
import controller.channel.Channel.ChannelType;
|
||||
|
||||
public class MPT1327DecoderPanel extends DecoderPanel
|
||||
@@ -119,43 +118,6 @@ public class MPT1327DecoderPanel extends DecoderPanel
|
||||
}
|
||||
}
|
||||
|
||||
private void setAliasLabel( final JLabel label, final Alias alias )
|
||||
{
|
||||
setAliasLabel( label, alias, true );
|
||||
}
|
||||
|
||||
private void setAliasLabel( final JLabel label, final Alias alias, boolean includeIcon )
|
||||
{
|
||||
if( alias != null )
|
||||
{
|
||||
label.setText( alias.getName() );
|
||||
|
||||
if( includeIcon )
|
||||
{
|
||||
String iconName = alias.getIconName();
|
||||
|
||||
if( iconName != null )
|
||||
{
|
||||
label.setIcon( mSettingsManager
|
||||
.getImageIcon( iconName, SettingsManager.DEFAULT_ICON_SIZE ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
label.setIcon( null );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
label.setIcon( null );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
label.setText( "" );
|
||||
label.setIcon( null );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receive( final ChangedAttribute changedAttribute )
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ package module.decode.p25;
|
||||
|
||||
import instrument.Instrumentable;
|
||||
import instrument.tap.Tap;
|
||||
import instrument.tap.TapGroup;
|
||||
import instrument.tap.stream.AdditiveFloatTap;
|
||||
import instrument.tap.stream.FloatTap;
|
||||
|
||||
@@ -18,7 +19,6 @@ import sample.real.RealSampleProvider;
|
||||
import source.tuner.frequency.FrequencyCorrectionControl;
|
||||
import source.tuner.frequency.FrequencyCorrectionControl.FrequencyCorrectionResetListener;
|
||||
import dsp.gain.DirectGainControl;
|
||||
import dsp.gain.GainController;
|
||||
|
||||
public class C4FMSymbolFilter implements FrequencyCorrectionResetListener,
|
||||
Listener<RealBuffer>,
|
||||
@@ -164,7 +164,7 @@ public class C4FMSymbolFilter implements FrequencyCorrectionResetListener,
|
||||
/* Instrumentation Taps */
|
||||
private static final String INSTRUMENT_SYMBOL_SPREAD = "Tap Point: Symbol Spread (Goal=2.0)";
|
||||
private FloatTap mSymbolSpreadTap;
|
||||
private List<Tap> mAvailableTaps;
|
||||
private List<TapGroup> mAvailableTaps;
|
||||
|
||||
private static final int NUMBER_FILTER_TAPS = 8;
|
||||
private static final int NUMBER_FILTER_STEPS = 128;
|
||||
@@ -427,25 +427,29 @@ public class C4FMSymbolFilter implements FrequencyCorrectionResetListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Tap> getTaps()
|
||||
public List<TapGroup> getTapGroups()
|
||||
{
|
||||
if( mAvailableTaps == null )
|
||||
{
|
||||
mAvailableTaps = new ArrayList<Tap>();
|
||||
mAvailableTaps = new ArrayList<>();
|
||||
|
||||
/*
|
||||
* Since the target is 2.0, we subtract 2.0 from the value so that
|
||||
* a good value is plotted right on the zero center line
|
||||
*/
|
||||
mAvailableTaps.add(
|
||||
TapGroup group = new TapGroup( "C4FM Symbol Filter" );
|
||||
|
||||
group.add(
|
||||
new AdditiveFloatTap( INSTRUMENT_SYMBOL_SPREAD, 0, 0.1f, -2.0f ) );
|
||||
|
||||
mAvailableTaps.add( group );
|
||||
}
|
||||
|
||||
return mAvailableTaps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTap( Tap tap )
|
||||
public void registerTap( Tap tap )
|
||||
{
|
||||
if( tap.getName().contentEquals( INSTRUMENT_SYMBOL_SPREAD ) )
|
||||
{
|
||||
@@ -454,7 +458,7 @@ public class C4FMSymbolFilter implements FrequencyCorrectionResetListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTap( Tap tap )
|
||||
public void unregisterTap( Tap tap )
|
||||
{
|
||||
if( tap.getName().contentEquals( INSTRUMENT_SYMBOL_SPREAD ) )
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ import bits.ISyncDetectListener;
|
||||
import bits.MultiSyncPatternMatcher;
|
||||
import bits.SoftSyncDetector;
|
||||
import bits.SyncDetector;
|
||||
import dsp.psk.CQPSKDemodulator;
|
||||
import dsp.psk.LSMDemodulator;
|
||||
import dsp.symbol.Dibit;
|
||||
import dsp.symbol.FrameSync;
|
||||
import edac.BCH_63_16_11;
|
||||
@@ -122,7 +122,7 @@ public class P25MessageFramer implements Listener<Dibit>
|
||||
mAssemblers.add( new P25MessageAssembler() );
|
||||
}
|
||||
|
||||
public P25MessageFramer( AliasList aliasList, CQPSKDemodulator demodulator )
|
||||
public P25MessageFramer( AliasList aliasList, LSMDemodulator demodulator )
|
||||
{
|
||||
this( aliasList );
|
||||
|
||||
@@ -675,11 +675,11 @@ public class P25MessageFramer implements Listener<Dibit>
|
||||
*/
|
||||
public class CostasPhaseErrorDetector extends SyncDetector
|
||||
{
|
||||
private CQPSKDemodulator mDemodulator;
|
||||
private LSMDemodulator mDemodulator;
|
||||
private double mCorrection;
|
||||
|
||||
public CostasPhaseErrorDetector( FrameSync frameSync,
|
||||
CQPSKDemodulator demodulator, double correction )
|
||||
LSMDemodulator demodulator, double correction )
|
||||
{
|
||||
super( frameSync.getSync() );
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
package module.decode.p25;
|
||||
|
||||
import instrument.tap.Tap;
|
||||
import instrument.tap.TapGroup;
|
||||
import instrument.tap.stream.DibitTap;
|
||||
import instrument.tap.stream.FloatBufferTap;
|
||||
import instrument.tap.stream.FloatTap;
|
||||
@@ -49,7 +50,7 @@ public class P25_C4FMDecoder extends P25Decoder implements IRealBufferListener
|
||||
|
||||
private final static int MAXIMUM_FREQUENCY_CORRECTION = 3000; //Hertz, +/-
|
||||
|
||||
private List<Tap> mAvailableTaps;
|
||||
private List<TapGroup> mAvailableTaps;
|
||||
private RealFIRFilter_RB_RB mC4FMPreFilter;
|
||||
private FrequencyCorrectionControl mFrequencyCorrectionControl;
|
||||
private C4FMSymbolFilter mSymbolFilter;
|
||||
@@ -146,21 +147,25 @@ public class P25_C4FMDecoder extends P25Decoder implements IRealBufferListener
|
||||
* Instrumentation taps for monitoring internal processing
|
||||
*/
|
||||
@Override
|
||||
public List<Tap> getTaps()
|
||||
public List<TapGroup> getTapGroups()
|
||||
{
|
||||
if( mAvailableTaps == null )
|
||||
{
|
||||
mAvailableTaps = new ArrayList<Tap>();
|
||||
mAvailableTaps = new ArrayList<>();
|
||||
|
||||
mAvailableTaps.add( new FloatTap( INSTRUMENT_FILTER_OUTPUT, 0, 1.0f ) );
|
||||
TapGroup group = new TapGroup( "P25 C4FM Decoder" );
|
||||
|
||||
group.add( new FloatTap( INSTRUMENT_FILTER_OUTPUT, 0, 1.0f ) );
|
||||
|
||||
group.add( new FloatTap( INSTRUMENT_C4FM_SYMBOL_FILTER_OUTPUT, 0, 0.1f ) );
|
||||
group.add( new DibitTap( INSTRUMENT_C4FM_SLICER_OUTPUT, 0, 0.1f ) );
|
||||
|
||||
mAvailableTaps.add( group );
|
||||
|
||||
if( mSymbolFilter != null )
|
||||
{
|
||||
mAvailableTaps.addAll( mSymbolFilter.getTaps() );
|
||||
mAvailableTaps.addAll( mSymbolFilter.getTapGroups() );
|
||||
}
|
||||
|
||||
mAvailableTaps.add( new FloatTap( INSTRUMENT_C4FM_SYMBOL_FILTER_OUTPUT, 0, 0.1f ) );
|
||||
mAvailableTaps.add( new DibitTap( INSTRUMENT_C4FM_SLICER_OUTPUT, 0, 0.1f ) );
|
||||
}
|
||||
|
||||
return mAvailableTaps;
|
||||
@@ -170,11 +175,11 @@ public class P25_C4FMDecoder extends P25Decoder implements IRealBufferListener
|
||||
* Adds an instrumentation tap to monitor internal processing.
|
||||
*/
|
||||
@Override
|
||||
public void addTap( Tap tap )
|
||||
public void registerTap( Tap tap )
|
||||
{
|
||||
if( mSymbolFilter != null )
|
||||
{
|
||||
mSymbolFilter.addTap( tap );
|
||||
mSymbolFilter.registerTap( tap );
|
||||
}
|
||||
|
||||
switch( tap.getName() )
|
||||
@@ -207,11 +212,11 @@ public class P25_C4FMDecoder extends P25Decoder implements IRealBufferListener
|
||||
* Removes the instrumentation tap.
|
||||
*/
|
||||
@Override
|
||||
public void removeTap( Tap tap )
|
||||
public void unregisterTap( Tap tap )
|
||||
{
|
||||
if( mSymbolFilter != null )
|
||||
{
|
||||
mSymbolFilter.removeTap( tap );
|
||||
mSymbolFilter.unregisterTap( tap );
|
||||
}
|
||||
|
||||
switch( tap.getName() )
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
package module.decode.p25;
|
||||
|
||||
import instrument.tap.Tap;
|
||||
import instrument.tap.TapGroup;
|
||||
import instrument.tap.stream.ComplexSampleTap;
|
||||
import instrument.tap.stream.ComplexTap;
|
||||
import instrument.tap.stream.DibitTap;
|
||||
@@ -40,7 +41,7 @@ import dsp.filter.FilterFactory;
|
||||
import dsp.filter.Window.WindowType;
|
||||
import dsp.filter.fir.complex.ComplexFIRFilter_CB_CB;
|
||||
import dsp.gain.ComplexFeedForwardGainControl;
|
||||
import dsp.psk.CQPSKDemodulator;
|
||||
import dsp.psk.LSMDemodulator;
|
||||
import dsp.psk.QPSKPolarSlicer;
|
||||
|
||||
public class P25_LSMDecoder extends P25Decoder implements IComplexBufferListener
|
||||
@@ -53,14 +54,14 @@ public class P25_LSMDecoder extends P25Decoder implements IComplexBufferListener
|
||||
private static final String INSTRUMENT_QPSK_DEMODULATOR_OUTPUT = "Tap Point: CQPSK Demodulator Output";
|
||||
private static final String INSTRUMENT_CQPSK_SLICER_OUTPUT = "Tap Point: CQPSK Slicer Output";
|
||||
|
||||
private List<Tap> mAvailableTaps;
|
||||
|
||||
private List<TapGroup> mAvailableTaps;
|
||||
|
||||
private ComplexFIRFilter_CB_CB mBasebandFilter;
|
||||
private ComplexBufferToStreamConverter mStreamConverter =
|
||||
new ComplexBufferToStreamConverter();
|
||||
private ComplexFeedForwardGainControl mAGC =
|
||||
new ComplexFeedForwardGainControl( 32 );
|
||||
private CQPSKDemodulator mCQPSKDemodulator = new CQPSKDemodulator();
|
||||
private LSMDemodulator mCQPSKDemodulator = new LSMDemodulator();
|
||||
private QPSKPolarSlicer mCQPSKSlicer = new QPSKPolarSlicer();
|
||||
private P25MessageFramer mMessageFramer;
|
||||
|
||||
@@ -137,20 +138,24 @@ public class P25_LSMDecoder extends P25Decoder implements IComplexBufferListener
|
||||
* Provides a list of instrumentation taps for monitoring internal processing
|
||||
*/
|
||||
@Override
|
||||
public List<Tap> getTaps()
|
||||
public List<TapGroup> getTapGroups()
|
||||
{
|
||||
if( mAvailableTaps == null )
|
||||
{
|
||||
mAvailableTaps = new ArrayList<Tap>();
|
||||
mAvailableTaps = new ArrayList<>();
|
||||
|
||||
mAvailableTaps.add( new ComplexTap( INSTRUMENT_BASEBAND_FILTER_OUTPUT, 0, 1.0f ) );
|
||||
mAvailableTaps.add( new ComplexTap( INSTRUMENT_AGC_OUTPUT, 0, 1.0f ) );
|
||||
mAvailableTaps.add( new QPSKTap( INSTRUMENT_QPSK_DEMODULATOR_OUTPUT, 0, 1.0f ) );
|
||||
mAvailableTaps.add( new DibitTap( INSTRUMENT_CQPSK_SLICER_OUTPUT, 0, 0.1f ) );
|
||||
TapGroup group = new TapGroup( "P25 LSM Decoder" );
|
||||
|
||||
group.add( new ComplexTap( INSTRUMENT_BASEBAND_FILTER_OUTPUT, 0, 1.0f ) );
|
||||
group.add( new ComplexTap( INSTRUMENT_AGC_OUTPUT, 0, 1.0f ) );
|
||||
group.add( new QPSKTap( INSTRUMENT_QPSK_DEMODULATOR_OUTPUT, 0, 1.0f ) );
|
||||
group.add( new DibitTap( INSTRUMENT_CQPSK_SLICER_OUTPUT, 0, 0.1f ) );
|
||||
|
||||
mAvailableTaps.add( group );
|
||||
|
||||
if( mCQPSKDemodulator != null )
|
||||
{
|
||||
mAvailableTaps.addAll( mCQPSKDemodulator.getTaps() );
|
||||
mAvailableTaps.addAll( mCQPSKDemodulator.getTapGroups() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,11 +166,11 @@ public class P25_LSMDecoder extends P25Decoder implements IComplexBufferListener
|
||||
* Adds the instrumentation tap
|
||||
*/
|
||||
@Override
|
||||
public void addTap( Tap tap )
|
||||
public void registerTap( Tap tap )
|
||||
{
|
||||
if( mCQPSKDemodulator != null )
|
||||
{
|
||||
mCQPSKDemodulator.addTap( tap );
|
||||
mCQPSKDemodulator.registerTap( tap );
|
||||
}
|
||||
|
||||
switch( tap.getName() )
|
||||
@@ -198,11 +203,11 @@ public class P25_LSMDecoder extends P25Decoder implements IComplexBufferListener
|
||||
* Removes the instrumentation tap
|
||||
*/
|
||||
@Override
|
||||
public void removeTap( Tap tap )
|
||||
public void unregisterTap( Tap tap )
|
||||
{
|
||||
if( mCQPSKDemodulator != null )
|
||||
{
|
||||
mCQPSKDemodulator.removeTap( tap );
|
||||
mCQPSKDemodulator.unregisterTap( tap );
|
||||
}
|
||||
|
||||
switch( tap.getName() )
|
||||
|
||||
@@ -19,6 +19,7 @@ package module.decode.passport;
|
||||
|
||||
import instrument.Instrumentable;
|
||||
import instrument.tap.Tap;
|
||||
import instrument.tap.TapGroup;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -44,7 +45,7 @@ public class PassportDecoder extends Decoder
|
||||
private MessageFramer mPassportMessageFramer;
|
||||
private PassportMessageProcessor mPassportMessageProcessor;
|
||||
|
||||
private List<Tap> mAvailableTaps;
|
||||
private List<TapGroup> mAvailableTaps;
|
||||
|
||||
public PassportDecoder( DecodeConfiguration config,
|
||||
AliasList aliasList )
|
||||
@@ -77,27 +78,27 @@ public class PassportDecoder extends Decoder
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Tap> getTaps()
|
||||
public List<TapGroup> getTapGroups()
|
||||
{
|
||||
if( mAvailableTaps == null )
|
||||
{
|
||||
mAvailableTaps = new ArrayList<Tap>();
|
||||
mAvailableTaps = new ArrayList<>();
|
||||
|
||||
mAvailableTaps.addAll( mPassportFSKDecoder.getTaps() );
|
||||
mAvailableTaps.addAll( mPassportFSKDecoder.getTapGroups() );
|
||||
}
|
||||
|
||||
return mAvailableTaps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTap( Tap tap )
|
||||
public void registerTap( Tap tap )
|
||||
{
|
||||
mPassportFSKDecoder.addTap( tap );
|
||||
mPassportFSKDecoder.registerTap( tap );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTap( Tap tap )
|
||||
public void unregisterTap( Tap tap )
|
||||
{
|
||||
mPassportFSKDecoder.removeTap( tap );
|
||||
mPassportFSKDecoder.unregisterTap( tap );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,13 +224,19 @@ public class ChannelState extends Module implements ICallEventProvider,
|
||||
* don't have signaling on the traffic channel that can be used to
|
||||
* update the fade timeout, so we set the timeout value larger to ensure
|
||||
* the channel doesn't fade before the end of the call. */
|
||||
long timeout = System.currentTimeMillis() +
|
||||
long current = System.currentTimeMillis();
|
||||
|
||||
long timeout = current +
|
||||
( mChannelType == ChannelType.STANDARD ? FADE_TIMEOUT_DELAY :
|
||||
mTrafficChannelTimeout );
|
||||
|
||||
|
||||
mLog.debug( "Updating Fade Timeout - previous [" + mFadeTimeout + "] new [" + timeout + "] current [" + current + "] delay [" + ( mChannelType == ChannelType.STANDARD ? FADE_TIMEOUT_DELAY :
|
||||
mTrafficChannelTimeout ) + "]" );
|
||||
|
||||
if( timeout > mFadeTimeout )
|
||||
{
|
||||
mFadeTimeout = timeout;
|
||||
mLog.debug( "Timeout updated to: " + mFadeTimeout );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,6 +307,7 @@ public class ChannelState extends Module implements ICallEventProvider,
|
||||
case CONTROL:
|
||||
case DATA:
|
||||
case ENCRYPTED:
|
||||
mLog.debug( "Squelching for [" + state + "]" );
|
||||
broadcast( SquelchState.SQUELCH );
|
||||
updateFadeTimeout();
|
||||
startMonitor();
|
||||
@@ -311,16 +318,19 @@ public class ChannelState extends Module implements ICallEventProvider,
|
||||
startMonitor();
|
||||
break;
|
||||
case FADE:
|
||||
mLog.debug( "Squelching for [" + state + "]" );
|
||||
broadcast( SquelchState.SQUELCH );
|
||||
updateResetTimeout();
|
||||
startMonitor();
|
||||
break;
|
||||
case END:
|
||||
mLog.debug( "Squelching for [" + state + "]" );
|
||||
broadcast( SquelchState.SQUELCH );
|
||||
broadcast( new DecoderStateEvent( this, Event.RESET, State.IDLE ) );
|
||||
broadcast( new MetadataReset() );
|
||||
break;
|
||||
case IDLE:
|
||||
mLog.debug( "Squelching for [" + state + "]" );
|
||||
broadcast( SquelchState.SQUELCH );
|
||||
stopMonitor();
|
||||
|
||||
@@ -371,6 +381,7 @@ public class ChannelState extends Module implements ICallEventProvider,
|
||||
{
|
||||
if( mFadeTimeout <= System.currentTimeMillis() )
|
||||
{
|
||||
mLog.debug( "Fading for timeout [" + mFadeTimeout + "] current [" + System.currentTimeMillis() + "]" );
|
||||
setState( State.FADE );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,10 @@ package module.decode.state;
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import alias.Alias;
|
||||
import module.decode.Decoder;
|
||||
import sample.Listener;
|
||||
import settings.ColorSetting;
|
||||
@@ -37,7 +39,7 @@ public abstract class DecoderPanel extends JPanel
|
||||
|
||||
protected Font mFontDetails = new Font( Font.MONOSPACED, Font.PLAIN, 12 );
|
||||
protected Font mFontDecoder = new Font( Font.MONOSPACED, Font.PLAIN, 12 );
|
||||
protected Font mFontAuxDecoder = new Font( Font.MONOSPACED, Font.PLAIN, 12 );
|
||||
protected Font mFontAuxDecoder = new Font( Font.MONOSPACED, Font.PLAIN, 10 );
|
||||
public static final int ICON_SIZE = 12;
|
||||
|
||||
protected Color mColorLabelDetails;
|
||||
@@ -118,4 +120,42 @@ public abstract class DecoderPanel extends JPanel
|
||||
|
||||
@Override
|
||||
public void settingDeleted( Setting setting ) {}
|
||||
|
||||
protected void setAliasLabel( final JLabel label, final Alias alias )
|
||||
{
|
||||
setAliasLabel( label, alias, true );
|
||||
}
|
||||
|
||||
protected void setAliasLabel( final JLabel label, final Alias alias, boolean includeIcon )
|
||||
{
|
||||
if( alias != null )
|
||||
{
|
||||
label.setText( alias.getName() );
|
||||
|
||||
if( includeIcon )
|
||||
{
|
||||
String iconName = alias.getIconName();
|
||||
|
||||
if( iconName != null )
|
||||
{
|
||||
label.setIcon( mSettingsManager
|
||||
.getImageIcon( iconName, SettingsManager.DEFAULT_ICON_SIZE ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
label.setIcon( null );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
label.setIcon( null );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
label.setText( "" );
|
||||
label.setIcon( null );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ package module.decode.tait;
|
||||
|
||||
import instrument.Instrumentable;
|
||||
import instrument.tap.Tap;
|
||||
import instrument.tap.TapGroup;
|
||||
import instrument.tap.stream.BinaryTap;
|
||||
import instrument.tap.stream.FloatBufferTap;
|
||||
import instrument.tap.stream.FloatTap;
|
||||
@@ -57,7 +58,7 @@ public class Tait1200Decoder extends Decoder implements IRealBufferListener,
|
||||
private static final int MESSAGE_LENGTH = 440;
|
||||
|
||||
/* Instrumentation Taps */
|
||||
private ArrayList<Tap> mAvailableTaps;
|
||||
private ArrayList<TapGroup> mAvailableTaps;
|
||||
private static final String INSTRUMENT_BANDPASS_FILTER_TO_FSK2_DEMOD =
|
||||
"Tap Point: Bandpass Filter > < FSK2 Decoder";
|
||||
private static final String INSTRUMENT_FSK2_DECODER_TO_MESSAGE_FRAMER =
|
||||
@@ -123,26 +124,31 @@ public class Tait1200Decoder extends Decoder implements IRealBufferListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Tap> getTaps()
|
||||
public List<TapGroup> getTapGroups()
|
||||
{
|
||||
if( mAvailableTaps == null )
|
||||
{
|
||||
mAvailableTaps = new ArrayList<Tap>();
|
||||
mAvailableTaps = new ArrayList<>();
|
||||
|
||||
TapGroup group = new TapGroup( "Tait 1200 Decoder" );
|
||||
|
||||
mAvailableTaps.add( new FloatTap(
|
||||
group.add( new FloatTap(
|
||||
INSTRUMENT_BANDPASS_FILTER_TO_FSK2_DEMOD, 0, 0.5f ) );
|
||||
mAvailableTaps.addAll( mFSKDecoder.getTaps() );
|
||||
mAvailableTaps.add( new BinaryTap(
|
||||
group.add( new BinaryTap(
|
||||
INSTRUMENT_FSK2_DECODER_TO_MESSAGE_FRAMER, 0, 0.025f ) );
|
||||
|
||||
mAvailableTaps.add( group );
|
||||
|
||||
mAvailableTaps.addAll( mFSKDecoder.getTapGroups() );
|
||||
}
|
||||
|
||||
return mAvailableTaps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTap( Tap tap )
|
||||
public void registerTap( Tap tap )
|
||||
{
|
||||
mFSKDecoder.addTap( tap );
|
||||
mFSKDecoder.registerTap( tap );
|
||||
|
||||
switch( tap.getName() )
|
||||
{
|
||||
@@ -159,9 +165,9 @@ public class Tait1200Decoder extends Decoder implements IRealBufferListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTap( Tap tap )
|
||||
public void unregisterTap( Tap tap )
|
||||
{
|
||||
mFSKDecoder.removeTap( tap );
|
||||
mFSKDecoder.unregisterTap( tap );
|
||||
|
||||
switch( tap.getName() )
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ import settings.ColorSetting.ColorSettingName;
|
||||
import settings.Setting;
|
||||
import settings.SettingsManager;
|
||||
|
||||
public class Tait1200Panel extends DecoderPanel
|
||||
public class Tait1200DecoderPanel extends DecoderPanel
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final String PROTOCOL = "TAIT-1200";
|
||||
@@ -47,7 +47,7 @@ public class Tait1200Panel extends DecoderPanel
|
||||
private JLabel mMessage = new JLabel();
|
||||
private JLabel mMessageType = new JLabel();
|
||||
|
||||
public Tait1200Panel( SettingsManager settingsManager, Tait1200Decoder decoder )
|
||||
public Tait1200DecoderPanel( SettingsManager settingsManager, Tait1200Decoder decoder )
|
||||
{
|
||||
super( settingsManager, decoder );
|
||||
|
||||
@@ -21,6 +21,10 @@ import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import controller.channel.Channel;
|
||||
import module.Module;
|
||||
import module.log.MessageEventLogger.Type;
|
||||
import module.log.config.EventLogConfiguration;
|
||||
@@ -28,6 +32,8 @@ import properties.SystemProperties;
|
||||
|
||||
public class EventLogManager
|
||||
{
|
||||
private final static Logger mLog = LoggerFactory.getLogger( EventLogManager.class );
|
||||
|
||||
private Path mDirectory;
|
||||
|
||||
public EventLogManager()
|
||||
|
||||
Reference in New Issue
Block a user