libcyberradio  22.01.24
TransmitterComponent Class Reference

Transmitter component class for the NDR651. More...

#include <TransmitterComponent.h>

Inheritance diagram for TransmitterComponent:
TransmitterComponent RadioComponent Configurable Debuggable

Public Member Functions

 TransmitterComponent (int index=1, ::LibCyberRadio::Driver::RadioHandler *parent=NULL, bool debug=false, double frequency=900e6, double attenuation=0.0)
 Constructs a TransmitterComponent object. More...
 
virtual ~TransmitterComponent ()
 Destroys a TransmitterComponent object.
 
 TransmitterComponent (const TransmitterComponent &other)
 Copies a TransmitterComponent object. More...
 
virtual TransmitterComponentoperator= (const TransmitterComponent &other)
 Assignment operator for TransmitterComponent objects. More...
 
virtual bool enable (bool enabled=true)
 Enables this component. More...
 
virtual bool setConfiguration (ConfigurationDict &cfg)
 Sets the configuration dictionary for this component. More...
 
virtual void queryConfiguration ()
 Tells the component to query its hardware configuration in order to create its configuration dictionary.
 
virtual double getFrequency () const
 Gets the transmitter center frequency. More...
 
virtual bool setFrequency (double freq)
 Sets the transmitter center frequency. More...
 
virtual double getAttenuation () const
 Gets the attenuation. More...
 
virtual bool setAttenuation (double atten)
 Sets the attenuation. More...
 
virtual BasicDoubleList getFrequencyRange () const
 Gets the transmitter center frequency range. More...
 
virtual double getFrequencyRes () const
 Gets the transmitter center frequency resolution. More...
 
virtual double getFrequencyUnit () const
 Gets the transmitter center frequency units. More...
 
virtual BasicDoubleList getAttenuationRange () const
 Gets the attenuation range. More...
 
virtual double getAttenuationRes () const
 Gets the attenuation resolution. More...
 
virtual bool supportsCW () const
 Gets whether the transmitter supports CW tone generation. More...
 
virtual int getCWNum () const
 Gets the number of CW tone generators associated with this transmitter. More...
 
virtual BasicIntList getCWIndexRange () const
 Gets the range of indices for CW tone generators. More...
 
virtual BasicDoubleList getCWFrequencyRange () const
 Gets the CW frequency range. More...
 
virtual double getCWFrequencyRes () const
 Gets the CW frequency resolution. More...
 
virtual BasicDoubleList getCWAmplitudeRange () const
 Gets the CW amplitude range. More...
 
virtual double getCWAmplitudeRes () const
 Gets the CW amplitude resolution. More...
 
virtual BasicDoubleList getCWPhaseRange () const
 Gets the CW phase range. More...
 
virtual double getCWPhaseRes () const
 Gets the CW phase resolution. More...
 
virtual bool supportsCWSweep () const
 Gets whether the transmitter supports CW tone sweeping. More...
 
virtual bool supportsCWSweep (int index) const
 Gets whether or not a given CW tone generator supports signal sweeps. More...
 
virtual BasicDoubleList getCWSweepStartRange () const
 Gets the CW start frequency range. More...
 
virtual double getCWSweepStartRes () const
 Gets the CW start frequency resolution. More...
 
virtual BasicDoubleList getCWSweepStopRange () const
 Gets the CW stop frequency range. More...
 
virtual double getCWSweepStopRes () const
 Gets the CW stop frequency resolution. More...
 
virtual BasicDoubleList getCWSweepStepRange () const
 Gets the CW frequency step range. More...
 
virtual double getCWSweepStepRes () const
 Gets the CW frequency step resolution. More...
 
virtual BasicDoubleList getCWSweepDwellRange () const
 Gets the CW dwell time range. More...
 
virtual double getCWSweepDwellRes () const
 Gets the CW dwell time resolution. More...
 
virtual bool enableCW (int index, bool enabled=true)
 Enables a given CW tone generator. More...
 
virtual bool disableCW (int index)
 Disables a given CW tone generator. More...
 
virtual ConfigurationDict getCWConfiguration (int index) const
 Gets the configuration for a given CW tone generator. More...
 
virtual bool setCWConfiguration (int index, ConfigurationDict &cfg)
 Sets the configuration dictionary for a given CW tone generator. More...
 
virtual double getCWFrequency (int index) const
 Gets the constant frequency for a given CW tone generator. More...
 
