DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExpInstr::LockinAmplifierData Class Referenceabstract

Data class for LockinAmplifier. More...

+ Inheritance diagram for DynExpInstr::LockinAmplifierData:

Public Types

using SampleStreamType = BasicSampleStream
 Data stream type this data stream instrument operates on. More...
 
- 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...
 

Public Member Functions

 LockinAmplifierData (size_t BufferSizeInSamples)
 Constructs a LockinAmplifierData instance. More...
 
virtual ~LockinAmplifierData ()=default
 
double GetAcquisitionTime () const
 Determines the duration of a single acquisition in seconds using GetSamplingRate() and DataStreamBase::GetStreamSizeWrite(). More...
 
Override

Override getters and setters by derived classes to let them decide which functionality to provide and how to represent the data.

virtual double GetSensitivity () const noexcept=0
 Getter for the lock-in amplifier's sensitivity/amplification setting. More...
 
virtual void SetSensitivity (double Sensitivity) noexcept=0
 Setter for the lock-in amplifier's sensitivity/amplification setting. More...
 
virtual double GetPhase () const noexcept=0
 Getter for the phase in rad of the lock-in amplifier's demodulator. More...
 
virtual void SetPhase (double Phase) noexcept=0
 Setter for the phase in rad of the lock-in amplifier's demodulator. More...
 
virtual double GetTimeConstant () const noexcept=0
 Getter for the time constant in seconds of the lock-in amplifier's low-poss filter. More...
 
virtual void SetTimeConstant (double TimeConstant) noexcept=0
 Setter for the time constant in seconds of the lock-in amplifier's low-poss filter. More...
 
virtual uint8_t GetFilterOrder () const noexcept
 Getter for the filter order/quality of the lock-in amplifier's low-poss filter. More...
 
virtual void SetFilterOrder (uint8_t FilterOrder) noexcept
 Setter for the filter order/quality of the lock-in amplifier's low-poss filter. More...
 
virtual LockinAmplifierDefs::TriggerModeType GetTriggerMode () const noexcept
 Getter for the lock-in amplifier's trigger mode. More...
 
virtual void SetTriggerMode (LockinAmplifierDefs::TriggerModeType TriggerMode) noexcept
 Setter for the lock-in amplifier's trigger mode. More...
 
virtual LockinAmplifierDefs::TriggerEdgeType GetTriggerEdge () const noexcept
 Getter for the lock-in amplifier's trigger edge. More...
 
virtual void SetTriggerEdge (LockinAmplifierDefs::TriggerEdgeType TriggerEdge) noexcept
 Setter for the lock-in amplifier's trigger edge. More...
 
virtual LockinAmplifierDefs::SignalType GetSignalType () const noexcept=0
 Getter for the lock-in amplifier's signal coordinate type to write to the data stream. More...
 
virtual void SetSignalType (LockinAmplifierDefs::SignalType SignalType) noexcept=0
 Setter for the lock-in amplifier's signal coordinate type to write to the data stream. More...
 
virtual double GetSamplingRate () const noexcept
 Getter for the lock-in amplifier's sampling rate in samples/s. More...
 
virtual void SetSamplingRate (double SamplingRate) noexcept
 Setter for the lock-in amplifier's sampling rate in samples/s. More...
 
virtual bool IsEnabled () const noexcept
 Returns true if the lock-in amplifier's demodulator is enabled, false otherwise. More...
 
virtual void SetEnable (uint8_t Enable) noexcept
 Enables (pass true) or disables (pass false) the lock-in amplifier's demodulator. More...
 
virtual bool IsOverloaded () const noexcept
 Indicates whether the lock-in amplifier's physical signal input is overloaded by e.g. an overvoltage. More...
 
virtual std::pair< double, double > GetInputLoad () const noexcept
 Indicates the load at the lock-in amplifier's physical signal input in negative and positive directions. More...
 
virtual double GetOscillatorFrequency () const noexcept
 Indicates the oscillator frequency the lock-in amplifier demodulates the measured signal at. More...
 
virtual double GetAcquisitionProgress () const noexcept
 Determines the progress of the current data acquisition. 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< LockinAmplifierData >)
 

Additional Inherited Members

- 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 LockinAmplifier.

Definition at line 220 of file LockinAmplifier.h.

