mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Merge branch 'master' into 39-polyphase-channelizer
# Conflicts: # src/main/java/io/github/dsheirer/buffer/FloatCircularBuffer.java # src/main/java/io/github/dsheirer/dsp/filter/FilterFactory.java # src/main/java/io/github/dsheirer/dsp/filter/design/FilterView.java # src/main/java/io/github/dsheirer/dsp/filter/design/FilterViewer.java # src/main/java/io/github/dsheirer/dsp/filter/fir/complex/ComplexFIRFilter.java # src/main/java/io/github/dsheirer/dsp/gain/ComplexFeedForwardGainControl.java # src/main/java/io/github/dsheirer/dsp/mixer/Oscillator.java # src/main/java/io/github/dsheirer/dsp/psk/LSMDemodulator.java # src/main/java/io/github/dsheirer/module/decode/Decoder.java # src/main/java/io/github/dsheirer/module/decode/DecoderFactory.java # src/main/java/io/github/dsheirer/module/decode/p25/P25Decoder.java # src/main/java/io/github/dsheirer/module/decode/p25/P25_C4FMDecoder.java # src/main/java/io/github/dsheirer/module/decode/p25/P25_LSMDecoder.java # src/main/java/io/github/dsheirer/source/tuner/TunerChannelSource.java # src/main/java/io/github/dsheirer/source/tuner/TunerModel.java # src/main/java/io/github/dsheirer/source/tuner/TunerSourceEditor.java # src/main/java/io/github/dsheirer/spectrum/ChannelSpectrumPanel.java
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* sdrtrunk
|
||||
* Copyright (C) 2014-2017 Dennis Sheirer
|
||||
* 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
|
||||
@@ -43,7 +43,10 @@ import io.github.dsheirer.source.tuner.channel.TunerChannel;
|
||||
public class Channel extends Configuration implements Listener<SourceEvent>
|
||||
{
|
||||
// Standard channels are persisted and traffic channels are temporary
|
||||
public enum ChannelType {STANDARD, TRAFFIC}
|
||||
public enum ChannelType
|
||||
{
|
||||
STANDARD, TRAFFIC
|
||||
}
|
||||
|
||||
// Static unique channel identifier tracking
|
||||
private static int UNIQUE_ID = 0;
|
||||
@@ -59,7 +62,9 @@ public class Channel extends Configuration implements Listener<SourceEvent>
|
||||
private String mSite = "Site";
|
||||
private String mName = "Channel";
|
||||
|
||||
private boolean mEnabled;
|
||||
private boolean mProcessing;
|
||||
private boolean mAutoStart;
|
||||
private Integer mAutoStartOrder;
|
||||
private boolean mSelected;
|
||||
private TunerChannel mTunerChannel = null;
|
||||
|
||||
@@ -108,6 +113,8 @@ public class Channel extends Configuration implements Listener<SourceEvent>
|
||||
channel.setSystem(mSystem);
|
||||
channel.setSite(mSite);
|
||||
channel.setAliasListName(mAliasListName);
|
||||
channel.setAutoStart(mAutoStart);
|
||||
channel.setAutoStartOrder(mAutoStartOrder);
|
||||
|
||||
AuxDecodeConfiguration aux = new AuxDecodeConfiguration();
|
||||
|
||||
@@ -253,27 +260,90 @@ public class Channel extends Configuration implements Listener<SourceEvent>
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if this channel is enabled for processing.
|
||||
* Indicates if this channel is currently started and processing.
|
||||
*/
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "enabled")
|
||||
public boolean getEnabled()
|
||||
@JsonIgnore
|
||||
public boolean isProcessing()
|
||||
{
|
||||
return mEnabled;
|
||||
return mProcessing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if this channel will automatically start processing on
|
||||
* application startup or if this channel is currently processing after
|
||||
* application startup.
|
||||
* Indicates if this channel is currently started and processing.
|
||||
*
|
||||
* Note: this method is package private and is intended to be managed
|
||||
* by a co-package central processing manager
|
||||
* Note: this method is package private and is intended to be managed by a channel processing manager instance
|
||||
*
|
||||
* @see ChannelProcessingManager
|
||||
*/
|
||||
void setEnabled(boolean enabled)
|
||||
void setProcessing(boolean processing)
|
||||
{
|
||||
mEnabled = enabled;
|
||||
mProcessing = processing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if this channel has auto-start enabled.
|
||||
*
|
||||
* Note: the Json (de)serialization tag for auto-start is 'enabled'. We've re-purposed the now
|
||||
* transient enabled property for the auto-start persisted value to maintain backward compatibility.
|
||||
*
|
||||
* @return true if this channel should be auto-started on application startup
|
||||
*/
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "enabled")
|
||||
public boolean getAutoStart()
|
||||
{
|
||||
return mAutoStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if this channel is set for auto-start
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean isAutoStart()
|
||||
{
|
||||
return mAutoStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the auto-start status for this channel.
|
||||
*
|
||||
* @param autoStart
|
||||
*/
|
||||
public void setAutoStart(boolean autoStart)
|
||||
{
|
||||
mAutoStart = autoStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto-start order. Specifies an optional ordering for channels so that when the application starts up,
|
||||
* the channels can be started in a user-specified order.
|
||||
*
|
||||
* @return auto-start order or null
|
||||
*/
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "order")
|
||||
public Integer getAutoStartOrder()
|
||||
{
|
||||
return mAutoStartOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the auto-start order for this channel
|
||||
*
|
||||
* @param order
|
||||
*/
|
||||
public void setAutoStartOrder(Integer order)
|
||||
{
|
||||
mAutoStartOrder = order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if this channel has an auto-start order specified (ie non-null).
|
||||
*
|
||||
* @return true if this channel has an auto-start order
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean hasAutoStartOrder()
|
||||
{
|
||||
return mAutoStartOrder != null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user