mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 01:27:34 -05:00
Decouples DecoderState from the Decoder and makes DecoderState inherit
from Module so that Decoder can function independent of DecoderSTate and DecoderState can more cleanly interface with other modules. Resolves issue with LTR-type decoders where the AudioModule was filtering demodulated audio buffers before the decoder received the audio - demodulated audio buffers are now copied before creating AudioPackets.
This commit is contained in:
@@ -50,8 +50,6 @@ public class PassportDecoder extends Decoder
|
||||
public PassportDecoder( DecodeConfiguration config,
|
||||
AliasList aliasList )
|
||||
{
|
||||
super( new PassportDecoderState( aliasList ) );
|
||||
|
||||
mPassportFSKDecoder = new LTRFSKDecoder();
|
||||
|
||||
mPassportMessageFramer =
|
||||
@@ -101,4 +99,25 @@ public class PassportDecoder extends Decoder
|
||||
{
|
||||
mPassportFSKDecoder.unregisterTap( tap );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,9 +40,10 @@ public class PassportDecoderPanel extends DecoderPanel
|
||||
private JLabel mFromTalkgroup = new JLabel();
|
||||
private JLabel mFromTalkgroupAlias = new JLabel();
|
||||
|
||||
public PassportDecoderPanel( SettingsManager settingsManager, PassportDecoder decoder )
|
||||
public PassportDecoderPanel( SettingsManager settingsManager,
|
||||
PassportDecoderState decoderState )
|
||||
{
|
||||
super( settingsManager, decoder );
|
||||
super( settingsManager, decoderState );
|
||||
|
||||
init();
|
||||
}
|
||||
@@ -81,9 +82,9 @@ public class PassportDecoderPanel extends DecoderPanel
|
||||
add( mFromTalkgroupAlias, "wrap" );
|
||||
}
|
||||
|
||||
private PassportDecoderState getDecoderState()
|
||||
public PassportDecoderState getDecoderState()
|
||||
{
|
||||
return (PassportDecoderState)getDecoder().getDecoderState();
|
||||
return (PassportDecoderState)super.getDecoderState();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.util.Iterator;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import message.Message;
|
||||
import module.decode.DecoderType;
|
||||
import module.decode.state.ChangedAttribute;
|
||||
import module.decode.state.DecoderState;
|
||||
import module.decode.state.DecoderStateEvent;
|
||||
@@ -65,6 +66,22 @@ public class PassportDecoderState extends DecoderState
|
||||
}
|
||||
|
||||
@Override
|
||||
public DecoderType getDecoderType()
|
||||
{
|
||||
return DecoderType.PASSPORT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings( "incomplete-switch" )
|
||||
public void receive( Message message )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user