PS_Fgen_FW  4da88f4073c1cc65ea45c3a652a2751e495e50db
Firmware for an Power Supply and Function Generator build from an ATX power supply
Loading...
Searching...
No Matches
DDS_Channel Class Reference

Direct digital synthesis channel. More...

#include <DDS_Channel.h>

Inheritance diagram for DDS_Channel:
Channel

Public Member Functions

 DDS_Channel (uint8_t ddsChannelNumber, float minFreq, float maxFreq, float minAmpl, float maxAmpl, float minOffset, float maxOffset)
 Constructor of the DDS_Channel.
 
void UpdateIncrement ()
 Update the increment value based on the Frequency.
 
void UpdateWaveTable ()
 Update the WaveTable based on the SignalForm, Amplitude and Offset.
 
void UpdateOriginalWaveTable ()
 Update the pointer to the original WaveTable based on the SignalForm.
 
bool SetEnabled (bool enabled)
 Set the Enabled property of the DDS channel.
 
bool GetEnabled ()
 Get the Enabled property of the DDS channel.
 
bool SetFrequency (float frequency)
 Set the Frequency property of the DDS channel.
 
float GetFrequency ()
 Get the Frequency property of the DDS channel.
 
bool SetAmplitude (float amplitude)
 Set the Amplitude property of the DDS channel.
 
float GetAmplitude ()
 Get the Amplitude property of the DDS channel.
 
bool SetOffset (float offset)
 Set the Offset property of the DDS channel.
 
float GetOffset ()
 Get the Offset property of the DDS channel.
 
bool SetSignalForm (SignalForms_t signalForm)
 Set the SignalForm property of the DDS channel.
 
SignalForms_t GetSignalForm ()
 Get the SignalForm property of the DDS channel.
 
bool SetPWMValue (float pwmValue)
 Set the PWM_Value property of the DDS channel.
 
float GetPWMValue ()
 Get the PWM_Value property of the DDS channel.
 
- Public Member Functions inherited from Channel
 Channel (ChannelTypes_t channelType)
 Constructor of the Channel class.
 
ChannelTypes_t GetChannelType ()
 Function that can be used to return the _channelType property.
 

Static Public Member Functions

static void DDSFrequencyChanged (void *channel)
 Callback function that can be used for user interface controls modifying the Frequency property.
 
static void DDSAmplitudeChanged (void *channel)
 Callback function that can be used for user interface controls modifying the Amplitude property.
 
static void DDSOffsetChanged (void *channel)
 Callback function that can be used for user interface controls modifying the Offset property.
 
static void DDSSignalFormChanged (void *channel)
 Callback function that can be used for user interface controls modifying the SignalForm property.
 
static void DDSPWMValueChanged (void *channel)
 Callback function that can be used for user interface controls modifying the PWM_Value property.
 
static void DDSEnabledChanged (void *channel)
 Callback function that can be used for user interface controls modifying the Enabled property.
 

Public Attributes

uint8_t DdsChannelNumber
 1-based channel number (DDS1 => 1, DDS2 => 2)
 
Parameter< bool > Enabled
 Is the channel enabled or not.
 
Parameter< float > Frequency
 Frequency of the DDS channel.
 
Parameter< float > Amplitude
 Amplitude of the DDS channel.
 
Parameter< float > Offset
 Offset of the DDS channel.
 
Parameter< SignalForms_tSignalForm
 Signalform of the DDS channel.
 
Parameter< float > PWM_Value
 PWM value of the DDS channel.
 
volatile const uint16_t * OriginalWaveTable
 Pointer to the constant wave table holding the unmodified points of the signal determined by the SignalForm parameter.
 
volatile uint16_t * p_WaveTable
 Pointer to the wave table array holding the modified waveform points (adapted to waveform and offset)
 
volatile uint32_t * p_Increment
 Pointer to the increment variable (calculated from the Frequency setting)
 

Additional Inherited Members

- Protected Attributes inherited from Channel
ChannelTypes_t _channelType
 Type of the channel.
 

Detailed Description

Direct digital synthesis channel.

This is a channel holding all parameters of a DDS implementation.

Constructor & Destructor Documentation

◆ DDS_Channel()

DDS_Channel::DDS_Channel ( uint8_t ddsChannelNumber,
float minFreq,
float maxFreq,
float minAmpl,
float maxAmpl,
float minOffset,
float maxOffset )

Constructor of the DDS_Channel.