virtual bool setCWFrequency (int index, double freq)
 Sets the constant frequency for a given CW tone generator. More...
 
virtual double getCWAmplitude (int index) const
 Gets the signal amplitude for a given CW tone generator. More...
 
virtual bool setCWAmplitude (int index, double amp)
 Sets the signal amplitude for a given CW tone generator. More...
 
virtual double getCWPhase (int index) const
 Gets the signal phase for a given CW tone generator. More...
 
virtual bool setCWPhase (int index, double phase)
 Sets the signal phase for a given CW tone generator. More...
 
virtual double getCWSweepStartFrequency (int index) const
 Gets the start frequency for a signal sweep for a given CW tone generator. More...
 
virtual double getCWSweepStopFrequency (int index) const
 Gets the stop frequency for a signal sweep for a given CW tone generator. More...
 
virtual double getCWSweepFrequencyStep (int index) const
 Gets the frequency step for a signal sweep for a given CW tone generator. More...
 
virtual double getCWSweepDwellTime (int index) const
 Gets the dwell time for a signal sweep for a given CW tone generator. More...
 
virtual bool setCWFrequencySweep (int index, double start, double stop, double step, double dwell)
 Sets the parameters for a frequency sweep for a given CW tone generator. More...
 
virtual int getIndex () const
 Gets the index number of the component. More...
 
virtual void setIndex (int index)
 Sets the index number of the component. More...
 
virtual RadioHandlergetParent () const
 Gets the "parent" radio handler for this component. More...
 
virtual void setParent (RadioHandler *parent)
 Sets the "parent" radio handler for this component. More...
 
virtual bool disable ()
 Disables this component. More...
 
virtual bool isEnabled () const
 Gets whether or not the component is enabled. More...
 
virtual std::string getName () const
 Gets the name of the configurable object. More...
 
virtual void setName (const std::string &name)
 Sets the name of the configurable object. More...
 
virtual ConfigurationDict getConfiguration () const
 Gets the configuration dictionary for this object. More...
 
virtual ConfigString getConfigurationValue (const std::string &key) const
 Gets a named configuration value as a string. More...
 
virtual bool getConfigurationValueAsBool (const std::string &key) const
 Gets a named configuration value as a Boolean. More...
 
virtual int getConfigurationValueAsInt (const std::string &key) const
 Gets a named configuration value as an integer value. More...
 
virtual unsigned int getConfigurationValueAsUInt (const std::string &key) const
 Gets a named configuration value as an unsigned integer value. More...
 
virtual double getConfigurationValueAsDbl (const std::string &key) const
 Gets a named configuration value as a double value. More...
 
virtual bool setConfigurationValue (const std::string &key, const std::string &value)
 Sets a named configuration value to a string. More...
 
virtual bool setConfigurationValueToBool (const std::string &key, const bool value)
 Sets a named configuration value to a Boolean. More...
 
virtual bool setConfigurationValueToInt (const std::string &key, const int value)
 Sets a named configuration value to an integer value. More...
 
virtual bool setConfigurationValueToUInt (const std::string &key, const unsigned int value)
 Sets a named configuration value to an unsigned integer value. More...
 
virtual bool setConfigurationValueToDbl (const std::string &key, const double value)
 Sets a named configuration value to a double value. More...
 
virtual void setDebugName (const std::string &debug_name)
 Sets the debug name for this object. More...
 
virtual void setDebugFile (FILE *debug_fp)
 Sets the debug file pointer for this object. More...
 
virtual void setDebugTimeFormat (const std::string &debug_timefmt)
 Sets the debug time format for this object. More...
 
virtual int debug (const char *format,...)
 Outputs debug information. More...
 
virtual const char * debugBool (bool x)
 Gets a debug output string for a Boolean value. More...
 
virtual bool isDebug () const
 Gets whether this object produces debug output. More...
 
virtual std::string getDebugName () const
 Gets the debug name for this object. More...
 
virtual std::string rawString (const std::string &data)
 Gets a "raw" string representation of a given data string. More...
 

Protected Member Functions

virtual void initConfigurationDict ()
 Initializes the configuration dictionary, defining the allowed keys.
 
virtual void updateConfigurationDict ()
 Updates the configuration dictionary from component settings.
 
virtual bool executeEnableQuery (int index, bool &enabled)
 Executes the tuner enabled query command. More...
 
