ngscopeclient 0.1-dev+51fbda87c
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
RFSignalGenerator Class Referenceabstract

An RF waveform generator which creates a carrier and optionally modulates it. More...

#include <RFSignalGenerator.h>

Inheritance diagram for RFSignalGenerator:
Inheritance graph
[legend]
Collaboration diagram for RFSignalGenerator:
Collaboration graph
[legend]

Public Types

enum  SweepType { SWEEP_TYPE_NONE , SWEEP_TYPE_FREQ , SWEEP_TYPE_LEVEL , SWEEP_TYPE_FREQ_LEVEL }
 
enum  SweepShape { SWEEP_SHAPE_TRIANGLE , SWEEP_SHAPE_SAWTOOTH }
 
enum  SweepSpacing { SWEEP_SPACING_LINEAR , SWEEP_SPACING_LOG }
 
enum  SweepDirection { SWEEP_DIR_FWD , SWEEP_DIR_REV }
 
- Public Types inherited from Instrument
enum  InstrumentTypes {
  INST_OSCILLOSCOPE = 0x01 , INST_DMM = 0x02 , INST_PSU = 0x04 , INST_FUNCTION = 0x08 ,
  INST_RF_GEN = 0x10 , INST_LOAD = 0x20 , INST_BERT = 0x40 , INST_MISC = 0x80 ,
  INST_SWITCH_MATRIX = 0x100
}
 

Public Member Functions

virtual bool GetChannelOutputEnable (int chan)=0
 Check if a channel is currently enabled. More...
 
virtual void SetChannelOutputEnable (int chan, bool on)=0
 Enable or disable a channel output. More...
 
virtual float GetChannelOutputPower (int chan)=0
 Gets the power level of a channel. More...
 
virtual void SetChannelOutputPower (int chan, float power)=0
 Sets the power level of a channel. More...
 
virtual double GetChannelCenterFrequency (int chan)=0
 Gets the center frequency of a channel. More...
 
virtual void SetChannelCenterFrequency (int chan, double freq)=0
 Sets the power level of a channel. More...
 
virtual bool IsAnalogModulationAvailable (int chan)=0
 Checks if an instrument is analog modulation capable. More...
 
virtual void SetAnalogModulationEnable (int chan, bool on)=0
 Enable or disable analog modulation. More...
 
virtual bool GetAnalogModulationEnable (int chan)=0
 Enable or disable analog modulation. More...
 
virtual void SetAnalogFMEnable (int chan, bool on)=0
 Enable or disable analog frequency modulation (also requires modulation to be turned on) More...
 
virtual bool GetAnalogFMEnable (int chan)=0
 Enable or disable analog frequency modulation. More...
 
virtual std::vector< FunctionGenerator::WaveShapeGetAnalogFMWaveShapes ()=0
 Get the set of waveforms available for analog FM. More...
 
virtual FunctionGenerator::WaveShape GetAnalogFMWaveShape (int chan)=0
 Get the current waveform selected for analog FM. More...
 
virtual void SetAnalogFMWaveShape (int chan, FunctionGenerator::WaveShape shape)=0
 Sets the analog FM modulation shape for a channel. More...
 
virtual void SetAnalogFMDeviation (int chan, int64_t deviation)=0
 Sets the analog FM deviation for a channel (in Hz) More...
 
virtual int64_t GetAnalogFMDeviation (int chan)=0
 Gets the analog FM deviation for a channel. More...
 
virtual void SetAnalogFMFrequency (int chan, int64_t frequency)=0
 Sets the analog FM frequency for a channel (in Hz) More...
 
virtual int64_t GetAnalogFMFrequency (int chan)=0
 Gets the analog FM frequency for a channel. More...
 
virtual bool IsVectorModulationAvailable (int chan)=0
 Checks if an instrument is vector modulation capable. More...
 
virtual bool IsSweepAvailable (int chan)=0
 Checks if an instrument supports sweeping the center frequency. More...
 
virtual SweepType GetSweepType (int chan)
 Gets the type of a sweep. More...
 
virtual void SetSweepType (int chan, SweepType type)
 Sets the type of a sweep. More...
 
virtual float GetSweepStartFrequency (int chan)
 Gets the start of a frequency sweep, in Hz. More...
 
virtual float GetSweepStopFrequency (int chan)
 Gets the end of a frequency sweep, in Hz. More...
 
