public class Signal extends Object implements IEquatable<Signal>
DigitalModulation, SignalDataRate, etc.| Modifier | Constructor and Description |
|---|---|
protected |
Signal(Signal existingInstance)
Create a new instance by copying an existing instance.
|
| Modifier and Type | Method and Description |
|---|---|
<T> Signal |
addAndRemoveExistingData(TypeLiteral<T> typeLiteralT,
T additionalData)
Creates a new signal by adding data in addition to the data existing on this signal.
|
Signal |
addData(Object additionalData)
Creates a new signal by adding data in addition to the data existing on this signal.
|
Signal |
addNoiseTemperature(double noiseTemperature)
Creates a new signal by adding noise temperature (such as thermal noise), in kelvin.
|
Signal |
applyGain(double gain)
Create a new signal by applying a gain to this signal.
|
boolean |
containsDataByType(Class<?> type)
Gets a value indicating whether this signal contains data of the specified type.
|
<T> boolean |
containsDataByType(TypeLiteral<T> typeLiteralT)
Gets a value indicating whether this signal contains data of the specified type.
|
static Signal |
createSignal(double power,
double frequency,
double lowerBandwidthLimit,
double upperBandwidthLimit)
Create a new noiseless signal based on the given properties.
|
static Signal |
createSignal(double power,
double frequency,
double lowerBandwidthLimit,
double upperBandwidthLimit,
double noiseTemperature,
double lowerNoiseBandwidthLimit,
double upperNoiseBandwidthLimit)
Create a new signal based on the given properties.
|
static Signal |
createSignal(double power,
double frequency,
double lowerBandwidthLimit,
double upperBandwidthLimit,
double noiseTemperature,
double lowerNoiseBandwidthLimit,
double upperNoiseBandwidthLimit,
Iterable<? extends Object> signalData)
Create a new signal based on the given properties.
|
static Signal |
createSignal(double power,
double frequency,
double lowerBandwidthLimit,
double upperBandwidthLimit,
Iterable<? extends Object> signalData)
Create a new noiseless signal based on the given properties.
|
boolean |
equals(Object obj)
Indicates whether another object is exactly equal to this instance.
|
boolean |
equalsType(Signal other)
Indicates whether another instance of this type is exactly equal to this instance.
|
double |
getBandwidth()
Gets the signal bandwidth, in hertz.
|
static Signal |
getBaseSignal()
Gets an instance of a signal with zero power, zero frequency, and infinite bandwidth.
|
Object |
getDataByType(Class<?> type)
Gets signal data based on the type of data requested.
|
<T> T |
getDataByType(TypeLiteral<T> typeLiteralT)
Gets signal data based on the type of data requested.
|
ArrayList<Object> |
getDataList()
Create a copy of the signal data.
|
double |
getFrequency()
Gets the center frequency of the signal, in hertz.
|
double |
getLowerBandwidthFrequency()
Gets the lower bandwidth frequency, in hertz.
|
double |
getLowerBandwidthLimit()
Gets the offset from the center
Frequency (get) to the lower bandwidth limit, in hertz. |
double |
getLowerNoiseBandwidthFrequency()
Gets the frequency of the lower boundary of the noise bandwidth, in hertz.
|
double |
getLowerNoiseBandwidthLimit()
Gets the offset from the center
Frequency (get) to the lower limit of the noise bandwidth, in hertz. |
double |
getNoiseBandwidth()
Gets the bandwidth of the signal noise, in hertz.
|
double |
getNoisePower()
|
double |
getNoiseTemperature()
Gets the equivalent noise temperature, in kelvin.
|
double |
getPower()
Gets the total signal power, in watts.
|
double |
getUpperBandwidthFrequency()
Gets the upper bandwidth frequency, in hertz.
|
double |
getUpperBandwidthLimit()
Gets the offset from the center
Frequency (get) to the upper bandwidth limit, in hertz. |
double |
getUpperNoiseBandwidthFrequency()
Gets the frequency of the upper boundary of the noise bandwidth, in hertz.
|
double |
getUpperNoiseBandwidthLimit()
Gets the offset from the center
Frequency (get) to the upper limit of the noise bandwidth, in hertz. |
int |
hashCode()
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
|
Signal |
modifyBandwidth(double lowerBandwidthLimit,
double upperBandwidthLimit)
Create a new signal by modifying the bandwidth limits of this signal.
|
Signal |
modifyFrequency(double frequency)
Create a new signal by modifying the frequency of this signal.
|
Signal |
modifyNoiseTemperature(double noiseTemperature)
Create a new signal by modifying the
NoiseTemperature (get) of this signal. |
Signal |
modifyNoiseTemperature(double noiseTemperature,
double lowerNoiseBandwidthLimit,
double upperNoiseBandwidthLimit)
Create a new signal by modifying the
NoiseTemperature (get) of this signal. |
Signal |
modifyPower(double power)
Create a new signal by modifying the power of this signal.
|
Signal |
modifySignalProperties(double power,
double frequency,
double lowerBandwidthLimit,
double upperBandwidthLimit,
double noiseTemperature,
double lowerNoiseBandwidthLimit,
double upperNoiseBandwidthLimit)
Create a new signal by modifying the properties of this signal.
|
<T> Signal |
removeData(TypeLiteral<T> typeLiteralT)
Creates a new signal by removing all data of the given type existing on this signal.
|
@Nonnull public static Signal createSignal(double power, double frequency, double lowerBandwidthLimit, double upperBandwidthLimit)
Signal.modifySignalProperties(double, double, double, double, double, double, double) or similar methods on the preexisting signal instance.power - Signal power, in watts.frequency - Signal frequency, in hertz.lowerBandwidthLimit - A value specifying the (negative) offset, in hertz, from the central frequency,
to the lower limit of the signal's bandwidth.upperBandwidthLimit - A value specifying the (positive) offset, in hertz, from the central frequency,
to the upper limit of the signals' bandwidth.ArgumentOutOfRangeException - Thrown when:
@Nonnull public static Signal createSignal(double power, double frequency, double lowerBandwidthLimit, double upperBandwidthLimit, @Nullable Iterable<? extends Object> signalData)
Signal.modifySignalProperties(double, double, double, double, double, double, double) or similar methods on the preexisting signal instance.power - Signal power, in watts.frequency - Signal frequency, in hertz.lowerBandwidthLimit - A value specifying the (negative) offset, in hertz, from the central frequency,
to the lower limit of the signal's bandwidth.upperBandwidthLimit - A value specifying the (positive) offset, in hertz, from the central frequency,
to the upper limit of the signals' bandwidth.signalData - A set of data which describe optional properties of this signal
(e.g. modulation, encoding, polarization, command information, etc). If null, will be ignored.ArgumentOutOfRangeException - Thrown when:
@Nonnull public static Signal createSignal(double power, double frequency, double lowerBandwidthLimit, double upperBandwidthLimit, double noiseTemperature, double lowerNoiseBandwidthLimit, double upperNoiseBandwidthLimit)
Signal.modifySignalProperties(double, double, double, double, double, double, double) or similar methods on the preexisting signal instance.power - Signal power, in watts.frequency - Signal frequency, in hertz.lowerBandwidthLimit - A value specifying the (negative) offset, in hertz, from the central frequency,
to the lower limit of the signal's bandwidth.upperBandwidthLimit - A value specifying the (positive) offset, in hertz, from the central frequency,
to the upper limit of the signals' bandwidth.noiseTemperature - The equivalent noise temperature, in kelvin, spread out over the noise bandwidth.lowerNoiseBandwidthLimit - The offset to the lower limit of the noise bandwidth, in hertz.upperNoiseBandwidthLimit - The offset to the upper limit of the noise bandwidth, in hertz.ArgumentOutOfRangeException - Thrown when:
frequency, power, or noiseTemperature is negativeLowerBandwidthFrequency (get) (frequency + lowerBandwidthLimit) is negativeBandwidth (get) (upperBandwidthLimit - lowerBandwidthLimit) is zerolowerNoiseBandwidthLimit causes the lowest frequency of the noise to be negative (frequency + lowerNoiseBandwidthLimit must be positive)lowerNoiseBandwidthLimit is greater than upperNoiseBandwidthLimit (note that lowerNoiseBandwidthLimit is usually negative)@Nonnull public static Signal createSignal(double power, double frequency, double lowerBandwidthLimit, double upperBandwidthLimit, double noiseTemperature, double lowerNoiseBandwidthLimit, double upperNoiseBandwidthLimit, @Nullable Iterable<? extends Object> signalData)
Signal.modifySignalProperties(double, double, double, double, double, double, double) or similar methods on the preexisting signal instance.power - Signal power, in watts.frequency - Signal frequency, in hertz.lowerBandwidthLimit - A value specifying the (negative) offset, in hertz, from the central frequency,
to the lower limit of the signal's bandwidth.upperBandwidthLimit - A value specifying the (positive) offset, in hertz, from the central frequency,
to the upper limit of the signals' bandwidth.noiseTemperature - The equivalent noise temperature, in kelvin, spread out over the noise bandwidth.lowerNoiseBandwidthLimit - The offset to the lower limit of the noise bandwidth, in hertz.upperNoiseBandwidthLimit - The offset to the upper limit of the noise bandwidth, in hertz.signalData - A set of metadata which describe additional properties of this signal. If null, will be ignored.ArgumentOutOfRangeException - Thrown when:
frequency, power, or noiseTemperature is negativeLowerBandwidthFrequency (get) (frequency + lowerBandwidthLimit) is negativeBandwidth (get) (upperBandwidthLimit - lowerBandwidthLimit) is zerolowerNoiseBandwidthLimit causes the lowest frequency of the noise to be negative (frequency + lowerNoiseBandwidthLimit must be positive)lowerNoiseBandwidthLimit is greater than upperNoiseBandwidthLimit (note that lowerNoiseBandwidthLimit is usually negative)public final double getPower()
Bandwidth (get).public final double getFrequency()
public final double getUpperBandwidthLimit()
Frequency (get) to the upper bandwidth limit, in hertz.public final double getLowerBandwidthLimit()
Frequency (get) to the lower bandwidth limit, in hertz.
(Usually, this value is negative).public final double getUpperBandwidthFrequency()
public final double getLowerBandwidthFrequency()
public final double getBandwidth()
Power (get) is distributed.public final double getNoisePower()
public final double getNoiseTemperature()
public final double getLowerNoiseBandwidthLimit()
Frequency (get) to the lower limit of the noise bandwidth, in hertz.
(Usually, this value is negative).public final double getUpperNoiseBandwidthLimit()
Frequency (get) to the upper limit of the noise bandwidth, in hertz.public final double getLowerNoiseBandwidthFrequency()
public final double getUpperNoiseBandwidthFrequency()
public final double getNoiseBandwidth()
@Nonnull public final Signal applyGain(double gain)
Power (get) and NoisePower (get).gain - The multiplicative gain to apply.ArgumentOutOfRangeException - Thrown when gain is negative.@Nonnull public final Signal modifyPower(double power)
power - The new power, in Watts.ArgumentOutOfRangeException - Thrown when power is negative.@Nonnull public final Signal modifyFrequency(double frequency)
frequency - The new frequency, in hertz.IllegalStateException - Thrown when frequency combined with the old bandwidth
causes part of the frequency range to be negative
(frequency + LowerBandwidthLimit (get) must be positive).@Nonnull public final Signal modifyBandwidth(double lowerBandwidthLimit, double upperBandwidthLimit)
lowerBandwidthLimit - The new offset to the lowest frequency from the center frequency, in hertz. (Usually negative)upperBandwidthLimit - The new offset to the highest frequency from the center frequency, in hertz.ArgumentOutOfRangeException - Thrown when lowerBandwidthLimit causes the lowest frequency to be negative
(Frequency (get) + lowerBandwidthLimit must be positive).@Nonnull public final Signal modifyNoiseTemperature(double noiseTemperature)
NoiseTemperature (get) of this signal.noiseTemperature - The new noise temperature, in kelvin.ArgumentOutOfRangeException - Thrown when noiseTemperature is negative.@Nonnull public final Signal modifyNoiseTemperature(double noiseTemperature, double lowerNoiseBandwidthLimit, double upperNoiseBandwidthLimit)
NoiseTemperature (get) of this signal.noiseTemperature - The new noise temperature, in kelvin.lowerNoiseBandwidthLimit - The new offset to the lower limit of the NoiseBandwidth (get), in hertz.upperNoiseBandwidthLimit - The new offset to the upper limit of the NoiseBandwidth (get), in hertz.ArgumentOutOfRangeException - Thrown when noiseTemperature is negative,
or when lowerNoiseBandwidthLimit is greater than upperNoiseBandwidthLimit.@Nonnull public final Signal addNoiseTemperature(double noiseTemperature)
noiseTemperature - The temperature to add, in kelvin.NoiseTemperature (get).ArgumentOutOfRangeException - Thrown when the computed NoiseTemperature (get) is negative.@Nonnull public final Signal modifySignalProperties(double power, double frequency, double lowerBandwidthLimit, double upperBandwidthLimit, double noiseTemperature, double lowerNoiseBandwidthLimit, double upperNoiseBandwidthLimit)
The modified Signal retains any additional Data on the original signal.
power - The new total power, in watts.frequency - The new center frequency, in hertz.lowerBandwidthLimit - The new offset from the center frequency to the lowest frequency, in hertz. (usually negative)upperBandwidthLimit - The new offset from the center frequency to the highest frequency, in hertz.noiseTemperature - The new noise temperature, in kelvin.lowerNoiseBandwidthLimit - The new offset from the center frequency to the lowest frequency at which there is significant noise, in hertz.upperNoiseBandwidthLimit - The new offset from the center frequency to the highest frequency at which there is significant noise, in hertz.ArgumentOutOfRangeException - Thrown when:
frequency, power, or noiseTemperature is negativeLowerBandwidthFrequency (get) (frequency + lowerBandwidthLimit) is negativeBandwidth (get) (upperBandwidthLimit - lowerBandwidthLimit) is zerolowerNoiseBandwidthLimit causes the lowest frequency of the noise to be negative (frequency + lowerNoiseBandwidthLimit must be positive)lowerNoiseBandwidthLimit is greater than upperNoiseBandwidthLimit (note that lowerNoiseBandwidthLimit is usually negative)@Nonnull public final Signal addData(@Nullable Object additionalData)
If additionalData is null, the original Signal is returned.
additionalData - New data to add to this signal's data.@Nonnull public final <T> Signal addAndRemoveExistingData(TypeLiteral<T> typeLiteralT, @Nullable T additionalData)
If additionalData is null, the original Signal is returned.
T - The type of data.typeLiteralT - A TypeLiteral object representing the generic type T.additionalData - New data to add to this signal's data.@Nonnull public final <T> Signal removeData(TypeLiteral<T> typeLiteralT)
T - The type of data to remove.typeLiteralT - A TypeLiteral object representing the generic type T.@Nullable public final <T> T getDataByType(TypeLiteral<T> typeLiteralT)
There should be only one instance of a given type in a given signal. If there are more, this method will return the first occurrence.
T - The type of data to retrieve.typeLiteralT - A TypeLiteral object representing the generic type T.null if there is no data of the given type.public final <T> boolean containsDataByType(TypeLiteral<T> typeLiteralT)
T - The type of data to check for.typeLiteralT - A TypeLiteral object representing the generic type T.true if this signal contains data of the specified type; otherwise false.@Nullable public final Object getDataByType(@Nonnull Class<?> type)
There should be only one instance of a given type in a given signal. If there are more, this method will return the first occurrence.
type - The type of data to retrieve.null if there is no data of the given type.ArgumentNullException - Thrown when type is null.public final boolean containsDataByType(@Nonnull Class<?> type)
type - The type of data to check for.true if this signal contains data of the specified type; otherwise false.@Nonnull public final ArrayList<Object> getDataList()
Signal will not reflect changes to the list.
This data represents optional properties on the signal.public boolean equals(Object obj)
equals in class Objectobj - The object to compare to this instance.true if obj is an instance of this type and represents the same value as this instance; otherwise false.Object.hashCode(),
HashMappublic final boolean equalsType(Signal other)
equalsType in interface IEquatable<Signal>other - The instance to compare to this instance.true if other represents the same value as this instance; otherwise false.public int hashCode()
hashCode in class ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)