virtual bool executeFreqQuery (int index, double &freq)
 Executes the tuner frequency query command. More...
 
virtual bool executeAttenQuery (int index, double &atten)
 Executes the tuner attenuation query command. More...
 
virtual bool executeEnableCommand (int index, bool &enabled)
 Executes the tuner enable command. More...
 
virtual bool executeFreqCommand (int index, double &freq)
 Executes the tuner frequency set command. More...
 
virtual bool executeAttenCommand (int index, double &atten)
 Executes the tuner attenuation set command. More...
 
virtual ConfigurationDict normalizedConfigurationDict (const ConfigurationDict &cfg)
 Normalizes an incoming configuration dictionary. More...
 
virtual std::string normalizedBool (const std::string &val)
 Normalizes a Boolean string value. More...
 
virtual void dumpConfiguration ()
 Dumps this object's configuration dictionary to debug output.
 

Detailed Description

Transmitter component class for the NDR651.

A radio handler object maintains one transmitter component object per transmitter on the radio.

Configuration dictionary elements:

  • "enable": Whether or not this transmitter is enabled [Boolean/integer/string]
  • "frequency": Tuned frequency (Hz) [double]
  • "attenuation": Attenuation (dB) [double]

Definition at line 49 of file TransmitterComponent.h.

Constructor & Destructor Documentation

◆ TransmitterComponent() [1/2]

TransmitterComponent ( int  index = 1,
::LibCyberRadio::Driver::RadioHandler parent = NULL,
bool  debug = false,
double  frequency = 900e6,
double  attenuation = 0.0 
)

Constructs a TransmitterComponent object.

Parameters
indexThe index number of this component.
parentA pointer to the RadioHandler object that "owns" this component.
debugWhether the component supports debug output.
frequencyTransmitter center frequency (Hz).
attenuationTransmitter attenuation (dB).

Definition at line 24 of file TransmitterComponent.cpp.

◆ TransmitterComponent() [2/2]

Copies a TransmitterComponent object.

Parameters
otherThe TransmitterComponent object to copy.

Definition at line 72 of file TransmitterComponent.cpp.

Member Function Documentation

◆ debug()

int debug ( const char *  format,
  ... 
)
virtualinherited

Outputs debug information.

This method follows the same semantics as printf(). Output is preceded by a timestamp and the name of the object, if provided.

Parameters
formatThe printf()-style format string.
...Comma-separated list of arguments to print. Note that these need to be arguments that can be supported natively through printf().
Returns
The number of characters outputted.

Definition at line 95 of file Debuggable.cpp.

◆ debugBool()

const char * debugBool ( bool  x)
virtualinherited

Gets a debug output string for a Boolean value.

Parameters
xBoolean value
Returns
A constant string, either "true" or "false".

Definition at line 126 of file Debuggable.cpp.

◆ disable()

bool disable ( )
virtualinherited

Disables this component.

Returns
True if successful, false otherwise.

Definition at line 76 of file RadioComponent.cpp.

◆ disableCW()

bool disableCW ( int  index)
virtualinherited

Disables a given CW tone generator.

Parameters
indexCW tone generator index.
Returns
True if successful, false otherwise.

Definition at line 423 of file TransmitterComponent.cpp.

◆ enable()

bool enable ( bool  enabled = true)
virtualinherited

Enables this component.

Parameters
enabledWhether or not this component should be enabled.
Returns
True if successful, false otherwise.

Reimplemented from RadioComponent.

Definition at line 102 of file TransmitterComponent.cpp.

◆ enableCW()

bool enableCW ( int  index,
bool  enabled = true 
)
virtualinherited

Enables a given CW tone generator.

Parameters
indexCW tone generator index.
enabledWhether or not this component should be enabled.
Returns
True if successful, false otherwise.

Definition at line 414 of file TransmitterComponent.cpp.

◆ executeAttenCommand()

bool executeAttenCommand ( int  index,
double &  atten 
)
protectedvirtualinherited

Executes the tuner attenuation set command.

Parameters
indextuner index.
attenAttenuation (dB).
Returns
True if the command succeeded, false otherwise.

Definition at line 693 of file TransmitterComponent.cpp.

◆ executeAttenQuery()

bool executeAttenQuery ( int  index,
double &  atten 
)
protectedvirtualinherited

Executes the tuner attenuation query command.

