Merges #34 Major redesign of Tuner, Channel and Alias management.

Changes to model, view and controller components and updates all gui
editors.  Removes the configuration panel and tree and replaces with 3
new panels.  Updates playlist.xml to a new playlist_v2.xml format.
This commit is contained in:
denny
2016-04-01 08:23:49 -04:00
450 changed files with 19560 additions and 22805 deletions

View File

@@ -9,12 +9,13 @@ import java.util.List;
import module.Module;
import module.ProcessingChain;
import source.Source;
import controller.channel.Channel.ChannelType;
public class InstrumentableProcessingChain extends ProcessingChain implements Instrumentable
{
public InstrumentableProcessingChain( String name )
public InstrumentableProcessingChain()
{
super( name );
super( "instrumented", ChannelType.STANDARD );
}
public void setSource( Source source ) throws IllegalStateException

View File

@@ -24,10 +24,6 @@ import java.awt.Dimension;
import javax.swing.JInternalFrame;
import net.miginfocom.swing.MigLayout;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sample.Listener;
import sample.complex.Complex;
import source.IFrameLocationListener;
@@ -36,11 +32,8 @@ public class ConstellationPanel extends JInternalFrame
implements IFrameLocationListener, Listener<Complex>
{
private static final long serialVersionUID = 1L;
private final static Logger mLog =
LoggerFactory.getLogger( ConstellationPanel.class );
private ConstellationViewer mConstellation =
new ConstellationViewer( 48000, 4800 );
private ConstellationViewer mConstellation = new ConstellationViewer( 48000, 4800 );
public ConstellationPanel()
{

View File

@@ -8,18 +8,21 @@ import javax.swing.JButton;
import javax.swing.JDesktopPane;
import javax.swing.JInternalFrame;
import module.decode.DecodeComponentEditor;
import module.decode.config.DecodeConfiguration;
import module.decode.DecodeConfigurationEditor;
import net.miginfocom.swing.MigLayout;
import playlist.PlaylistManager;
import source.IControllableFileSource;
import controller.ResourceManager;
import alias.AliasModel;
import controller.ThreadPoolManager;
import controller.channel.ChannelModel;
import controller.channel.map.ChannelMapModel;
public class DecoderSelectionFrame extends JInternalFrame
{
private static final long serialVersionUID = 1L;
private DecodeComponentEditor mDecodeEditor = new DecodeComponentEditor( null );
private ResourceManager mResourceManager = new ResourceManager();
private DecodeConfigurationEditor mDecodeEditor = new DecodeConfigurationEditor( null );
private PlaylistManager mPlaylistManager;
private IControllableFileSource mSource;
private JDesktopPane mDesktop;
@@ -27,6 +30,14 @@ public class DecoderSelectionFrame extends JInternalFrame
public DecoderSelectionFrame( JDesktopPane desktop,
IControllableFileSource source )
{
AliasModel aliasModel = new AliasModel();
ChannelModel channelModel = new ChannelModel();
ChannelMapModel channelMapModel = new ChannelMapModel();
ThreadPoolManager tpm = new ThreadPoolManager();
mPlaylistManager = new PlaylistManager( tpm, aliasModel, channelModel, channelMapModel );
mDesktop = desktop;
mSource = source;
@@ -65,22 +76,17 @@ public class DecoderSelectionFrame extends JInternalFrame
@Override
public void actionPerformed( ActionEvent arg0 )
{
DecodeConfiguration config = mDecodeEditor.getDecodeConfig();
if( config != null )
{
DecoderViewFrame decoderFrame = new DecoderViewFrame(
mResourceManager,
config,
null,
null,
null,
mSource );
decoderFrame.setVisible( true );
mDesktop.add( decoderFrame );
}
// DecodeConfiguration config = mDecodeEditor.getDecodeConfig();
//
// if( config != null )
// {
// DecoderViewFrame decoderFrame = new DecoderViewFrame(
// mPlaylistManager, null, mSource );
//
// decoderFrame.setVisible( true );
//
// mDesktop.add( decoderFrame );
// }
}
} );
}

View File

@@ -57,22 +57,22 @@ import javax.swing.JSeparator;
import message.Message;
import module.Module;
import module.decode.DecoderFactory;
import module.decode.config.AuxDecodeConfiguration;
import module.decode.config.DecodeConfiguration;
import module.log.EventLogManager;
import net.miginfocom.swing.MigLayout;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import record.config.RecordConfiguration;
import playlist.PlaylistManager;
import sample.Listener;
import source.IControllableFileSource;
import source.Source;
import alias.AliasList;
import controller.ResourceManager;
import controller.channel.Channel.ChannelType;
import controller.site.Site;
import controller.system.System;
import alias.AliasModel;
import controller.channel.Channel;
import controller.channel.ChannelModel;
import controller.channel.ChannelProcessingManager;
import controller.channel.map.ChannelMapModel;
public class DecoderViewFrame extends JInternalFrame
implements Listener<Message>
@@ -88,29 +88,25 @@ public class DecoderViewFrame extends JInternalFrame
private HashMap<Tap,TapViewPanel> mPanelMap =
new HashMap<Tap,TapViewPanel>();
public DecoderViewFrame( ResourceManager resourceManager,
DecodeConfiguration decodeConfig,
RecordConfiguration recordConfig,
AuxDecodeConfiguration auxConfig,
AliasList aliasList,
public DecoderViewFrame( PlaylistManager playlistManager,
Channel channel,
IControllableFileSource source )
{
mSource = source;
mDecodeConfig = decodeConfig;
mDecodeConfig = channel.getDecodeConfiguration();
mProcessingChain = new InstrumentableProcessingChain( "instrumented" );
mProcessingChain = new InstrumentableProcessingChain();
ChannelModel channelModel = new ChannelModel();
ChannelMapModel channelMapModel = new ChannelMapModel();
List<Module> modules = DecoderFactory
.getModules( ChannelType.STANDARD,
resourceManager,
decodeConfig,
recordConfig,
auxConfig,
aliasList,
new System( "Instrumented" ),
new Site( "Instrumented" ),
"Channel Name" );
ChannelProcessingManager channelProcessingManager =
new ChannelProcessingManager( channelModel, channelMapModel,
new AliasModel(), new EventLogManager(), null, null );
List<Module> modules = DecoderFactory.getModules( channelModel,
channelMapModel, channelProcessingManager, new AliasModel(), channel );
mProcessingChain.addModules( modules );

View File

@@ -114,10 +114,8 @@ public class Viewer
/* Attempt to open file as a 1-channel float source */
try
{
RealWaveSource floatSource = new RealWaveSource( file );
floatSource.open();
source = floatSource;
source = new RealWaveSource( file );
source.open();
mLog.info( "File opened as float wave file" );

View File

@@ -31,12 +31,14 @@ import javax.swing.JPanel;
public abstract class TapViewPanel extends JPanel implements Observer
{
protected SampleModel mModel;
private static final long serialVersionUID = 1L;
protected SampleModel<?> mModel;
protected String mLabel;
protected float mVerticalZoom = 1.0f;
public TapViewPanel( SampleModel model, String label )
public TapViewPanel( SampleModel<?> model, String label )
{
mModel = model;
mModel.addObserver( this );
@@ -76,7 +78,7 @@ public abstract class TapViewPanel extends JPanel implements Observer
return menu;
}
public SampleModel getModel()
public SampleModel<?> getModel()
{
return mModel;
}
@@ -104,6 +106,8 @@ public abstract class TapViewPanel extends JPanel implements Observer
public class VerticalZoomItem extends JCheckBoxMenuItem
{
private static final long serialVersionUID = 1L;
private TapViewPanel mPanel;
private float mZoom;

View File

@@ -37,7 +37,6 @@ public class BinaryTapViewPanel extends TapViewPanel
private Tap mTap;
private List<Boolean> mSamples;
private int mSampleCount;
private int mOffset = 0;
public BinaryTapViewPanel( BinaryTap tap )
{