DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExpInstr::FunctionGeneratorData Class Reference

Data class for FunctionGenerator. More...

+ Inheritance diagram for DynExpInstr::FunctionGeneratorData:

Public Member Functions

 FunctionGeneratorData (DataStreamBasePtrType &&SampleStream)
 Constructs a DataStreamInstrumentData instance. More...
 
virtual ~FunctionGeneratorData ()=default
 
auto GetCurrentWaveformType () const noexcept
 Returns CurrentWaveformType. More...
 
auto GetCurrentFrequencyInHz () const noexcept
 Returns CurrentFrequencyInHz. More...
 
auto GetCurrentAmplitude () const noexcept
 Returns CurrentAmplitude. More...
 
auto GetCurrentOffset () const noexcept
 Returns CurrentOffset. More...
 
auto GetCurrentPhaseInRad () const noexcept
 Returns CurrentPhaseInRad. More...
 
auto GetCurrentDutyCycle () const noexcept
 Returns CurrentDutyCycle. More...
 
auto GetCurrentTriggerMode () const noexcept
 Returns CurrentTriggerMode. More...
 
auto GetCurrentTriggerEdge () const noexcept
 Returns CurrentTriggerEdge. More...
 
auto GetShouldAutostart () const noexcept
 Returns ShouldAutostart. More...
 
auto GetCurrentPulses () const noexcept
 Returns CurrentPulses. More...
 
- Public Member Functions inherited from DynExpInstr::DataStreamInstrumentData
 DataStreamInstrumentData (DataStreamBasePtrType &&SampleStream)
 Constructs a DataStreamInstrumentData instance. More...
 
virtual ~DataStreamInstrumentData ()=default
 
DataStreamBasePtrType::element_type * GetSampleStream () const noexcept
 Getter for the data stream instrument's sample stream. Logical const-ness: always returns a non-const type to allow modules to directly manipulate the sample stream. More...
 
template<typename T >
auto GetCastSampleStream () const
 Casts the data stream instrument's sample stream to a derived data stream type. More...
 
ValueType GetHardwareMinValue () const noexcept
 Returns HardwareMinValue. More...
 
ValueType GetHardwareMaxValue () const noexcept
 Returns HardwareMaxValue. More...
 
UnitType GetValueUnit () const noexcept
 Returns ValueUnit. More...
 
void SetHardwareMinValue (ValueType Value) noexcept
 Sets HardwareMinValue. More...
 
void SetHardwareMaxValue (ValueType Value) noexcept
 Sets HardwareMaxValue. More...
 
void SetValueUnit (UnitType Unit) noexcept
 Sets ValueUnit. More...
 
- Public Member Functions inherited from DynExp::InstrumentDataBase
 InstrumentDataBase ()
 
virtual ~InstrumentDataBase ()
 
auto GetLastUpdateTime () const
 Getter for LastUpdate. More...
 
auto GetException () const noexcept
 Getter for InstrumentDataBase::InstrumentException. More...
 
void EnqueueTask (std::unique_ptr< TaskBase > &&Task)
 Enqueues a task at the back of an instrument's task queue and notifies the instrument about the new task. More...
 
void EnqueuePriorityTask (std::unique_ptr< TaskBase > &&Task)
 Enqueues a task at the front of an instrument's task queue and notifies the instrument about the new task. More...
 
std::unique_ptr< TaskBasePopTaskFront ()
 Removes a task from the front of an instrument's task queue. More...
 
std::unique_ptr< TaskBasePopTaskBack ()
 Removes a task from the back of an instrument's task queue. More...
 
auto GetTaskFront () noexcept
 Getter for first enqueued task. More...
 
auto GetTaskBack () noexcept
 Getter for last enqueued task. More...
 
size_t GetNumEnqueuedTasks () const noexcept
 Getter for the instrument task queue's length. More...
 
std::unique_ptr< TaskBasePopFinishedTask ()
 Removes a task from the front of an instrument's list of finished tasks. More...
 