Note
The return value from this method only indicates if the command succeeded or failed. This method uses reference parameters to return the results of the query.
Parameters
indextuner index.
attenAttenuation (dB) (return).
Returns
True if the command succeeded, false otherwise.

Definition at line 631 of file TransmitterComponent.cpp.

◆ executeEnableCommand()

bool executeEnableCommand ( int  index,
bool &  enabled 
)
protectedvirtualinherited

Executes the tuner enable command.

Parameters
indextuner index.
enabledWhether or not tuner is enabled.
Returns
True if the command succeeded, false otherwise.

Definition at line 654 of file TransmitterComponent.cpp.

◆ executeEnableQuery()

bool executeEnableQuery ( int  index,
bool &  enabled 
)
protectedvirtualinherited

Executes the tuner enabled query command.

Note
The return value from this method only indicates if the command succeeded or failed. This method uses reference parameters to return the results of the query.
Parameters
indextuner index.
enabledWhether or not tuner is enabled (return).
Returns
True if the command succeeded, false otherwise.

Definition at line 584 of file TransmitterComponent.cpp.

◆ executeFreqCommand()

bool executeFreqCommand ( int  index,
double &  freq 
)
protectedvirtualinherited

Executes the tuner frequency set command.

Parameters
indextuner index.
freqTuned frequency (Hz).
Returns
True if the command succeeded, false otherwise.

Definition at line 673 of file TransmitterComponent.cpp.

◆ executeFreqQuery()

bool executeFreqQuery ( int  index,
double &  freq 
)
protectedvirtualinherited

Executes the tuner frequency query command.

Note
The return value from this method only indicates if the command succeeded or failed. This method uses reference parameters to return the results of the query.
Parameters
indextuner index.
freqTuned frequency (Hz) (return).
Returns
True if the command succeeded, false otherwise.

Definition at line 608 of file TransmitterComponent.cpp.

◆ getAttenuation()

double getAttenuation ( ) const
virtualinherited

Gets the attenuation.

Returns
The attenuation, in dB.

Definition at line 208 of file TransmitterComponent.cpp.

◆ getAttenuationRange()

BasicDoubleList getAttenuationRange ( ) const
virtualinherited

Gets the attenuation range.

Returns
A list containing the minimum and maximum attenuation values.

Definition at line 247 of file TransmitterComponent.cpp.

◆ getAttenuationRes()

double getAttenuationRes ( ) const
virtualinherited

Gets the attenuation resolution.

Returns
The resolution.

Definition at line 255 of file TransmitterComponent.cpp.

◆ getConfiguration()

ConfigurationDict getConfiguration ( ) const
virtualinherited

Gets the configuration dictionary for this object.

Returns
The configuration dictionary.

Definition at line 93 of file Configurable.cpp.

◆ getConfigurationValue()

ConfigString getConfigurationValue ( const std::string &  key) const
virtualinherited

Gets a named configuration value as a string.

Parameters
keyThe key string in the configuration dictionary.
Returns
The value represented by this key. Returns an empty string if the key is not in the configuration dictionary.

Definition at line 98 of file Configurable.cpp.

◆ getConfigurationValueAsBool()

bool getConfigurationValueAsBool ( const std::string &  key) const
virtualinherited

Gets a named configuration value as a Boolean.

Parameters
keyThe key string in the configuration dictionary.
Returns
The Boolean value represented by this key. Returns false if the key is not in the configuration dictionary, or cannot be represented as a Boolean.

Definition at line 109 of file Configurable.cpp.

◆ getConfigurationValueAsDbl()

double getConfigurationValueAsDbl ( const std::string &  key) const
virtualinherited

Gets a named configuration value as a double value.

Parameters
keyThe key string in the configuration dictionary.
Returns
The double value represented by this key. Returns 0.0 if the key is not in the configuration dictionary, or if the value cannot be represented as a double.

Definition at line 148 of file Configurable.cpp.

◆ getConfigurationValueAsInt()

int getConfigurationValueAsInt ( const std::string &  key) const
virtualinherited

Gets a named configuration value as an integer value.

Parameters
keyThe key string in the configuration dictionary.
Returns
The integer value represented by this key. Returns 0 if the key is not in the configuration dictionary, or if the value cannot be represented as an integer.

Definition at line 122 of file Configurable.cpp.

◆ getConfigurationValueAsUInt()

unsigned int getConfigurationValueAsUInt ( const std::string &  key) const
virtualinherited

