mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Adds P25 ability to ignore/follow data channel grants (defaults to
ignore)
This commit is contained in:
@@ -66,7 +66,7 @@ import module.decode.p25.DecodeConfigP25Phase1;
|
||||
import module.decode.p25.P25Decoder.Modulation;
|
||||
import module.decode.p25.P25DecoderPanel;
|
||||
import module.decode.p25.P25DecoderState;
|
||||
import module.decode.p25.P25Editor;
|
||||
import module.decode.p25.P25DecodeEditor;
|
||||
import module.decode.p25.P25_C4FMDecoder;
|
||||
import module.decode.p25.P25_LSMDecoder;
|
||||
import module.decode.p25.audio.P25AudioModule;
|
||||
@@ -236,7 +236,7 @@ public class DecoderFactory
|
||||
|
||||
modules.add( new TrafficChannelManager( resourceManager,
|
||||
decodeConfig, recordConfig, system, site,
|
||||
aliasList.getName(), timeout,
|
||||
( aliasList != null ? aliasList.getName() : null ), timeout,
|
||||
mptConfig.getTrafficChannelPoolSize() ) );
|
||||
}
|
||||
|
||||
@@ -258,11 +258,13 @@ public class DecoderFactory
|
||||
case C4FM:
|
||||
modules.add( getFMDemodulator( decodeConfig, 6750, 7500, REMOVE_DC ) );
|
||||
modules.add( new P25_C4FMDecoder( aliasList ) );
|
||||
modules.add( new P25DecoderState( aliasList, channelType, Modulation.C4FM ) );
|
||||
modules.add( new P25DecoderState( aliasList, channelType,
|
||||
Modulation.C4FM, p25Config.getIgnoreDataCalls() ) );
|
||||
break;
|
||||
case CQPSK:
|
||||
modules.add( new P25_LSMDecoder( aliasList ) );
|
||||
modules.add( new P25DecoderState( aliasList, channelType, Modulation.CQPSK ) );
|
||||
modules.add( new P25DecoderState( aliasList, channelType,
|
||||
Modulation.CQPSK, p25Config.getIgnoreDataCalls() ) );
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException( "Unrecognized P25 "
|
||||
@@ -276,7 +278,7 @@ public class DecoderFactory
|
||||
|
||||
modules.add( new TrafficChannelManager( resourceManager,
|
||||
decodeConfig, recordConfig, system, site,
|
||||
aliasList.getName(), timeout,
|
||||
( aliasList != null ? aliasList.getName() : null ), timeout,
|
||||
p25Config.getTrafficChannelPoolSize() ) );
|
||||
}
|
||||
|
||||
@@ -469,7 +471,7 @@ public class DecoderFactory
|
||||
configuredPanel = new PassportEditor( config );
|
||||
break;
|
||||
case P25_PHASE1:
|
||||
configuredPanel = new P25Editor( config );
|
||||
configuredPanel = new P25DecodeEditor( config );
|
||||
break;
|
||||
default:
|
||||
configuredPanel = new DecodeEditor( config );
|
||||
|
||||
@@ -30,6 +30,7 @@ public class DecodeConfigP25Phase1 extends DecodeConfiguration
|
||||
|
||||
private int mCallTimeout = 1;
|
||||
private int mTrafficChannelPoolSize = TRAFFIC_CHANNEL_LIMIT_DEFAULT;
|
||||
private boolean mIgnoreDataCalls = true;
|
||||
|
||||
public DecodeConfigP25Phase1()
|
||||
{
|
||||
@@ -53,6 +54,17 @@ public class DecodeConfigP25Phase1 extends DecodeConfiguration
|
||||
{
|
||||
mModulation = modulation;
|
||||
}
|
||||
|
||||
@XmlAttribute( name = "ignore_data_calls" )
|
||||
public boolean getIgnoreDataCalls()
|
||||
{
|
||||
return mIgnoreDataCalls;
|
||||
}
|
||||
|
||||
public void setIgnoreDataCalls( boolean ignore )
|
||||
{
|
||||
mIgnoreDataCalls = ignore;
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: this field is now deprecated.
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
package module.decode.p25;
|
||||
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JSlider;
|
||||
@@ -36,17 +37,18 @@ import source.tuner.TunerEditor;
|
||||
import controller.Editor;
|
||||
import controller.channel.ChannelValidationException;
|
||||
|
||||
public class P25Editor extends DecodeEditor
|
||||
public class P25DecodeEditor extends DecodeEditor
|
||||
{
|
||||
private final static Logger mLog = LoggerFactory.getLogger( P25Editor.class );
|
||||
private final static Logger mLog = LoggerFactory.getLogger( P25DecodeEditor.class );
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private JComboBox<P25_LSMDecoder.Modulation> mComboModulation;
|
||||
private JCheckBox mIgnoreDataCalls;
|
||||
private JLabel mTrafficChannelPoolSizeLabel;
|
||||
private JSlider mTrafficChannelPoolSize;
|
||||
|
||||
public P25Editor( DecodeConfiguration config )
|
||||
public P25DecodeEditor( DecodeConfiguration config )
|
||||
{
|
||||
super( config );
|
||||
|
||||
@@ -55,12 +57,14 @@ public class P25Editor extends DecodeEditor
|
||||
|
||||
private void initGUI()
|
||||
{
|
||||
final DecodeConfigP25Phase1 config = (DecodeConfigP25Phase1)mConfig;
|
||||
|
||||
mComboModulation = new JComboBox<P25_LSMDecoder.Modulation>();
|
||||
|
||||
mComboModulation.setModel( new DefaultComboBoxModel<P25_LSMDecoder.Modulation>(
|
||||
P25_LSMDecoder.Modulation.values() ) );
|
||||
|
||||
mComboModulation.setSelectedItem( ((DecodeConfigP25Phase1)mConfig).getModulation() );
|
||||
mComboModulation.setSelectedItem( config.getModulation() );
|
||||
|
||||
add( new JLabel( "Modulation:" ) );
|
||||
add( mComboModulation, "wrap" );
|
||||
@@ -68,7 +72,7 @@ public class P25Editor extends DecodeEditor
|
||||
mTrafficChannelPoolSize = new JSlider( JSlider.HORIZONTAL,
|
||||
DecodeConfiguration.TRAFFIC_CHANNEL_LIMIT_MINIMUM,
|
||||
DecodeConfiguration.TRAFFIC_CHANNEL_LIMIT_MAXIMUM,
|
||||
DecodeConfiguration.TRAFFIC_CHANNEL_LIMIT_DEFAULT );
|
||||
config.getTrafficChannelPoolSize() );
|
||||
|
||||
mTrafficChannelPoolSize.setMajorTickSpacing( 10 );
|
||||
mTrafficChannelPoolSize.setMinorTickSpacing( 1 );
|
||||
@@ -90,6 +94,12 @@ public class P25Editor extends DecodeEditor
|
||||
|
||||
add( mTrafficChannelPoolSizeLabel );
|
||||
add( mTrafficChannelPoolSize, "wrap,grow" );
|
||||
|
||||
mIgnoreDataCalls = new JCheckBox();
|
||||
mIgnoreDataCalls.setSelected( config.getIgnoreDataCalls() );
|
||||
|
||||
add( new JLabel( "Ignore Data Calls" ) );
|
||||
add( mIgnoreDataCalls, "wrap,grow" );
|
||||
|
||||
reset();
|
||||
}
|
||||
@@ -121,7 +131,7 @@ public class P25Editor extends DecodeEditor
|
||||
DecodeConfigP25Phase1 config = (DecodeConfigP25Phase1)mConfig;
|
||||
|
||||
config.setModulation( (Modulation)mComboModulation.getSelectedItem() );
|
||||
|
||||
config.setIgnoreDataCalls( mIgnoreDataCalls.isSelected() );
|
||||
config.setTrafficChannelPoolSize( mTrafficChannelPoolSize.getValue() );
|
||||
}
|
||||
|
||||
@@ -131,7 +141,7 @@ public class P25Editor extends DecodeEditor
|
||||
DecodeConfigP25Phase1 config = (DecodeConfigP25Phase1)mConfig;
|
||||
|
||||
mComboModulation.setSelectedItem( config.getModulation() );
|
||||
|
||||
mIgnoreDataCalls.setSelected( config.getIgnoreDataCalls() );
|
||||
mTrafficChannelPoolSize.setValue( config.getTrafficChannelPoolSize() );
|
||||
}
|
||||
}
|
||||
@@ -175,6 +175,7 @@ public class P25DecoderState extends DecoderState
|
||||
|
||||
private ChannelType mChannelType;
|
||||
private Modulation mModulation;
|
||||
private boolean mIgnoreDataCalls;
|
||||
|
||||
private P25CallEvent mCurrentCallEvent;
|
||||
private List<String> mCallDetectTalkgroups = new ArrayList<>();
|
||||
@@ -182,11 +183,13 @@ public class P25DecoderState extends DecoderState
|
||||
|
||||
public P25DecoderState( AliasList aliasList,
|
||||
ChannelType channelType,
|
||||
Modulation modulation )
|
||||
Modulation modulation,
|
||||
boolean ignoreDataCalls )
|
||||
{
|
||||
super( aliasList );
|
||||
mChannelType = channelType;
|
||||
mModulation = modulation;
|
||||
mIgnoreDataCalls = ignoreDataCalls;
|
||||
}
|
||||
|
||||
public Modulation getModulation()
|
||||
@@ -2099,7 +2102,11 @@ public class P25DecoderState extends DecoderState
|
||||
logAlternateVendorMessage( pdu );
|
||||
}
|
||||
|
||||
/* We don't allocate traffic channels for data */
|
||||
if( !mIgnoreDataCalls )
|
||||
{
|
||||
broadcast( new TrafficChannelAllocationEvent( this,
|
||||
mChannelCallMap.get( channel ) ) );
|
||||
}
|
||||
break;
|
||||
case GROUP_VOICE_CHANNEL_GRANT:
|
||||
if( pdu instanceof GroupVoiceChannelGrantExplicit )
|
||||
@@ -2170,8 +2177,12 @@ public class P25DecoderState extends DecoderState
|
||||
registerCallEvent( callEvent );
|
||||
broadcast( callEvent );
|
||||
}
|
||||
|
||||
//We don't allocate traffic channels for data
|
||||
|
||||
if( !mIgnoreDataCalls )
|
||||
{
|
||||
broadcast( new TrafficChannelAllocationEvent( this,
|
||||
mChannelCallMap.get( channel ) ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2741,8 +2752,12 @@ public class P25DecoderState extends DecoderState
|
||||
registerCallEvent( event );
|
||||
broadcast( event );
|
||||
}
|
||||
|
||||
/* We don't allocate traffic channels for data */
|
||||
|
||||
if( !mIgnoreDataCalls )
|
||||
{
|
||||
broadcast( new TrafficChannelAllocationEvent( this,
|
||||
mChannelCallMap.get( channel ) ) );
|
||||
}
|
||||
break;
|
||||
case GROUP_VOICE_CHANNEL_GRANT:
|
||||
GroupVoiceChannelGrant gvcg = (GroupVoiceChannelGrant)message;
|
||||
@@ -2893,7 +2908,11 @@ public class P25DecoderState extends DecoderState
|
||||
broadcast( event );
|
||||
}
|
||||
|
||||
/* We don't allocate a traffic channel for data */
|
||||
if( !mIgnoreDataCalls )
|
||||
{
|
||||
broadcast( new TrafficChannelAllocationEvent( this,
|
||||
mChannelCallMap.get( channel ) ) );
|
||||
}
|
||||
break;
|
||||
case SNDCP_DATA_CHANNEL_GRANT:
|
||||
SNDCPDataChannelGrant sdcg = (SNDCPDataChannelGrant)message;
|
||||
@@ -2922,7 +2941,11 @@ public class P25DecoderState extends DecoderState
|
||||
broadcast( event );
|
||||
}
|
||||
|
||||
/* We don't allocate a traffic channel for data */
|
||||
if( !mIgnoreDataCalls )
|
||||
{
|
||||
broadcast( new TrafficChannelAllocationEvent( this,
|
||||
mChannelCallMap.get( channel ) ) );
|
||||
}
|
||||
break;
|
||||
case TELEPHONE_INTERCONNECT_VOICE_CHANNEL_GRANT:
|
||||
TelephoneInterconnectVoiceChannelGrant tivcg =
|
||||
|
||||
Reference in New Issue
Block a user