size_t GetNumFinishedTasks () const noexcept
 Getter for the length of the instrument's list of finished tasks. More...
 
bool IsQueueClosed () const noexcept
 Determines whether the instrument task queue is closed. More...
 
- Public Member Functions inherited from Util::INonCopyable
 INonCopyable (const INonCopyable &)=delete
 
INonCopyableoperator= (const INonCopyable &)=delete
 

Private Member Functions

void ResetImpl (dispatch_tag< DataStreamInstrumentData >) override final
 
virtual void ResetImpl (dispatch_tag< FunctionGeneratorData >)
 

Private Attributes

bool DataHasBeenUpdated { false }
 Indicates whether new data has been written to the instrument's data stream which needs now to be transferred to the underlying hardware in an FunctionGeneratorTasks::UpdateTask calling DataStreamInstrument::WriteData(). More...
 
FunctionGeneratorDefs::WaveformTypes CurrentWaveformType {}
 Current waveform type. More...
 
double CurrentFrequencyInHz {}
 Current waveform's frequency in Hz. More...
 
double CurrentAmplitude {}
 Current waveform's amplitude. More...
 
double CurrentOffset {}
 Current waveform's offset. More...
 
double CurrentPhaseInRad {}
 Current waveform's phase in radians. More...
 
double CurrentDutyCycle {}
 Current waveform's duty cycle or rise/fall ratio. More...
 
FunctionGeneratorDefs::TriggerDescType::TriggerModeType CurrentTriggerMode
 Current trigger mode. More...
 
FunctionGeneratorDefs::TriggerDescType::TriggerEdgeType CurrentTriggerEdge
 Current edge type to trigger on. More...
 
bool ShouldAutostart {}
 Determines whether to directly make the underlying hardware device start generating the function (true) or whether to await a trigger signal (false). More...
 
FunctionGeneratorDefs::PulsesDescType CurrentPulses
 Current waveform's pulse segments. More...
 

Friends

class FunctionGeneratorTasks::UpdateTask
 
class FunctionGeneratorTasks::SetSineFunctionTask
 
class FunctionGeneratorTasks::SetRectFunctionTask
 
class FunctionGeneratorTasks::SetRampFunctionTask
 
class FunctionGeneratorTasks::SetPulseFunctionTask
 
class FunctionGeneratorTasks::SetArbitraryFunctionTask
 
class FunctionGeneratorTasks::SetTriggerTask
 

Additional Inherited Members

- Public Types inherited from DynExpInstr::DataStreamInstrumentData
enum class  UnitType {
  Arbitrary , LogicLevel , Counts , Volt ,
  Ampere , Power_W , Power_dBm
}
 Units which can be used for data stream instruments. More...
 
using ValueType = double
 Data type to represent hardware limits on the sample values to write to the hardware adapter assigned to the related DataStreamInstrument instance. More...
 
- Public Types inherited from DynExp::InstrumentDataBase
using TaskQueueType = std::list< std::unique_ptr< TaskBase > >
 Type of an instrument task queue owning the tasks within. More...
 
using TaskQueueIteratorType = TaskQueueType::const_iterator
 Const iterator type to elements of TaskQueueType. More...
 
- Static Public Member Functions inherited from DynExpInstr::DataStreamInstrumentData
static const char * UnitTypeToStr (const UnitType &Unit)
 Returns a descriptive string of a respective unit to be e.g. used in plots. More...
 
- Public Attributes inherited from DynExp::InstrumentDataBase
InstrumentBaseOnlyType InstrumentBaseOnly
 Allow exclusive access to some of InstrumentDataBase's private methods to InstrumentBase. More...
 
InstrumenThreadOnlyType InstrumentThreadOnly
 Allow exclusive access to some of InstrumentDataBase's private methods to the instrument thread InstrumentThreadMain(). More...
 
