mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Work in progress
This commit is contained in:
@@ -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 ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user