DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExpInstr::FunctionGeneratorDefs::PulsesDescType Struct Reference

Type describing function consisting of a series of pulses. More...

Public Types

using PulsesType = std::map< double, double >
 Type containing pulses as tuples (time [s], value). The time refers to the beginning of a segment where the resulting function stays at the respective value. The map always stays sorted by time in ascending order. More...
 

Public Member Functions

 PulsesDescType ()=default
 
 PulsesDescType (const PulsesDescType &Other)
 Copy constructs a PulsesDescType instance. More...
 
 PulsesDescType (PulsesDescType &&Other)
 Move constructs a PulsesDescType instance. Reset() is called on Other after the operation. More...
 
 PulsesDescType (const PulsesType &Pulses)
 Constructs a PulsesDescType instance copying Pulses and setting Offset to 0. More...
 
 PulsesDescType (PulsesType &&Pulses)
 Constructs a PulsesDescType instance moving from Pulses and setting Offset to 0. Pulses is empty after the operation. More...
 
 PulsesDescType (const std::vector< double > &PulseStarts, const std::vector< double > &PulseAmplitudes, double Offset=0.0)
 Constructs a PulsesDescType instance filling it with pulse segments specified by their start times and amplitudes given by two separate lists. More...
 
PulsesDescTypeoperator= (PulsesDescType &&Other)
 Move assignment operator. Reset() is called on Other after the operation. More...
 
void Reset ()
 Removes all pulse segments from Pulses. More...
 

Public Attributes

PulsesType Pulses
 Series of segments forming the pulse sequence. The resulting function stays constant during a segment. Refer to PulsesType. More...
 
double Offset {}
 Offset of the function to be added to each sample. More...
 

Detailed Description

Type describing function consisting of a series of pulses.

Definition at line 122 of file FunctionGenerator.h.

Member Typedef Documentation

◆ PulsesType

Type containing pulses as tuples (time [s], value). The time refers to the beginning of a segment where the resulting function stays at the respective value. The map always stays sorted by time in ascending order.

Definition at line 130 of file FunctionGenerator.h.

Constructor & Destructor Documentation

◆ PulsesDescType() [1/6]

DynExpInstr::FunctionGeneratorDefs::PulsesDescType::PulsesDescType ( )
default

◆ PulsesDescType() [2/6]

DynExpInstr::FunctionGeneratorDefs::PulsesDescType::PulsesDescType ( const PulsesDescType Other)
inline

Copy constructs a PulsesDescType instance.

Parameters
OtherPulsesDescType instance to copy

Definition at line 138 of file FunctionGenerator.h.

◆ PulsesDescType() [3/6]

DynExpInstr::FunctionGeneratorDefs::PulsesDescType::PulsesDescType ( PulsesDescType &&  Other)

Move constructs a PulsesDescType instance. Reset() is called on Other after the operation.

Parameters
OtherPulsesDescType instance to move from.

Definition at line 8 of file FunctionGenerator.cpp.

◆ PulsesDescType() [4/6]

DynExpInstr::FunctionGeneratorDefs::PulsesDescType::PulsesDescType ( const PulsesType Pulses)
inline

Constructs a PulsesDescType instance copying Pulses and setting Offset to 0.

Parameters
PulsesPulse sequence to copy

Definition at line 152 of file FunctionGenerator.h.

◆ PulsesDescType() [5/6]

DynExpInstr::FunctionGeneratorDefs::PulsesDescType::PulsesDescType ( PulsesType &&  Pulses)

Constructs a PulsesDescType instance moving from Pulses and setting Offset to 0. Pulses is empty after the operation.

Parameters
PulsesPulse sequence to move from.

Definition at line 14 of file FunctionGenerator.cpp.

◆ PulsesDescType() [6/6]

DynExpInstr::FunctionGeneratorDefs::PulsesDescType::PulsesDescType ( const std::vector< double > &  PulseStarts,
const std::vector< double > &  PulseAmplitudes,
double  Offset = 0.0 
)

Constructs a PulsesDescType instance filling it with pulse segments specified by their start times and amplitudes given by two separate lists.

Parameters
PulseStartsList of the start times of the pulses
PulseAmplitudesList with the amplitudes (values) of the pulses
OffsetOffset of the function to be added to each sample.
Exceptions
Util::InvalidArgExceptionis thrown if PulseStarts and PulseAmplitudes do not have the same length.

Definition at line 20 of file FunctionGenerator.cpp.

Member Function Documentation

◆ operator=()

FunctionGeneratorDefs::PulsesDescType & DynExpInstr::FunctionGeneratorDefs::PulsesDescType::operator= ( PulsesDescType &&  Other)

Move assignment operator. Reset() is called on Other after the operation.

Parameters
OtherPulsesDescType instance to move from
Returns
Returns a reference to the PulsesDescType instance which has been moved to.

Definition at line 31 of file FunctionGenerator.cpp.

◆ Reset()

void DynExpInstr::FunctionGeneratorDefs::PulsesDescType::Reset ( )
inline

Removes all pulse segments from Pulses.

Definition at line 187 of file FunctionGenerator.h.

Member Data Documentation

◆ Offset

double DynExpInstr::FunctionGeneratorDefs::PulsesDescType::Offset {}

Offset of the function to be added to each sample.

Definition at line 196 of file FunctionGenerator.h.

◆ Pulses

PulsesType DynExpInstr::FunctionGeneratorDefs::PulsesDescType::Pulses

Series of segments forming the pulse sequence. The resulting function stays constant during a segment. Refer to PulsesType.

Definition at line 194 of file FunctionGenerator.h.


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