mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-13 00:57:31 -05:00
Added frequency limit exception. This exception isn't yet used by the tuner controllers (future effort).
This commit is contained in:
36
src/source/tuner/FrequencyLimitException.java
Normal file
36
src/source/tuner/FrequencyLimitException.java
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
package source.tuner;
|
||||||
|
|
||||||
|
public class FrequencyLimitException extends Exception
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private long mFrequencyLimit;
|
||||||
|
private long mRequestedFrequency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that the requested frequency is outside of the tunable bounds
|
||||||
|
* of the tuner.
|
||||||
|
* @param message
|
||||||
|
* @param frequency
|
||||||
|
*/
|
||||||
|
public FrequencyLimitException( long requestedFrequency,
|
||||||
|
long frequencyLimit )
|
||||||
|
{
|
||||||
|
super( "Requested frequency [" + requestedFrequency +
|
||||||
|
"] exceeds the limit [" + frequencyLimit + "]. Tuned "
|
||||||
|
+ "frequency was set to the limit value" );
|
||||||
|
|
||||||
|
mRequestedFrequency = requestedFrequency;
|
||||||
|
mFrequencyLimit = frequencyLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getRequestedFrequency()
|
||||||
|
{
|
||||||
|
return mRequestedFrequency;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getFrequencyLimit()
|
||||||
|
{
|
||||||
|
return mFrequencyLimit;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user