virtual void SetSweepStartFrequency (int chan, float freq)
 Sets the start of a frequency sweep. More...
 
virtual void SetSweepStopFrequency (int chan, float freq)
 Sets the stop of a frequency sweep. More...
 
virtual float GetSweepStartLevel (int chan)
 Gets the start of a power sweep, in dBm. More...
 
virtual float GetSweepStopLevel (int chan)
 Gets the end of a power sweep, in dBm. More...
 
virtual void SetSweepStartLevel (int chan, float level)
 Sets the start of a power sweep. More...
 
virtual void SetSweepStopLevel (int chan, float level)
 Sets the stop of a power sweep. More...
 
virtual void SetSweepDwellTime (int chan, float fs)
 Sets the dwell time for each step in a sweep. More...
 
virtual float GetSweepDwellTime (int chan)
 Gets the dwell time for each step in a sweep, in femtoseconds. More...
 
virtual void SetSweepPoints (int chan, int npoints)
 Sets the number of frequency points in a sweep. More...
 
virtual int GetSweepPoints (int chan)
 Gets the number of frequency points in a sweep. More...
 
virtual SweepShape GetSweepShape (int chan)
 Gets the shape of a sweep. More...
 
virtual void SetSweepShape (int chan, SweepShape shape)
 Sets the shape of a sweep. More...
 
virtual SweepSpacing GetSweepSpacing (int chan)
 Gets the spacing of a sweep (log or linear) More...
 
virtual void SetSweepSpacing (int chan, SweepSpacing shape)
 Sets the spacing of a sweep (log or linear) More...
 
virtual SweepDirection GetSweepDirection (int chan)
 Gets the direction of a sweep. More...
 
virtual void SetSweepDirection (int chan, SweepDirection dir)
 Sets the direction of a sweep. More...
 
virtual bool AcquireData () override
 Pull data from the instrument. More...
 
- Public Member Functions inherited from Instrument
virtual unsigned int GetInstrumentTypes () const =0
 Returns a bitfield describing the set of instrument types that this instrument supports. More...
 
virtual std::string GetName () const =0
 
virtual std::string GetVendor () const =0
 
virtual std::string GetSerial () const =0
 
virtual std::string GetTransportConnectionString ()=0
 Gets the connection string for our transport. More...
 
virtual std::string GetTransportName ()=0
 Gets the name of our transport. More...
 
virtual uint32_t GetInstrumentTypesForChannel (size_t i) const =0
 Returns a bitfield describing the set of instrument types that a given channel supports. More...
 
size_t GetChannelCount () const
 Gets the number of channels (of any type) this instrument has.
 
InstrumentChannelGetChannel (size_t i) const
 Gets a given channel on the instrument. More...
 
virtual std::string GetChannelDisplayName (size_t i)
 Gets the hardware display name for a channel. This is an arbitrary user-selected string. More...
 
virtual void SetChannelDisplayName (size_t i, std::string name)
 Sets the hardware display name for a channel. This is an arbitrary user-selected string. More...
 
InstrumentChannelGetChannelByDisplayName (const std::string &name)
 Gets a channel given the display name.
 
InstrumentChannelGetChannelByHwName (const std::string &name)
 Gets a channel given the hardware name.
 
virtual bool AcquireData ()=0
 Pull data from the instrument. More...
 
virtual YAML::Node SerializeConfiguration (IDTable &table) const
 Serializes this instrument's configuration to a YAML node. More...
 
virtual void LoadConfiguration (int version, const YAML::Node &node, IDTable &idmap)
 Load instrument and channel configuration from a save file. More...
 
virtual void PreLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap, ConfigWarningList &warnings)
 Parse a limited subset of instrument configuration but do not apply it. More...
 

Static Public Member Functions

static std::string GetNameOfSweepType (SweepType type)
 Converts a SweepType to a human-readable name.
 
static SweepType GetSweepTypeOfName (const std::string &name)
 Converts a human-readable name to a SweepType.
 
static std::string GetNameOfSweepShape (SweepShape shape)
 Converts a SweepShape to a human-readable name.
 
static SweepShape GetSweepShapeOfName (const std::string &name)
 Converts a human-readable name to a SweepShape.
 
static std::string GetNameOfSweepSpacing (SweepSpacing spacing)
 Converts a SweepSpacing to a human-readable name.
 
static SweepSpacing GetSweepSpacingOfName (const std::string &name)
 Converts a human-readable name to a SweepSpacing.
 