Gets a named configuration value as an unsigned integer value.

Parameters
keyThe key string in the configuration dictionary.
Returns
The integer value represented by this key. Returns 0 if the key is not in the configuration dictionary, or if the value cannot be represented as an integer.

Definition at line 135 of file Configurable.cpp.

◆ getCWAmplitude()

double getCWAmplitude ( int  index) const
virtualinherited

Gets the signal amplitude for a given CW tone generator.

Parameters
indexCW tone generator index.
Returns
The signal amplitude, in scale units.

Definition at line 464 of file TransmitterComponent.cpp.

◆ getCWAmplitudeRange()

BasicDoubleList getCWAmplitudeRange ( ) const
virtualinherited

Gets the CW amplitude range.

Returns
A list containing the minimum and maximum amplitude values.

Definition at line 297 of file TransmitterComponent.cpp.

◆ getCWAmplitudeRes()

double getCWAmplitudeRes ( ) const
virtualinherited

Gets the CW amplitude resolution.

Returns
The resolution.

Definition at line 306 of file TransmitterComponent.cpp.

◆ getCWConfiguration()

ConfigurationDict getCWConfiguration ( int  index) const
virtualinherited

Gets the configuration for a given CW tone generator.

Parameters
indexCW tone generator index.
Returns
The configuration dictionary.

Definition at line 428 of file TransmitterComponent.cpp.

◆ getCWFrequency()

double getCWFrequency ( int  index) const
virtualinherited

Gets the constant frequency for a given CW tone generator.

Parameters
indexCW tone generator index.
Returns
The constant frequency, in Hz.

Definition at line 446 of file TransmitterComponent.cpp.

◆ getCWFrequencyRange()

BasicDoubleList getCWFrequencyRange ( ) const
virtualinherited

Gets the CW frequency range.

Returns
A list containing the minimum and maximum frequencies.

Definition at line 279 of file TransmitterComponent.cpp.

◆ getCWFrequencyRes()

double getCWFrequencyRes ( ) const
virtualinherited

Gets the CW frequency resolution.

Returns
The frequency resolution, in Hz.

Definition at line 288 of file TransmitterComponent.cpp.

◆ getCWIndexRange()

BasicIntList getCWIndexRange ( ) const
virtualinherited

Gets the range of indices for CW tone generators.

Returns
A list containing the generator indices.

Definition at line 270 of file TransmitterComponent.cpp.

◆ getCWNum()

int getCWNum ( ) const
virtualinherited

Gets the number of CW tone generators associated with this transmitter.

Returns
The number of generators.

Definition at line 265 of file TransmitterComponent.cpp.

◆ getCWPhase()

double getCWPhase ( int  index) const
virtualinherited

Gets the signal phase for a given CW tone generator.

Parameters
indexCW tone generator index.
Returns
The signal phase, in degrees.

Definition at line 482 of file TransmitterComponent.cpp.

◆ getCWPhaseRange()

BasicDoubleList getCWPhaseRange ( ) const
virtualinherited

Gets the CW phase range.

Returns
A list containing the minimum and maximum phase values.

Definition at line 315 of file TransmitterComponent.cpp.

◆ getCWPhaseRes()

double getCWPhaseRes ( ) const
virtualinherited

Gets the CW phase resolution.

Returns
The resolution.

Definition at line 324 of file TransmitterComponent.cpp.

◆ getCWSweepDwellRange()

BasicDoubleList getCWSweepDwellRange ( ) const
virtualinherited

Gets the CW dwell time range.

Returns
A list containing the minimum and maximum dwell time values.

Definition at line 396 of file TransmitterComponent.cpp.

◆ getCWSweepDwellRes()

double getCWSweepDwellRes ( ) const
virtualinherited

Gets the CW dwell time resolution.

Returns
The resolution.

Definition at line 405 of file TransmitterComponent.cpp.

◆ getCWSweepDwellTime()

double getCWSweepDwellTime ( int  index) const
virtualinherited

Gets the dwell time for a signal sweep for a given CW tone generator.

Parameters
indexCW tone generator index.
Returns
The dwell time, in sample clocks.

Definition at line 536 of file TransmitterComponent.cpp.

◆ getCWSweepFrequencyStep()

double getCWSweepFrequencyStep ( int  index) const
virtualinherited

Gets the frequency step for a signal sweep for a given CW tone generator.