Member Typedef Documentation

◆ SampleStreamType

Data stream type this data stream instrument operates on.

Definition at line 223 of file LockinAmplifier.h.

Constructor & Destructor Documentation

◆ LockinAmplifierData()

DynExpInstr::LockinAmplifierData::LockinAmplifierData ( size_t  BufferSizeInSamples)
inline

Constructs a LockinAmplifierData instance.

Parameters
BufferSizeInSamplesInitial buffer size of a data stream of type SampleStreamType to create for the related DataStreamInstrument instance to operate on

Definition at line 231 of file LockinAmplifier.h.

◆ ~LockinAmplifierData()

virtual DynExpInstr::LockinAmplifierData::~LockinAmplifierData ( )
virtualdefault

Member Function Documentation

◆ GetAcquisitionProgress()

virtual double DynExpInstr::LockinAmplifierData::GetAcquisitionProgress ( ) const
inlinevirtualnoexcept

Determines the progress of the current data acquisition.

Returns
Returns the progress of the data acquisition as a value in between 0 and 1 or -1 if the progress is unknown.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 314 of file LockinAmplifier.h.

◆ GetAcquisitionTime()

double DynExpInstr::LockinAmplifierData::GetAcquisitionTime ( ) const

Determines the duration of a single acquisition in seconds using GetSamplingRate() and DataStreamBase::GetStreamSizeWrite().

Returns
Returns the stream size divided by the sampling rate. Returns 0 if the sampling rate is not greater than 0.

Definition at line 58 of file LockinAmplifier.cpp.

◆ GetFilterOrder()

virtual uint8_t DynExpInstr::LockinAmplifierData::GetFilterOrder ( ) const
inlinevirtualnoexcept

Getter for the filter order/quality of the lock-in amplifier's low-poss filter.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 246 of file LockinAmplifier.h.

◆ GetInputLoad()

virtual std::pair<double, double> DynExpInstr::LockinAmplifierData::GetInputLoad ( ) const
inlinevirtualnoexcept

Indicates the load at the lock-in amplifier's physical signal input in negative and positive directions.

Returns
Returns a tuple of two values. The first value refers to the load in negative direction (e.g. negative voltages), the second value refers to the load in positive direction (e.g. positive voltages). Each value is in range 0 to 1. 1 means an overload in the respective direction. Values of -1 indicate that the load in the respective direction is unknown.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 300 of file LockinAmplifier.h.

◆ GetOscillatorFrequency()

virtual double DynExpInstr::LockinAmplifierData::GetOscillatorFrequency ( ) const
inlinevirtualnoexcept

Indicates the oscillator frequency the lock-in amplifier demodulates the measured signal at.

Returns
Returns the oscillator frequency in Hz or 0 if it is unknown.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 307 of file LockinAmplifier.h.

◆ GetPhase()

virtual double DynExpInstr::LockinAmplifierData::GetPhase ( ) const
pure virtualnoexcept

Getter for the phase in rad of the lock-in amplifier's demodulator.

Implemented in DynExpInstr::ZI_MFLIData.

◆ GetSamplingRate()

virtual double DynExpInstr::LockinAmplifierData::GetSamplingRate ( ) const
inlinevirtualnoexcept

Getter for the lock-in amplifier's sampling rate in samples/s.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 279 of file LockinAmplifier.h.

◆ GetSensitivity()

virtual double DynExpInstr::LockinAmplifierData::GetSensitivity ( ) const
pure virtualnoexcept

Getter for the lock-in amplifier's sensitivity/amplification setting.

Implemented in DynExpInstr::ZI_MFLIData.

◆ GetSignalType()

virtual LockinAmplifierDefs::SignalType DynExpInstr::LockinAmplifierData::GetSignalType ( ) const
pure virtualnoexcept

Getter for the lock-in amplifier's signal coordinate type to write to the data stream.

Implemented in DynExpInstr::ZI_MFLIData.

◆ GetTimeConstant()

virtual double DynExpInstr::LockinAmplifierData::GetTimeConstant ( ) const
pure virtualnoexcept

Getter for the time constant in seconds of the lock-in amplifier's low-poss filter.

Implemented in DynExpInstr::ZI_MFLIData.

◆ GetTriggerEdge()