static std::string GetNameOfSweepDirection (SweepDirection dir)
 Converts a SweepDirection to a human-readable name.
 
static SweepDirection GetSweepDirectionOfName (const std::string &name)
 Converts a human-readable name to a SweepDirection.
 

Protected Member Functions

void DoSerializeConfiguration (YAML::Node &node, IDTable &table)
 Serializes this oscilloscope's configuration to a YAML node.
 
void DoLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap)
 Load instrument and channel configuration from a save file.
 
void DoPreLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap, ConfigWarningList &list)
 Validate instrument and channel configuration from a save file.
 

Additional Inherited Members

- Public Attributes inherited from Instrument
std::string m_nickname
 Optional user-selected nickname of the instrument. More...
 
- Protected Attributes inherited from Instrument
std::list< sigc::slot< void(YAML::Node &, IDTable &)> > m_serializers
 List of methods which need to be called to serialize this node's configuration.
 
std::list< sigc::slot< void(int, const YAML::Node &, IDTable &)> > m_loaders
 List of methods which need to be called to deserialize this node's configuration.
 
std::list< sigc::slot< void(int, const YAML::Node &, IDTable &, ConfigWarningList &)> > m_preloaders
 List of methods which need to be called to pre-load this node's configuration.
 
std::vector< InstrumentChannel * > m_channels
 Set of all channels on this instrument.
 

Detailed Description

An RF waveform generator which creates a carrier and optionally modulates it.

Member Function Documentation

◆ AcquireData()

bool RFSignalGenerator::AcquireData ( )
overridevirtual

Pull data from the instrument.

Returns
True if waveform was acquired, false if connection lost or other serious error

Implements Instrument.

Reimplemented in SiglentVectorSignalGenerator.

◆ GetAnalogFMDeviation()

virtual int64_t RFSignalGenerator::GetAnalogFMDeviation ( int  chan)
pure virtual

Gets the analog FM deviation for a channel.

Implemented in SiglentVectorSignalGenerator.

◆ GetAnalogFMEnable()

virtual bool RFSignalGenerator::GetAnalogFMEnable ( int  chan)
pure virtual

Enable or disable analog frequency modulation.

Implemented in SiglentVectorSignalGenerator.

◆ GetAnalogFMFrequency()

virtual int64_t RFSignalGenerator::GetAnalogFMFrequency ( int  chan)
pure virtual

Gets the analog FM frequency for a channel.

Implemented in SiglentVectorSignalGenerator.

◆ GetAnalogFMWaveShape()

virtual FunctionGenerator::WaveShape RFSignalGenerator::GetAnalogFMWaveShape ( int  chan)
pure virtual

Get the current waveform selected for analog FM.

Implemented in SiglentVectorSignalGenerator.

◆ GetAnalogFMWaveShapes()

virtual std::vector< FunctionGenerator::WaveShape > RFSignalGenerator::GetAnalogFMWaveShapes ( )
pure virtual

Get the set of waveforms available for analog FM.

Implemented in SiglentVectorSignalGenerator.

◆ GetAnalogModulationEnable()

virtual bool RFSignalGenerator::GetAnalogModulationEnable ( int  chan)
pure virtual

Enable or disable analog modulation.

Implemented in SiglentVectorSignalGenerator.

◆ GetChannelCenterFrequency()

virtual double RFSignalGenerator::GetChannelCenterFrequency ( int  chan)
pure virtual

Gets the center frequency of a channel.

Parameters
chanZero-based channel index
Returns
Center frequency, in Hz

Implemented in SiglentVectorSignalGenerator.

◆ GetChannelOutputEnable()

virtual bool RFSignalGenerator::GetChannelOutputEnable ( int  chan)
pure virtual

Check if a channel is currently enabled.

Parameters
chanZero-based channel index
Returns
True if output is enabled, false if disabled

Implemented in SiglentVectorSignalGenerator.

◆ GetChannelOutputPower()

virtual float RFSignalGenerator::GetChannelOutputPower ( int  chan)
pure virtual

Gets the power level of a channel.

Parameters
chanZero-based channel index
Returns
Power level (in dBm)

Implemented in SiglentVectorSignalGenerator.

◆ GetSweepDirection()

RFSignalGenerator::SweepDirection RFSignalGenerator::GetSweepDirection ( int  chan)
virtual