- Protected Member Functions inherited from Util::ISynchronizedPointerLockable
 ISynchronizedPointerLockable ()
 
 ~ISynchronizedPointerLockable ()
 Object should never be destroyed before completely unlocked. More...
 
- Protected Member Functions inherited from Util::INonCopyable
constexpr INonCopyable ()=default
 
 ~INonCopyable ()=default
 

Detailed Description

Data class for FunctionGenerator.

Definition at line 568 of file FunctionGenerator.h.

Constructor & Destructor Documentation

◆ FunctionGeneratorData()

DynExpInstr::FunctionGeneratorData::FunctionGeneratorData ( DataStreamBasePtrType &&  SampleStream)
inline

Constructs a DataStreamInstrumentData instance.

Parameters
SampleStreamData stream the related DataStreamInstrument instance operates on. The DataStreamInstrumentData instance takes ownership of the stream.
Exceptions
Util::InvalidArgExceptionis thrown if SampleStream is nullptr.

Definition at line 582 of file FunctionGenerator.h.

◆ ~FunctionGeneratorData()

virtual DynExpInstr::FunctionGeneratorData::~FunctionGeneratorData ( )
virtualdefault

Member Function Documentation

◆ GetCurrentAmplitude()

auto DynExpInstr::FunctionGeneratorData::GetCurrentAmplitude ( ) const
inlinenoexcept

Returns CurrentAmplitude.

Definition at line 588 of file FunctionGenerator.h.

◆ GetCurrentDutyCycle()

auto DynExpInstr::FunctionGeneratorData::GetCurrentDutyCycle ( ) const
inlinenoexcept

Returns CurrentDutyCycle.

Definition at line 591 of file FunctionGenerator.h.

◆ GetCurrentFrequencyInHz()

auto DynExpInstr::FunctionGeneratorData::GetCurrentFrequencyInHz ( ) const
inlinenoexcept

Returns CurrentFrequencyInHz.

Definition at line 587 of file FunctionGenerator.h.

◆ GetCurrentOffset()

auto DynExpInstr::FunctionGeneratorData::GetCurrentOffset ( ) const
inlinenoexcept

Returns CurrentOffset.

Definition at line 589 of file FunctionGenerator.h.

◆ GetCurrentPhaseInRad()

auto DynExpInstr::FunctionGeneratorData::GetCurrentPhaseInRad ( ) const
inlinenoexcept

Returns CurrentPhaseInRad.

Definition at line 590 of file FunctionGenerator.h.

◆ GetCurrentPulses()

auto DynExpInstr::FunctionGeneratorData::GetCurrentPulses ( ) const
inlinenoexcept

Returns CurrentPulses.

Definition at line 595 of file FunctionGenerator.h.

◆ GetCurrentTriggerEdge()

auto DynExpInstr::FunctionGeneratorData::GetCurrentTriggerEdge ( ) const
inlinenoexcept

Returns CurrentTriggerEdge.

Definition at line 593 of file FunctionGenerator.h.

◆ GetCurrentTriggerMode()

auto DynExpInstr::FunctionGeneratorData::GetCurrentTriggerMode ( ) const
inlinenoexcept

Returns CurrentTriggerMode.

Definition at line 592 of file FunctionGenerator.h.

◆ GetCurrentWaveformType()

auto DynExpInstr::FunctionGeneratorData::GetCurrentWaveformType ( ) const
inlinenoexcept

Returns CurrentWaveformType.

Definition at line 586 of file FunctionGenerator.h.

◆ GetShouldAutostart()

auto DynExpInstr::FunctionGeneratorData::GetShouldAutostart ( ) const
inlinenoexcept

Returns ShouldAutostart.

Definition at line 594 of file FunctionGenerator.h.

◆ ResetImpl() [1/2]

void DynExpInstr::FunctionGeneratorData::ResetImpl ( dispatch_tag< DataStreamInstrumentData )
finaloverrideprivatevirtual

Reimplemented from DynExpInstr::DataStreamInstrumentData.