Parameters
indexCW tone generator index.
Returns
The frequency step, in Hz.

Definition at line 527 of file TransmitterComponent.cpp.

◆ getCWSweepStartFrequency()

double getCWSweepStartFrequency ( int  index) const
virtualinherited

Gets the start frequency for a signal sweep for a given CW tone generator.

Parameters
indexCW tone generator index.
Returns
The start frequency, in Hz.

Definition at line 509 of file TransmitterComponent.cpp.

◆ getCWSweepStartRange()

BasicDoubleList getCWSweepStartRange ( ) const
virtualinherited

Gets the CW start frequency range.

Returns
A list containing the minimum and maximum frequency values.

Definition at line 342 of file TransmitterComponent.cpp.

◆ getCWSweepStartRes()

double getCWSweepStartRes ( ) const
virtualinherited

Gets the CW start frequency resolution.

Returns
The resolution.

Definition at line 351 of file TransmitterComponent.cpp.

◆ getCWSweepStepRange()

BasicDoubleList getCWSweepStepRange ( ) const
virtualinherited

Gets the CW frequency step range.

Returns
A list containing the minimum and maximum frequency values.

Definition at line 378 of file TransmitterComponent.cpp.

◆ getCWSweepStepRes()

double getCWSweepStepRes ( ) const
virtualinherited

Gets the CW frequency step resolution.

Returns
The resolution.

Definition at line 387 of file TransmitterComponent.cpp.

◆ getCWSweepStopFrequency()

double getCWSweepStopFrequency ( int  index) const
virtualinherited

Gets the stop frequency for a signal sweep for a given CW tone generator.

Parameters
indexCW tone generator index.
Returns
The stop frequency, in Hz.

Definition at line 518 of file TransmitterComponent.cpp.

◆ getCWSweepStopRange()

BasicDoubleList getCWSweepStopRange ( ) const
virtualinherited

Gets the CW stop frequency range.

Returns
A list containing the minimum and maximum frequency values.

Definition at line 360 of file TransmitterComponent.cpp.

◆ getCWSweepStopRes()

double getCWSweepStopRes ( ) const
virtualinherited

Gets the CW stop frequency resolution.

Returns
The resolution.

Definition at line 369 of file TransmitterComponent.cpp.

◆ getDebugName()

std::string getDebugName ( ) const
virtualinherited

Gets the debug name for this object.

Returns
The debug name, as a string.

Definition at line 138 of file Debuggable.cpp.

◆ getFrequency()

double getFrequency ( ) const
virtualinherited

Gets the transmitter center frequency.

Returns
The transmitter center frequency, in Hz.

Definition at line 187 of file TransmitterComponent.cpp.

◆ getFrequencyRange()

BasicDoubleList getFrequencyRange ( ) const
virtualinherited

Gets the transmitter center frequency range.

Returns
A list containing the minimum and maximum frequencies.

Definition at line 229 of file TransmitterComponent.cpp.

◆ getFrequencyRes()

double getFrequencyRes ( ) const
virtualinherited

Gets the transmitter center frequency resolution.

Returns
The frequency resolution, in Hz.

Definition at line 237 of file TransmitterComponent.cpp.

◆ getFrequencyUnit()

double getFrequencyUnit ( ) const
virtualinherited

Gets the transmitter center frequency units.

Returns
The frequency units, in Hz.

Definition at line 242 of file TransmitterComponent.cpp.

◆ getIndex()

int getIndex ( ) const
virtualinherited

Gets the index number of the component.

Returns
The index number, as an integer.

Definition at line 56 of file RadioComponent.cpp.

◆ getName()

std::string getName ( ) const
virtualinherited

Gets the name of the configurable object.

Returns
The name, as a string.

Definition at line 83 of file Configurable.cpp.

◆ getParent()

RadioHandler * getParent ( ) const
virtualinherited

Gets the "parent" radio handler for this component.

Returns
A pointer to the RadioHandler object.

Definition at line 66 of file RadioComponent.cpp.

◆ isDebug()

bool isDebug ( ) const
virtualinherited

Gets whether this object produces debug output.

Returns
True if producing debug, false otherwise.

Definition at line 133 of file Debuggable.cpp.

◆ isEnabled()

bool isEnabled ( ) const
virtualinherited

Gets whether or not the component is enabled.

Returns
True if enabled, false otherwise.

Definition at line 88 of file RadioComponent.cpp.