Gets the direction of a sweep.

Parameters
chanZero-based channel index

Reimplemented in SiglentVectorSignalGenerator.

◆ GetSweepDwellTime()

float RFSignalGenerator::GetSweepDwellTime ( int  chan)
virtual

Gets the dwell time for each step in a sweep, in femtoseconds.

Parameters
chanZero-based channel index

Reimplemented in SiglentVectorSignalGenerator.

◆ GetSweepPoints()

int RFSignalGenerator::GetSweepPoints ( int  chan)
virtual

Gets the number of frequency points in a sweep.

Parameters
chanZero-based channel index

Reimplemented in SiglentVectorSignalGenerator.

◆ GetSweepShape()

RFSignalGenerator::SweepShape RFSignalGenerator::GetSweepShape ( int  chan)
virtual

Gets the shape of a sweep.

Parameters
chanZero-based channel index

Reimplemented in SiglentVectorSignalGenerator.

◆ GetSweepSpacing()

RFSignalGenerator::SweepSpacing RFSignalGenerator::GetSweepSpacing ( int  chan)
virtual

Gets the spacing of a sweep (log or linear)

Parameters
chanZero-based channel index

Reimplemented in SiglentVectorSignalGenerator.

◆ GetSweepStartFrequency()

float RFSignalGenerator::GetSweepStartFrequency ( int  chan)
virtual

Gets the start of a frequency sweep, in Hz.

Parameters
chanZero-based channel index

Reimplemented in SiglentVectorSignalGenerator.

◆ GetSweepStartLevel()

float RFSignalGenerator::GetSweepStartLevel ( int  chan)
virtual

Gets the start of a power sweep, in dBm.

Parameters
chanZero-based channel index

Reimplemented in SiglentVectorSignalGenerator.

◆ GetSweepStopFrequency()

float RFSignalGenerator::GetSweepStopFrequency ( int  chan)
virtual

Gets the end of a frequency sweep, in Hz.

Parameters
chanZero-based channel index

Reimplemented in SiglentVectorSignalGenerator.

◆ GetSweepStopLevel()

float RFSignalGenerator::GetSweepStopLevel ( int  chan)
virtual

Gets the end of a power sweep, in dBm.

Parameters
chanZero-based channel index

Reimplemented in SiglentVectorSignalGenerator.

◆ GetSweepType()

RFSignalGenerator::SweepType RFSignalGenerator::GetSweepType ( int  chan)
virtual

Gets the type of a sweep.

Parameters
chanZero-based channel index

Reimplemented in SiglentVectorSignalGenerator.

◆ IsAnalogModulationAvailable()

virtual bool RFSignalGenerator::IsAnalogModulationAvailable ( int  chan)
pure virtual

Checks if an instrument is analog modulation capable.

Parameters
chanZero-based channel index

Implemented in SiglentVectorSignalGenerator.

◆ IsSweepAvailable()

virtual bool RFSignalGenerator::IsSweepAvailable ( int  chan)
pure virtual

Checks if an instrument supports sweeping the center frequency.

Implemented in SiglentVectorSignalGenerator.

◆ IsVectorModulationAvailable()

virtual bool RFSignalGenerator::IsVectorModulationAvailable ( int  chan)
pure virtual

Checks if an instrument is vector modulation capable.

Parameters
chanZero-based channel index

Implemented in SiglentVectorSignalGenerator.

◆ SetAnalogFMDeviation()

virtual void RFSignalGenerator::SetAnalogFMDeviation ( int  chan,
int64_t  deviation 
)
pure virtual

Sets the analog FM deviation for a channel (in Hz)

Implemented in SiglentVectorSignalGenerator.

◆ SetAnalogFMEnable()

virtual void RFSignalGenerator::SetAnalogFMEnable ( int  chan,
bool  on 
)
pure virtual

Enable or disable analog frequency modulation (also requires modulation to be turned on)

Implemented in SiglentVectorSignalGenerator.

◆ SetAnalogFMFrequency()

virtual void RFSignalGenerator::SetAnalogFMFrequency ( int  chan,
int64_t  frequency 
)
pure virtual

Sets the analog FM frequency for a channel (in Hz)

Implemented in SiglentVectorSignalGenerator.

◆ SetAnalogFMWaveShape()

virtual void RFSignalGenerator::SetAnalogFMWaveShape ( int  chan,
FunctionGenerator::WaveShape  shape 
)
pure virtual