Definition at line 270 of file FunctionGenerator.cpp.

◆ ResetImpl() [2/2]

virtual void DynExpInstr::FunctionGeneratorData::ResetImpl ( dispatch_tag< FunctionGeneratorData )
inlineprivatevirtual

Friends And Related Function Documentation

◆ FunctionGeneratorTasks::SetArbitraryFunctionTask

Definition at line 575 of file FunctionGenerator.h.

◆ FunctionGeneratorTasks::SetPulseFunctionTask

Definition at line 574 of file FunctionGenerator.h.

◆ FunctionGeneratorTasks::SetRampFunctionTask

Definition at line 573 of file FunctionGenerator.h.

◆ FunctionGeneratorTasks::SetRectFunctionTask

Definition at line 572 of file FunctionGenerator.h.

◆ FunctionGeneratorTasks::SetSineFunctionTask

Definition at line 571 of file FunctionGenerator.h.

◆ FunctionGeneratorTasks::SetTriggerTask

Definition at line 576 of file FunctionGenerator.h.

◆ FunctionGeneratorTasks::UpdateTask

Definition at line 570 of file FunctionGenerator.h.

Member Data Documentation

◆ CurrentAmplitude

double DynExpInstr::FunctionGeneratorData::CurrentAmplitude {}
private

Current waveform's amplitude.

Definition at line 614 of file FunctionGenerator.h.

◆ CurrentDutyCycle

double DynExpInstr::FunctionGeneratorData::CurrentDutyCycle {}
private

Current waveform's duty cycle or rise/fall ratio.

Definition at line 617 of file FunctionGenerator.h.

◆ CurrentFrequencyInHz

double DynExpInstr::FunctionGeneratorData::CurrentFrequencyInHz {}
private

Current waveform's frequency in Hz.

Definition at line 613 of file FunctionGenerator.h.

◆ CurrentOffset

double DynExpInstr::FunctionGeneratorData::CurrentOffset {}
private

Current waveform's offset.

Definition at line 615 of file FunctionGenerator.h.

◆ CurrentPhaseInRad

double DynExpInstr::FunctionGeneratorData::CurrentPhaseInRad {}
private

Current waveform's phase in radians.

Definition at line 616 of file FunctionGenerator.h.

◆ CurrentPulses

FunctionGeneratorDefs::PulsesDescType DynExpInstr::FunctionGeneratorData::CurrentPulses
private

Current waveform's pulse segments.

Definition at line 622 of file FunctionGenerator.h.

◆ CurrentTriggerEdge

FunctionGeneratorDefs::TriggerDescType::TriggerEdgeType DynExpInstr::FunctionGeneratorData::CurrentTriggerEdge
private

Current edge type to trigger on.

Definition at line 619 of file FunctionGenerator.h.

◆ CurrentTriggerMode

FunctionGeneratorDefs::TriggerDescType::TriggerModeType DynExpInstr::FunctionGeneratorData::CurrentTriggerMode
private

Current trigger mode.

Definition at line 618 of file FunctionGenerator.h.

◆ CurrentWaveformType

FunctionGeneratorDefs::WaveformTypes DynExpInstr::FunctionGeneratorData::CurrentWaveformType {}
private

Current waveform type.

Definition at line 612 of file FunctionGenerator.h.

◆ DataHasBeenUpdated

bool DynExpInstr::FunctionGeneratorData::DataHasBeenUpdated { false }
private

Indicates whether new data has been written to the instrument's data stream which needs now to be transferred to the underlying hardware in an FunctionGeneratorTasks::UpdateTask calling DataStreamInstrument::WriteData().

Definition at line 610 of file FunctionGenerator.h.

◆ ShouldAutostart

bool DynExpInstr::FunctionGeneratorData::ShouldAutostart {}
private

Determines whether to directly make the underlying hardware device start generating the function (true) or whether to await a trigger signal (false).

Definition at line 620 of file FunctionGenerator.h.


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