30#ifndef RFSignalGenerator_h
31#define RFSignalGenerator_h
184 SWEEP_TYPE_FREQ_LEVEL
305 SWEEP_SHAPE_TRIANGLE,
338 SWEEP_SPACING_LINEAR,
All warnings generated by a configuration we're in the process of loading.
Definition: ConfigWarningList.h:90
WaveShape
Predefined waveform shapes.
Definition: FunctionGenerator.h:55
Bidirectional table mapping integer IDs in scopesession files to object pointers.
Definition: IDTable.h:49
An arbitrary lab instrument. Oscilloscope, LA, PSU, DMM, etc.
Definition: Instrument.h:58
An RF waveform generator which creates a carrier and optionally modulates it.
Definition: RFSignalGenerator.h:37
virtual FunctionGenerator::WaveShape GetAnalogFMWaveShape(int chan)=0
Get the current waveform selected for analog FM.
virtual void SetSweepStartFrequency(int chan, float freq)
Sets the start of a frequency sweep.
Definition: RFSignalGenerator.cpp:61
virtual SweepShape GetSweepShape(int chan)
Gets the shape of a sweep.
Definition: RFSignalGenerator.cpp:110
virtual void SetAnalogFMFrequency(int chan, int64_t frequency)=0
Sets the analog FM frequency for a channel (in Hz)
virtual float GetSweepStartFrequency(int chan)
Gets the start of a frequency sweep, in Hz.
Definition: RFSignalGenerator.cpp:51
virtual bool IsAnalogModulationAvailable(int chan)=0
Checks if an instrument is analog modulation capable.
virtual void SetSweepDwellTime(int chan, float fs)
Sets the dwell time for each step in a sweep.
Definition: RFSignalGenerator.cpp:96
virtual SweepDirection GetSweepDirection(int chan)
Gets the direction of a sweep.
Definition: RFSignalGenerator.cpp:130
static SweepSpacing GetSweepSpacingOfName(const std::string &name)
Converts a human-readable name to a SweepSpacing.
Definition: RFSignalGenerator.cpp:246
virtual void SetSweepStopLevel(int chan, float level)
Sets the stop of a power sweep.
Definition: RFSignalGenerator.cpp:86
void DoSerializeConfiguration(YAML::Node &node, IDTable &table)
Serializes this oscilloscope's configuration to a YAML node.
Definition: RFSignalGenerator.cpp:285
virtual float GetSweepStopFrequency(int chan)
Gets the end of a frequency sweep, in Hz.
Definition: RFSignalGenerator.cpp:56
static std::string GetNameOfSweepSpacing(SweepSpacing spacing)
Converts a SweepSpacing to a human-readable name.
Definition: RFSignalGenerator.cpp:231
virtual void SetAnalogModulationEnable(int chan, bool on)=0
Enable or disable analog modulation.
virtual void SetAnalogFMEnable(int chan, bool on)=0
Enable or disable analog frequency modulation (also requires modulation to be turned on)
static std::string GetNameOfSweepDirection(SweepDirection dir)
Converts a SweepDirection to a human-readable name.
Definition: RFSignalGenerator.cpp:258
static SweepShape GetSweepShapeOfName(const std::string &name)
Converts a human-readable name to a SweepShape.
Definition: RFSignalGenerator.cpp:219
virtual void SetChannelOutputEnable(int chan, bool on)=0
Enable or disable a channel output.
virtual int64_t GetAnalogFMFrequency(int chan)=0
Gets the analog FM frequency for a channel.
void DoLoadConfiguration(int version, const YAML::Node &node, IDTable &idmap)
Load instrument and channel configuration from a save file.
Definition: RFSignalGenerator.cpp:447
virtual bool AcquireData() override
Pull data from the instrument.
Definition: RFSignalGenerator.cpp:150
virtual void SetSweepShape(int chan, SweepShape shape)
Sets the shape of a sweep.
Definition: RFSignalGenerator.cpp:115
virtual void SetChannelOutputPower(int chan, float power)=0
Sets the power level of a channel.
virtual float GetSweepDwellTime(int chan)
Gets the dwell time for each step in a sweep, in femtoseconds.
Definition: RFSignalGenerator.cpp:91
virtual void SetSweepDirection(int chan, SweepDirection dir)
Sets the direction of a sweep.
Definition: RFSignalGenerator.cpp:135
virtual bool IsVectorModulationAvailable(int chan)=0
Checks if an instrument is vector modulation capable.
virtual int GetSweepPoints(int chan)
Gets the number of frequency points in a sweep.
Definition: RFSignalGenerator.cpp:105
virtual double GetChannelCenterFrequency(int chan)=0
Gets the center frequency of a channel.
virtual bool GetChannelOutputEnable(int chan)=0
Check if a channel is currently enabled.
virtual void SetSweepStartLevel(int chan, float level)
Sets the start of a power sweep.
Definition: RFSignalGenerator.cpp:81
virtual void SetSweepPoints(int chan, int npoints)
Sets the number of frequency points in a sweep.
Definition: RFSignalGenerator.cpp:101
virtual void SetSweepStopFrequency(int chan, float freq)
Sets the stop of a frequency sweep.
Definition: RFSignalGenerator.cpp:66
virtual float GetSweepStopLevel(int chan)
Gets the end of a power sweep, in dBm.
Definition: RFSignalGenerator.cpp:76
virtual void SetSweepSpacing(int chan, SweepSpacing shape)
Sets the spacing of a sweep (log or linear)
Definition: RFSignalGenerator.cpp:125
virtual int64_t GetAnalogFMDeviation(int chan)=0
Gets the analog FM deviation for a channel.
virtual SweepType GetSweepType(int chan)
Gets the type of a sweep.
Definition: RFSignalGenerator.cpp:140
void DoPreLoadConfiguration(int version, const YAML::Node &node, IDTable &idmap, ConfigWarningList &list)
Validate instrument and channel configuration from a save file.
Definition: RFSignalGenerator.cpp:361
virtual std::vector< FunctionGenerator::WaveShape > GetAnalogFMWaveShapes()=0
Get the set of waveforms available for analog FM.
virtual void SetAnalogFMDeviation(int chan, int64_t deviation)=0
Sets the analog FM deviation for a channel (in Hz)
virtual SweepSpacing GetSweepSpacing(int chan)
Gets the spacing of a sweep (log or linear)
Definition: RFSignalGenerator.cpp:120
static std::string GetNameOfSweepShape(SweepShape shape)
Converts a SweepShape to a human-readable name.
Definition: RFSignalGenerator.cpp:204
virtual bool GetAnalogModulationEnable(int chan)=0
Enable or disable analog modulation.
virtual void SetChannelCenterFrequency(int chan, double freq)=0
Sets the power level of a channel.
static SweepDirection GetSweepDirectionOfName(const std::string &name)
Converts a human-readable name to a SweepDirection.
Definition: RFSignalGenerator.cpp:273
virtual float GetSweepStartLevel(int chan)
Gets the start of a power sweep, in dBm.
Definition: RFSignalGenerator.cpp:71
static SweepType GetSweepTypeOfName(const std::string &name)
Converts a human-readable name to a SweepType.
Definition: RFSignalGenerator.cpp:189
static std::string GetNameOfSweepType(SweepType type)
Converts a SweepType to a human-readable name.
Definition: RFSignalGenerator.cpp:168
virtual bool GetAnalogFMEnable(int chan)=0
Enable or disable analog frequency modulation.
virtual float GetChannelOutputPower(int chan)=0
Gets the power level of a channel.
virtual void SetAnalogFMWaveShape(int chan, FunctionGenerator::WaveShape shape)=0
Sets the analog FM modulation shape for a channel.
virtual bool IsSweepAvailable(int chan)=0
Checks if an instrument supports sweeping the center frequency.
virtual void SetSweepType(int chan, SweepType type)
Sets the type of a sweep.
Definition: RFSignalGenerator.cpp:145