12#ifndef INCLUDED_LIBCYBERRADIO_DRIVER_CWTONEGENCOMPONENT_H
13#define INCLUDED_LIBCYBERRADIO_DRIVER_CWTONEGENCOMPONENT_H
15#include "LibCyberRadio/Driver/RadioComponent.h"
16#include "LibCyberRadio/Common/BasicDict.h"
17#include "LibCyberRadio/Common/BasicList.h"
91 double freqRangeMin = 0.0,
92 double freqRangeMax = 0.0,
94 double freqUnits = 0.0,
95 double ampRangeMin = 0.0,
96 double ampRangeMax = 0.0,
98 double phaseRangeMin = 0.0,
99 double phaseRangeMax = 0.0,
100 double phaseRes = 0.0,
101 double sweepStartRangeMin = 0.0,
102 double sweepStartRangeMax = 0.0,
103 double sweepStartRes = 0.0,
104 double sweepStopRangeMin = 0.0,
105 double sweepStopRangeMax = 0.0,
106 double sweepStopRes = 0.0,
107 double sweepStepRangeMin = 0.0,
108 double sweepStepRangeMax = 0.0,
109 double sweepStepRes = 0.0,
110 double dwellTimeRangeMin = 0.0,
111 double dwellTimeRangeMax = 0.0,
112 double dwellTimeRes = 0.0,
113 double frequency = 0.0,
114 double amplitude = 0.0,
116 double sweepStart = 0.0,
117 double sweepStop = 0.0,
118 double sweepStep = 0.0,
119 double dwellTime = 0.0
142 virtual bool enable(
bool enabled =
true);
257 virtual bool setPhase(
double phase);
291 virtual bool setFrequencySweep(
double start,
double stop,
double step,
double dwell);
376 double _freqRangeMin;
378 double _freqRangeMax;
390 double _phaseRangeMin;
392 double _phaseRangeMax;
396 double _sweepStartRangeMin;
398 double _sweepStartRangeMax;
400 double _sweepStartRes;
402 double _sweepStopRangeMin;
404 double _sweepStopRangeMax;
406 double _sweepStopRes;
408 double _sweepStepRangeMin;
410 double _sweepStepRangeMax;
412 double _sweepStepRes;
414 double _dwellTimeRangeMin;
416 double _dwellTimeRangeMax;
418 double _dwellTimeRes;
virtual int debug(const char *format,...)
Outputs debug information.
virtual double getSweepStepRes() const
Gets the sweep step resolution.
virtual bool enable(bool enabled=true)
Enables this component.
virtual CWToneGenComponent & operator=(const CWToneGenComponent &other)
Assignment operator for CWToneGenComponent objects.
virtual bool setConfiguration(ConfigurationDict &cfg)
Sets the configuration dictionary for this component.
virtual double getSweepStartFrequency() const
Gets the start frequency for a signal sweep.
virtual BasicDoubleList getSweepStopRange() const
Gets the sweep stop range.
virtual double getAmplitudeRes() const
Gets the amplitude resolution.
virtual double getSweepDwellTime() const
Gets the dwell time for a signal sweep.
virtual BasicDoubleList getFrequencyRange() const
Gets the frequency range.
virtual bool setPhase(double phase)
Sets the signal phase.
virtual double getSweepStopRes() const
Gets the sweep stop resolution.
virtual bool setFrequency(double freq)
Sets the constant frequency.
virtual BasicDoubleList getSweepStartRange() const
Gets the sweep start range.
virtual bool supportsSweep() const
Gets whether or not the generator supports signal sweeps.
virtual double getFrequency() const
Gets the constant frequency.
virtual bool setFrequencySweep(double start, double stop, double step, double dwell)
Sets the parameters for a frequency sweep.
CWToneGenComponent(const std::string &name="CWTONE", int index=0, RadioHandler *parent=NULL, bool debug=false, int txIndex=0, double freqRangeMin=0.0, double freqRangeMax=0.0, double freqRes=0.0, double freqUnits=0.0, double ampRangeMin=0.0, double ampRangeMax=0.0, double ampRes=0.0, double phaseRangeMin=0.0, double phaseRangeMax=0.0, double phaseRes=0.0, double sweepStartRangeMin=0.0, double sweepStartRangeMax=0.0, double sweepStartRes=0.0, double sweepStopRangeMin=0.0, double sweepStopRangeMax=0.0, double sweepStopRes=0.0, double sweepStepRangeMin=0.0, double sweepStepRangeMax=0.0, double sweepStepRes=0.0, double dwellTimeRangeMin=0.0, double dwellTimeRangeMax=0.0, double dwellTimeRes=0.0, double frequency=0.0, double amplitude=0.0, double phase=0.0, double sweepStart=0.0, double sweepStop=0.0, double sweepStep=0.0, double dwellTime=0.0)
Constructs a CWToneGenComponent object.
virtual BasicDoubleList getDwellTimeRange() const
Gets the dwell time range.
virtual bool setAmplitude(double amp)
Sets the signal amplitude.
virtual bool executeToneCommand(int index, int txIndex, double &freq, double &, double &phase)
Executes the CW tone set command.
virtual double getPhaseRes() const
Gets the phase resolution.
virtual bool executeSweepQuery(int index, int txIndex, double &sweepStart, double &sweepStop, double &sweepStep, double &dwellTime)
Executes the CW sweep query command.
virtual double getSweepStopFrequency() const
Gets the stop frequency for a signal sweep.
virtual bool executeToneQuery(int index, int txIndex, double &freq, double &, double &phase)
Executes the CW tone query command.
virtual double getDwellTimeRes() const
Gets the dwell time resolution.
virtual void queryConfiguration()
Tells the component to query its hardware configuration in order to create its configuration dictiona...
virtual double getSweepFrequencyStep() const
Gets the frequency step for a signal sweep.
virtual BasicDoubleList getAmplitudeRange() const
Gets the amplitude range.
virtual double getPhase() const
Gets the signal phase.
virtual BasicDoubleList getSweepStepRange() const
Gets the sweep step range.
virtual void updateConfigurationDict()
Updates the configuration dictionary from component settings.
virtual BasicDoubleList getPhaseRange() const
Gets the phase range.
virtual ~CWToneGenComponent()
Destroys a CWToneGenComponent object.
virtual double getAmplitude() const
Gets the signal amplitude.
virtual void initConfigurationDict()
Initializes the configuration dictionary, defining the allowed keys.
virtual bool executeSweepCommand(int index, int txIndex, double &sweepStart, double &sweepStop, double &sweepStep, double &dwellTime)
Executes the CW sweep set command.
virtual double getSweepStartRes() const
Gets the sweep start resolution.
virtual double getFrequencyRes() const
Gets the frequency resolution.
A configuration dictionary.
RadioComponent(const std::string &name="<unknown>", int index=0, RadioHandler *parent=NULL, bool debug=false)
Constructs a RadioComponent object.
Generic radio handler class.
Provides programming elements for driving CRS NDR-class radios.
BASIC_DICT_CONTAINER< int, CWToneGenComponent * > CWToneGenComponentDict
A dictionary of CW tone generator components, keyed by index.
Defines functionality for LibCyberRadio applications.
BASIC_LIST_CONTAINER< double > BasicDoubleList
Type representing a list of doubles.