mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Resolves #411
Updates decoder types to specify channel sample rate and pass/stop frequencies for requested channels. Updates tuner channel source managers to accept a channel specification for channels that are allocated.
This commit is contained in:
@@ -347,7 +347,6 @@ public class DecoderFactory
|
||||
filters.add(new MPT1327MessageFilter());
|
||||
break;
|
||||
case P25_PHASE1:
|
||||
case P25_PHASE2:
|
||||
filters.add(new P25MessageFilterSet());
|
||||
break;
|
||||
case PASSPORT:
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
/*******************************************************************************
|
||||
* SDR Trunk
|
||||
* Copyright (C) 2014 Dennis Sheirer
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* sdr-trunk
|
||||
* Copyright (C) 2014-2018 Dennis Sheirer
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program.
|
||||
* If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.module.decode;
|
||||
|
||||
import io.github.dsheirer.source.tuner.channel.ChannelSpecification;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
|
||||
@@ -25,37 +25,37 @@ import java.util.EnumSet;
|
||||
*/
|
||||
public enum DecoderType
|
||||
{
|
||||
ACARS( "ACARS", "ACARS", "images/acars.png", 12500 ),
|
||||
AIS( "AIS", "AIS", "images/ais.png", 12500 ),
|
||||
AM( "AM", "AM", "images/am.png", 10000 ),
|
||||
APRS( "APRS", "APRS", "images/aprs.png", 12500 ),
|
||||
DMR( "DMR", "DMR", "images/dmr.png", 12500 ),
|
||||
FLEETSYNC2( "Fleetsync II", "Fleetsync2", "images/fm.png", 12500 ),
|
||||
LJ_1200( "LJ1200 173.075", "LJ1200", "images/lj1200.png", 12500 ),
|
||||
LTR_STANDARD( "LTR-Standard", "LTR", "images/ltr.png", 10000 ),
|
||||
LTR_NET( "LTR-Net", "LTR-Net", "images/ltr_net.png", 12500 ),
|
||||
MDC1200( "MDC1200", "MDC1200", "images/fm.png", 12500 ),
|
||||
MOTOROLA_TYPE_2( "MOTO T2", "MOTO T2", "images/motorola_type_2.png", 15000 ),
|
||||
MPT1327( "MPT1327", "MPT1327", "images/mpt1327.png", 12500 ),
|
||||
NXDN( "NXDN", "NXDN", "images/nxdn.png", 8000 ),
|
||||
NBFM( "NBFM", "NBFM", "images/fm.png", 12500 ),
|
||||
PASSPORT( "Passport", "Passport", "images/passport.png", 12500 ),
|
||||
P25_PHASE1( "P25 Phase I", "P25-1", "images/p25_1.png", 12500 ),
|
||||
P25_PHASE2( "P25 Phase II", "P25-2", "images/p25_2.png", 15000 ),
|
||||
TAIT_1200( "Tait 1200", "Tait 1200", "images/tait.png", 12500 );
|
||||
|
||||
//Primary Decoders
|
||||
AM("AM", "AM", 10000, new ChannelSpecification(25000.0, 3000.0, 5000.0)),
|
||||
LTR_STANDARD("LTR-Standard", "LTR", 12500, new ChannelSpecification(25000.0, 6000.0, 7000.0)),
|
||||
LTR_NET("LTR-Net", "LTR-Net", 12500, new ChannelSpecification(25000.0, 6000.0, 7000.0)),
|
||||
MPT1327("MPT1327", "MPT1327", 12500, new ChannelSpecification(25000.0, 6000.0, 7000.0)),
|
||||
NBFM("NBFM", "NBFM", 12500, new ChannelSpecification(25000.0, 6000.0, 7000.0)),
|
||||
PASSPORT("Passport", "Passport", 12500, new ChannelSpecification(25000.0, 6000.0, 7000.0)),
|
||||
P25_PHASE1("P25 Phase I", "P25-1", 12500, new ChannelSpecification(50000.0, 6000.0, 7000.0)),
|
||||
|
||||
//Auxiliary Decoders
|
||||
FLEETSYNC2("Fleetsync II", "Fleetsync2", 12500),
|
||||
LJ_1200("LJ1200 173.075", "LJ1200", 12500),
|
||||
MDC1200("MDC1200", "MDC1200", 12500),
|
||||
TAIT_1200("Tait 1200", "Tait 1200", 12500);
|
||||
|
||||
private String mDisplayString;
|
||||
private String mShortDisplayString;
|
||||
private String mIconFilename;
|
||||
private int mChannelBandwidth;
|
||||
|
||||
DecoderType( String displayString, String shortDisplayString,
|
||||
String iconFilename, int bandwidth )
|
||||
private ChannelSpecification mChannelSpecification;
|
||||
|
||||
DecoderType(String displayString, String shortDisplayString, int bandwidth, ChannelSpecification channelSpecification)
|
||||
{
|
||||
mDisplayString = displayString;
|
||||
mShortDisplayString = shortDisplayString;
|
||||
mIconFilename = iconFilename;
|
||||
mChannelBandwidth = bandwidth;
|
||||
mChannelSpecification = channelSpecification;
|
||||
}
|
||||
|
||||
DecoderType(String displayString, String shortDisplayString, int bandwidth)
|
||||
{
|
||||
this(displayString, shortDisplayString, bandwidth, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,68 +63,57 @@ public enum DecoderType
|
||||
*/
|
||||
public static EnumSet<DecoderType> getPrimaryDecoders()
|
||||
{
|
||||
return EnumSet.of( DecoderType.AM,
|
||||
DecoderType.LTR_NET,
|
||||
DecoderType.LTR_STANDARD,
|
||||
DecoderType.MPT1327,
|
||||
DecoderType.NBFM,
|
||||
DecoderType.P25_PHASE1,
|
||||
DecoderType.PASSPORT );
|
||||
return EnumSet.of(DecoderType.AM,
|
||||
DecoderType.LTR_NET,
|
||||
DecoderType.LTR_STANDARD,
|
||||
DecoderType.MPT1327,
|
||||
DecoderType.NBFM,
|
||||
DecoderType.P25_PHASE1,
|
||||
DecoderType.PASSPORT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decoders that can be used in the viewer application
|
||||
*/
|
||||
public static EnumSet<DecoderType> getInstrumentableDecoders()
|
||||
{
|
||||
return EnumSet.of( DecoderType.FLEETSYNC2,
|
||||
DecoderType.LJ_1200,
|
||||
DecoderType.LTR_NET,
|
||||
DecoderType.MDC1200,
|
||||
DecoderType.MPT1327,
|
||||
DecoderType.PASSPORT,
|
||||
DecoderType.P25_PHASE1,
|
||||
DecoderType.TAIT_1200 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Available auxiliary decoders.
|
||||
*/
|
||||
public static ArrayList<DecoderType> getAuxDecoders()
|
||||
{
|
||||
ArrayList<DecoderType> decoders = new ArrayList<DecoderType>();
|
||||
|
||||
decoders.add( DecoderType.FLEETSYNC2 );
|
||||
decoders.add( DecoderType.LJ_1200 );
|
||||
decoders.add( DecoderType.MDC1200 );
|
||||
decoders.add( DecoderType.TAIT_1200 );
|
||||
|
||||
return decoders;
|
||||
ArrayList<DecoderType> decoders = new ArrayList<DecoderType>();
|
||||
|
||||
decoders.add(DecoderType.FLEETSYNC2);
|
||||
decoders.add(DecoderType.LJ_1200);
|
||||
decoders.add(DecoderType.MDC1200);
|
||||
decoders.add(DecoderType.TAIT_1200);
|
||||
|
||||
return decoders;
|
||||
}
|
||||
|
||||
|
||||
public String getDisplayString()
|
||||
{
|
||||
return mDisplayString;
|
||||
}
|
||||
|
||||
|
||||
public String getShortDisplayString()
|
||||
{
|
||||
return mShortDisplayString;
|
||||
return mShortDisplayString;
|
||||
}
|
||||
|
||||
public String getIconFilename()
|
||||
{
|
||||
return mIconFilename;
|
||||
}
|
||||
|
||||
|
||||
public int getChannelBandwidth()
|
||||
{
|
||||
return mChannelBandwidth;
|
||||
return mChannelBandwidth;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Channel specification for a channel for this decoder type.
|
||||
* @return specification or null
|
||||
*/
|
||||
public ChannelSpecification getChannelSpecification()
|
||||
{
|
||||
return mChannelSpecification;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return mDisplayString;
|
||||
return mDisplayString;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user