Parameters
ddsChannelNumber1-based channel number (DDS1 => 1, DDS2 => 2)
minFreqMinimum allowed frequency for the DDS channel
maxFreqMaximum allowed frequency for the DDS channel
minAmplMinimum allowed amplitude for the DDS channel
maxAmplMaximum allowed amplitude for the DDS channel
minOffsetMinimum allowed offset for the DDS channel
maxOffsetMaximum allowed offset for the DDS channel

Member Function Documentation

◆ DDSAmplitudeChanged()

void DDS_Channel::DDSAmplitudeChanged ( void * channel)
static

Callback function that can be used for user interface controls modifying the Amplitude property.

Parameters
channelPointer to a DDS_Channel

◆ DDSEnabledChanged()

void DDS_Channel::DDSEnabledChanged ( void * channel)
static

Callback function that can be used for user interface controls modifying the Enabled property.

Parameters
channelPointer to a DDS_Channel

◆ DDSFrequencyChanged()

void DDS_Channel::DDSFrequencyChanged ( void * channel)
static

Callback function that can be used for user interface controls modifying the Frequency property.

Parameters
channelPointer to a DDS_Channel

◆ DDSOffsetChanged()

void DDS_Channel::DDSOffsetChanged ( void * channel)
static

Callback function that can be used for user interface controls modifying the Offset property.

Parameters
channelPointer to a DDS_Channel

◆ DDSPWMValueChanged()

void DDS_Channel::DDSPWMValueChanged ( void * channel)
static

Callback function that can be used for user interface controls modifying the PWM_Value property.

Parameters
channelPointer to a DDS_Channel

◆ DDSSignalFormChanged()

void DDS_Channel::DDSSignalFormChanged ( void * channel)
static

Callback function that can be used for user interface controls modifying the SignalForm property.

Parameters
channelPointer to a DDS_Channel

◆ GetAmplitude()

float DDS_Channel::GetAmplitude ( )
inline

Get the Amplitude property of the DDS channel.

Returns
Value of the Amplitude property

◆ GetEnabled()

bool DDS_Channel::GetEnabled ( )
inline

Get the Enabled property of the DDS channel.

Returns
Value of the Enabled property

◆ GetFrequency()

float DDS_Channel::GetFrequency ( )
inline

Get the Frequency property of the DDS channel.

Returns
Value of the Frequency property

◆ GetOffset()

float DDS_Channel::GetOffset ( )
inline

Get the Offset property of the DDS channel.

Returns
Value of the Offset property

◆ GetPWMValue()

float DDS_Channel::GetPWMValue ( )
inline

Get the PWM_Value property of the DDS channel.

Returns
Value of the PWM_Value property

◆ GetSignalForm()

SignalForms_t DDS_Channel::GetSignalForm ( )
inline

Get the SignalForm property of the DDS channel.

Returns
Value of the SignalForm property

◆ SetAmplitude()

bool DDS_Channel::SetAmplitude ( float amplitude)

Set the Amplitude property of the DDS channel.

Parameters
amplitudeNew value for the Amplitude property
Returns
true->set successful; false->value not set

◆ SetEnabled()

bool DDS_Channel::SetEnabled ( bool enabled)

Set the Enabled property of the DDS channel.

Parameters
enabledNew value for the Enabled property
Returns
true->set successful; false->value not set

◆ SetFrequency()

bool DDS_Channel::SetFrequency ( float frequency)

Set the Frequency property of the DDS channel.

Parameters
frequencyNew value for the Frequency property
Returns
true->set successful; false->value not set

◆ SetOffset()

bool DDS_Channel::SetOffset ( float offset)

Set the Offset property of the DDS channel.

Parameters
offsetNew value for the Offset property
Returns
true->set successful; false->value not set

◆ SetPWMValue()

bool DDS_Channel::SetPWMValue ( float pwmValue)

Set the PWM_Value property of the DDS channel.

Parameters
pwmValueNew value for the PWM_Value property
Returns
true->set successful; false->value not set

◆ SetSignalForm()

bool DDS_Channel::SetSignalForm ( SignalForms_t signalForm)

Set the SignalForm property of the DDS channel.

Parameters
signalFormNew value for the SignalForm property
Returns
true->set successful; false->value not set

Member Data Documentation

◆ Enabled

Parameter<bool> DDS_Channel::Enabled

Is the channel enabled or not.

If enabled, the waveform is available at the output.

◆ PWM_Value

Parameter<float> DDS_Channel::PWM_Value

PWM value of the DDS channel.

This is only used if the SignalForm is set to PWM


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