Sets the analog FM modulation shape for a channel.

Implemented in SiglentVectorSignalGenerator.

◆ SetAnalogModulationEnable()

virtual void RFSignalGenerator::SetAnalogModulationEnable ( int  chan,
bool  on 
)
pure virtual

Enable or disable analog modulation.

Implemented in SiglentVectorSignalGenerator.

◆ SetChannelCenterFrequency()

virtual void RFSignalGenerator::SetChannelCenterFrequency ( int  chan,
double  freq 
)
pure virtual

Sets the power level of a channel.

Parameters
chanZero-based channel index
freqCenter frequency, in Hz

Implemented in SiglentVectorSignalGenerator.

◆ SetChannelOutputEnable()

virtual void RFSignalGenerator::SetChannelOutputEnable ( int  chan,
bool  on 
)
pure virtual

Enable or disable a channel output.

Parameters
chanZero-based channel index
onTrue to enable the output, false to disable

Implemented in SiglentVectorSignalGenerator.

◆ SetChannelOutputPower()

virtual void RFSignalGenerator::SetChannelOutputPower ( int  chan,
float  power 
)
pure virtual

Sets the power level of a channel.

Parameters
chanZero-based channel index
powerPower level (in dBm)

Implemented in SiglentVectorSignalGenerator.

◆ SetSweepDirection()

void RFSignalGenerator::SetSweepDirection ( int  chan,
SweepDirection  dir 
)
virtual

Sets the direction of a sweep.

Parameters
chanZero-based channel index
dirDirection of the sweep curve to use

Reimplemented in SiglentVectorSignalGenerator.

◆ SetSweepDwellTime()

void RFSignalGenerator::SetSweepDwellTime ( int  chan,
float  fs 
)
virtual

Sets the dwell time for each step in a sweep.

Parameters
chanZero-based channel index
stepStep, in femtoseconds

Reimplemented in SiglentVectorSignalGenerator.

◆ SetSweepPoints()

void RFSignalGenerator::SetSweepPoints ( int  chan,
int  npoints 
)
virtual

Sets the number of frequency points in a sweep.

Parameters
chanZero-based channel index
npointsNumber of points

Reimplemented in SiglentVectorSignalGenerator.

◆ SetSweepShape()

void RFSignalGenerator::SetSweepShape ( int  chan,
SweepShape  shape 
)
virtual

Sets the shape of a sweep.

Parameters
chanZero-based channel index
shapeShape of the sweep curve to use

Reimplemented in SiglentVectorSignalGenerator.

◆ SetSweepSpacing()

void RFSignalGenerator::SetSweepSpacing ( int  chan,
SweepSpacing  shape 
)
virtual

Sets the spacing of a sweep (log or linear)

Parameters
chanZero-based channel index
shapeSpacing of the sweep curve to use

Reimplemented in SiglentVectorSignalGenerator.

◆ SetSweepStartFrequency()

void RFSignalGenerator::SetSweepStartFrequency ( int  chan,
float  freq 
)
virtual

Sets the start of a frequency sweep.

Parameters
chanZero-based channel index
freqStart frequency, in Hz

Reimplemented in SiglentVectorSignalGenerator.

◆ SetSweepStartLevel()

void RFSignalGenerator::SetSweepStartLevel ( int  chan,
float  level 
)
virtual

Sets the start of a power sweep.

Parameters
chanZero-based channel index
levelStart power, in dBm

Reimplemented in SiglentVectorSignalGenerator.

◆ SetSweepStopFrequency()

void RFSignalGenerator::SetSweepStopFrequency ( int  chan,
float  freq 
)
virtual

Sets the stop of a frequency sweep.

Parameters
chanZero-based channel index
freqStop frequency, in Hz

Reimplemented in SiglentVectorSignalGenerator.

◆ SetSweepStopLevel()

void RFSignalGenerator::SetSweepStopLevel ( int  chan,
float  level 
)
virtual

Sets the stop of a power sweep.

Parameters
chanZero-based channel index
levelStop power, in dBm

Reimplemented in SiglentVectorSignalGenerator.

◆ SetSweepType()

void RFSignalGenerator::SetSweepType ( int  chan,
SweepType  type 
)
virtual

Sets the type of a sweep.

Parameters
chanZero-based channel index
typeSweep type

Reimplemented in SiglentVectorSignalGenerator.


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