◆ normalizedBool()

std::string normalizedBool ( const std::string &  val)
protectedvirtualinherited

Normalizes a Boolean string value.

Returns
The "normalized" string value.

Definition at line 241 of file Configurable.cpp.

◆ normalizedConfigurationDict()

ConfigurationDict normalizedConfigurationDict ( const ConfigurationDict cfg)
protectedvirtualinherited

Normalizes an incoming configuration dictionary.

"Normalizing" a configuration dictionary replaces certain strings representing Boolean values ("yes", "on", "true", "no", "off", and "false", case is irrelevant) with standard values ("0" and "1").

Note
The default behavior of this method normalizes every string in the configuration dictionary. Override this method if certain configuration items need to be protected from normalization.
Returns
The new configuration dictionary.

Definition at line 232 of file Configurable.cpp.

◆ operator=()

TransmitterComponent & operator= ( const TransmitterComponent other)
virtual

Assignment operator for TransmitterComponent objects.

Parameters
otherThe TransmitterComponent object to copy.
Returns
A reference to the assigned object.

Definition at line 77 of file TransmitterComponent.cpp.

◆ rawString()

std::string rawString ( const std::string &  data)
virtualinherited

Gets a "raw" string representation of a given data string.

"Raw" string representations mimic Python string representations. Whitespace characters are denoted by backslash representations ("\\r", "\\n", "\\t", "\\v", "\\f"), while other non-printable characters are represented with hex representation ("\\x00", etc.)

Parameters
dataData string
Returns
The data's "raw" representation.

Definition at line 143 of file Debuggable.cpp.

◆ setAttenuation()

bool setAttenuation ( double  atten)
virtualinherited

Sets the attenuation.

Parameters
attenThe new attenuation (dB).
Returns
True if successful, false otherwise.

Definition at line 213 of file TransmitterComponent.cpp.

◆ setConfiguration()

bool setConfiguration ( ConfigurationDict cfg)
virtualinherited

Sets the configuration dictionary for this component.

Parameters
cfgThe component configuration dictionary.
Returns
True if successful, false otherwise.

Reimplemented from RadioComponent.

Definition at line 118 of file TransmitterComponent.cpp.

◆ setConfigurationValue()

bool setConfigurationValue ( const std::string &  key,
const std::string &  value 
)
virtualinherited

Sets a named configuration value to a string.

Note
The default behavior of this method is to normalize the incoming value.
Parameters
keyThe key string in the configuration dictionary.
valueThe new value.
Returns
True if the key was set, false otherwise. Returns false if the key is not in the configuration dictionary.

Definition at line 177 of file Configurable.cpp.

◆ setConfigurationValueToBool()

bool setConfigurationValueToBool ( const std::string &  key,
const bool  value 
)
virtualinherited

Sets a named configuration value to a Boolean.

Parameters
keyThe key string in the configuration dictionary.
valueThe new value.
Returns
True if the key was set, false otherwise. Returns false if the key is not in the configuration dictionary.

Definition at line 193 of file Configurable.cpp.

◆ setConfigurationValueToDbl()

bool setConfigurationValueToDbl ( const std::string &  key,
const double  value 
)
virtualinherited

Sets a named configuration value to a double value.

Parameters
keyThe key string in the configuration dictionary.
valueThe new value.
Returns
True if the key was set, false otherwise. Returns false if the key is not in the configuration dictionary.

Definition at line 211 of file Configurable.cpp.

◆ setConfigurationValueToInt()

bool setConfigurationValueToInt ( const std::string &  key,
const int  value 
)
virtualinherited

Sets a named configuration value to an integer value.

Parameters
keyThe key string in the configuration dictionary.
valueThe new value.
Returns
True if the key was set, false otherwise. Returns false if the key is not in the configuration dictionary.

Definition at line 199 of file Configurable.cpp.

◆ setConfigurationValueToUInt()

bool setConfigurationValueToUInt ( const std::string &  key,
const unsigned int  value 
)
virtualinherited

Sets a named configuration value to an unsigned integer value.

Parameters
keyThe key string in the configuration dictionary.
valueThe new value.
Returns
True if the key was set, false otherwise. Returns false if the key is not in the configuration dictionary.

Definition at line 205 of file Configurable.cpp.

◆ setCWAmplitude()

bool setCWAmplitude ( int  index,
double  amp 
)
virtualinherited

Sets the signal amplitude for a given CW tone generator.