virtual LockinAmplifierDefs::TriggerEdgeType DynExpInstr::LockinAmplifierData::GetTriggerEdge ( ) const
inlinevirtualnoexcept

Getter for the lock-in amplifier's trigger edge.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 262 of file LockinAmplifier.h.

◆ GetTriggerMode()

virtual LockinAmplifierDefs::TriggerModeType DynExpInstr::LockinAmplifierData::GetTriggerMode ( ) const
inlinevirtualnoexcept

Getter for the lock-in amplifier's trigger mode.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 252 of file LockinAmplifier.h.

◆ IsEnabled()

virtual bool DynExpInstr::LockinAmplifierData::IsEnabled ( ) const
inlinevirtualnoexcept

Returns true if the lock-in amplifier's demodulator is enabled, false otherwise.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 281 of file LockinAmplifier.h.

◆ IsOverloaded()

virtual bool DynExpInstr::LockinAmplifierData::IsOverloaded ( ) const
inlinevirtualnoexcept

Indicates whether the lock-in amplifier's physical signal input is overloaded by e.g. an overvoltage.

Returns
Returns true if there is currently an overload, false otherwise.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 289 of file LockinAmplifier.h.

◆ ResetImpl() [1/2]

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

Reimplemented from DynExpInstr::DataStreamInstrumentData.

Definition at line 69 of file LockinAmplifier.cpp.

◆ ResetImpl() [2/2]

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

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 327 of file LockinAmplifier.h.

◆ SetEnable()

virtual void DynExpInstr::LockinAmplifierData::SetEnable ( uint8_t  Enable)
inlinevirtualnoexcept

Enables (pass true) or disables (pass false) the lock-in amplifier's demodulator.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 282 of file LockinAmplifier.h.

◆ SetFilterOrder()

virtual void DynExpInstr::LockinAmplifierData::SetFilterOrder ( uint8_t  FilterOrder)
inlinevirtualnoexcept

Setter for the filter order/quality of the lock-in amplifier's low-poss filter.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 247 of file LockinAmplifier.h.

◆ SetPhase()

virtual void DynExpInstr::LockinAmplifierData::SetPhase ( double  Phase)
pure virtualnoexcept

Setter for the phase in rad of the lock-in amplifier's demodulator.

Implemented in DynExpInstr::ZI_MFLIData.

◆ SetSamplingRate()

virtual void DynExpInstr::LockinAmplifierData::SetSamplingRate ( double  SamplingRate)
inlinevirtualnoexcept

Setter for the lock-in amplifier's sampling rate in samples/s.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 280 of file LockinAmplifier.h.

◆ SetSensitivity()

virtual void DynExpInstr::LockinAmplifierData::SetSensitivity ( double  Sensitivity)
pure virtualnoexcept

Setter for the lock-in amplifier's sensitivity/amplification setting.

Implemented in DynExpInstr::ZI_MFLIData.

◆ SetSignalType()

virtual void DynExpInstr::LockinAmplifierData::SetSignalType ( LockinAmplifierDefs::SignalType  SignalType)
pure virtualnoexcept

Setter for the lock-in amplifier's signal coordinate type to write to the data stream.

Implemented in DynExpInstr::ZI_MFLIData.

◆ SetTimeConstant()

virtual void DynExpInstr::LockinAmplifierData::SetTimeConstant ( double  TimeConstant)
pure virtualnoexcept

Setter for the time constant in seconds of the lock-in amplifier's low-poss filter.

Implemented in DynExpInstr::ZI_MFLIData.

◆ SetTriggerEdge()

virtual void DynExpInstr::LockinAmplifierData::SetTriggerEdge ( LockinAmplifierDefs::TriggerEdgeType  TriggerEdge)
inlinevirtualnoexcept

Setter for the lock-in amplifier's trigger edge.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 267 of file LockinAmplifier.h.

◆ SetTriggerMode()

virtual void DynExpInstr::LockinAmplifierData::SetTriggerMode ( LockinAmplifierDefs::TriggerModeType  TriggerMode)
inlinevirtualnoexcept

Setter for the lock-in amplifier's trigger mode.

Reimplemented in DynExpInstr::ZI_MFLIData.

Definition at line 257 of file LockinAmplifier.h.


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