Parameters
indexCW tone generator index.
ampThe new signal amplitude (scale units).
Returns
True if successful, false otherwise.

Definition at line 473 of file TransmitterComponent.cpp.

◆ setCWConfiguration()

bool setCWConfiguration ( int  index,
ConfigurationDict cfg 
)
virtualinherited

Sets the configuration dictionary for a given CW tone generator.

Parameters
indexCW tone generator index.
cfgThe component configuration dictionary.
Returns
True if successful, false otherwise.

Definition at line 437 of file TransmitterComponent.cpp.

◆ setCWFrequency()

bool setCWFrequency ( int  index,
double  freq 
)
virtualinherited

Sets the constant frequency for a given CW tone generator.

Parameters
indexCW tone generator index.
freqThe new constant frequency (Hz).
Returns
True if successful, false otherwise.

Definition at line 455 of file TransmitterComponent.cpp.

◆ setCWFrequencySweep()

bool setCWFrequencySweep ( int  index,
double  start,
double  stop,
double  step,
double  dwell 
)
virtualinherited

Sets the parameters for a frequency sweep for a given CW tone generator.

Parameters
indexCW tone generator index.
startThe new start frequency (Hz).
stopThe new stop frequency (Hz).
stepThe new frequency step (Hz).
dwellThe new dwell time (sample clocks).
Returns
True if successful, false otherwise.

Definition at line 545 of file TransmitterComponent.cpp.

◆ setCWPhase()

bool setCWPhase ( int  index,
double  phase 
)
virtualinherited

Sets the signal phase for a given CW tone generator.

Parameters
indexCW tone generator index.
phaseThe new signal phase (degrees).
Returns
True if successful, false otherwise.

Definition at line 491 of file TransmitterComponent.cpp.

◆ setDebugFile()

void setDebugFile ( FILE *  debug_fp)
virtualinherited

Sets the debug file pointer for this object.

Parameters
debug_fpFile to send debug output to.

Definition at line 81 of file Debuggable.cpp.

◆ setDebugName()

void setDebugName ( const std::string &  debug_name)
virtualinherited

Sets the debug name for this object.

Use this method to set unique debug names for objects of the same class for easy differentiation.

Parameters
debug_nameName for identifying this object in debug output.

Definition at line 74 of file Debuggable.cpp.

◆ setDebugTimeFormat()

void setDebugTimeFormat ( const std::string &  debug_timefmt)
virtualinherited

Sets the debug time format for this object.

Parameters
debug_timefmtFormat string for displaying timestamp, as compatible with strftime(). If this is an empty string, don't display a timestamp.

Definition at line 88 of file Debuggable.cpp.

◆ setFrequency()

bool setFrequency ( double  freq)
virtualinherited

Sets the transmitter center frequency.

Parameters
freqThe new transmitter center frequency (Hz).
Returns
True if successful, false otherwise.

Definition at line 192 of file TransmitterComponent.cpp.

◆ setIndex()

void setIndex ( int  index)
virtualinherited

Sets the index number of the component.

Parameters
indexThe index number.

Definition at line 61 of file RadioComponent.cpp.

◆ setName()

void setName ( const std::string &  name)
virtualinherited

Sets the name of the configurable object.

Parameters
nameThe new name.

Definition at line 88 of file Configurable.cpp.

◆ setParent()

void setParent ( RadioHandler parent)
virtualinherited

Sets the "parent" radio handler for this component.

Parameters
parentA pointer to the RadioHandler object.

Definition at line 71 of file RadioComponent.cpp.

◆ supportsCW()

bool supportsCW ( ) const
virtualinherited

Gets whether the transmitter supports CW tone generation.

Returns
True if supported, false otherwise.

Definition at line 260 of file TransmitterComponent.cpp.

◆ supportsCWSweep() [1/2]

bool supportsCWSweep ( ) const
virtualinherited

Gets whether the transmitter supports CW tone sweeping.

Returns
True if supported, false otherwise.

Definition at line 333 of file TransmitterComponent.cpp.

◆ supportsCWSweep() [2/2]

bool supportsCWSweep ( int  index) const
virtualinherited

Gets whether or not a given CW tone generator supports signal sweeps.

Parameters
indexCW tone generator index.
Returns
True if supported, false otherwise.

Definition at line 500 of file TransmitterComponent.cpp.


The documentation for this class was generated from the following files: