DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
Data class for Spectrometer
.
More...
Classes | |
class | SpectrumType |
Type describing a spectrum as acquired by the Spectrometer instrument. More... | |
Public Types | |
enum class | FrequencyUnitType { Hz , nm , Inv_cm } |
Supported spectrometer frequency units. More... | |
enum class | IntensityUnitType { Counts } |
Supported spectrometer intensity units. More... | |
enum class | CapturingStateType { Ready , Warning , Error , Capturing } |
Possible spectrometer states. More... | |
using | TimeType = std::chrono::milliseconds |
Time type describing the spectrometer's times like its exposure time. 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 | |
SpectrometerData ()=default | |
virtual | ~SpectrometerData ()=default |
auto | GetMinExposureTime () const noexcept |
Getter for MinExposureTime. More... | |
void | SetMinExposureTime (double MinExposureTime) noexcept |
Setter for MinExposureTime. More... | |
void | SetMinExposureTime (TimeType MinExposureTime) noexcept |
Setter for MinExposureTime. More... | |
auto | GetMaxExposureTime () const noexcept |
Getter for MaxExposureTime. More... | |
void | SetMaxExposureTime (double MaxExposureTime) noexcept |
Setter for MaxExposureTime. More... | |
void | SetMaxExposureTime (TimeType MaxExposureTime) noexcept |
Setter for MaxExposureTime. More... | |
auto | GetCurrentExposureTime () const noexcept |
Getter for CurrentExposureTime. More... | |
void | SetCurrentExposureTime (double CurrentExposureTime) noexcept |
Setter for CurrentExposureTime. More... | |
void | SetCurrentExposureTime (TimeType CurrentExposureTime) noexcept |
Setter for CurrentExposureTime. More... | |
auto | GetCurrentLowerFrequency () const noexcept |
Getter for CurrentLowerFrequency. More... | |
void | SetCurrentLowerFrequency (double CurrentLowerFrequency) noexcept |
Setter for CurrentLowerFrequency. More... | |
auto | GetCurrentUpperFrequency () const noexcept |
Getter for CurrentUpperFrequency. More... | |
void | SetCurrentUpperFrequency (double CurrentUpperFrequency) noexcept |
Setter for CurrentUpperFrequency. More... | |
auto | GetSilentModeEnabled () const noexcept |
Getter for SilentModeEnabled. More... | |
void | SetSilentModeEnabled (bool Enable) noexcept |
Setter for SilentModeEnabled. More... | |
auto | GetCapturingState () const noexcept |
Returns the spectrometer's current capturing state. More... | |
bool | IsCapturing () const noexcept |
Determines whether the spectrometer is currently acquiring a spectrum. More... | |
auto | GetCapturingProgress () const noexcept |
Determines the progress of a spectrum acquisition. More... | |
bool | HasSpectrum () const noexcept |
Indicates whether the spectrum is empty. More... | |
SpectrumType | GetSpectrum () const |
Moving getter for CurrentSpectrum. More... | |
SpectrumType | GetSpectrumCopy () const |
Copying getter for CurrentSpectrum. This function is more expensive than GetSpectrum() . More... | |
void | SetSpectrum (SpectrumType &&Other) |
Setter for CurrentSpectrum. More... | |
void | ClearSpectrum () const |
Resets CurrentSpectrum by calling SpectrumType::Reset(). 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< TaskBase > | PopTaskFront () |
Removes a task from the front of an instrument's task queue. More... | |
std::unique_ptr< TaskBase > | PopTaskBack () |
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< TaskBase > | PopFinishedTask () |
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 | |
INonCopyable & | operator= (const INonCopyable &)=delete |
Static Public Member Functions | |
static const char * | FrequencyUnitTypeToStr (const FrequencyUnitType &Unit) |
Returns a descriptive string of a respective frequency unit to be e.g. used in plots. More... | |
static const char * | IntensityUnitTypeToStr (const IntensityUnitType &Unit) |
Returns a descriptive string of a respective intensity unit to be e.g. used in plots. More... | |
Private Member Functions | |
void | ResetImpl (dispatch_tag< InstrumentDataBase >) override final |
virtual void | ResetImpl (dispatch_tag< SpectrometerData >) |
Override | |
Refer to DynExp::InstrumentDataBase::Reset(). Using tag dispatch mechanism to ensure that Override by derived classes. | |
virtual CapturingStateType | GetCapturingStateChild () const noexcept=0 |
Returns the spectrometer's current capturing state. More... | |
virtual double | GetCapturingProgressChild () const noexcept |
Determines the progress of a spectrum acquisition. More... | |
Private Attributes | |
TimeType | MinExposureTime |
Minimal exposure time the spectrometer supports. More... | |
TimeType | MaxExposureTime |
Maximal exposure time the spectrometer supports. More... | |
TimeType | CurrentExposureTime |
Current exposure time of the spectrometer. More... | |
double | CurrentLowerFrequency = 0.0 |
Current lower frequency limit where the spectrum acquisition begins. More... | |
double | CurrentUpperFrequency = 0.0 |
Current upper frequency limit where the spectrum acquisition ends. More... | |
bool | SilentModeEnabled = false |
Indicates whether the spectrometer's silent mode is turned on, i.e. the spectrometer's fans are turned off. More... | |
SpectrumType | CurrentSpectrum |
Current spectrum acquired by the spectrometer. Logical const-ness: allow const member function GetSpectrum() to move from CurrentSpectrum and ClearSpectrum() to clear it. More... | |
Additional Inherited Members | |
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 | |
Data class for Spectrometer
.
Definition at line 65 of file Spectrometer.h.
using DynExpInstr::SpectrometerData::TimeType = std::chrono::milliseconds |
Time type describing the spectrometer's times like its exposure time.
Definition at line 71 of file Spectrometer.h.
Possible spectrometer states.
Definition at line 110 of file Spectrometer.h.
|
strong |
Supported spectrometer frequency units.
ConvertFrequencyUnitType()
functions in NetworkSpectrometer.h
and FrequencyUnitType
enumeration in Common.proto
. Enumerator | |
---|---|
Hz | Frequency in Hz. |
nm | Wavelength in nm. |
Inv_cm | Wavenumber in 1/cm. |
Definition at line 78 of file Spectrometer.h.
|
strong |
Supported spectrometer intensity units.
ConvertIntensityUnitType()
functions in NetworkSpectrometer.h
and IntensityUnitType
enumeration in Common.proto
. Enumerator | |
---|---|
Counts | Number of counts (arbitrary unit) |
Definition at line 89 of file Spectrometer.h.
|
default |
|
virtualdefault |
void DynExpInstr::SpectrometerData::ClearSpectrum | ( | ) | const |
Resets CurrentSpectrum by calling SpectrumType::Reset().
Definition at line 74 of file Spectrometer.cpp.
|
static |
Returns a descriptive string of a respective frequency unit to be e.g. used in plots.
Unit | Frequency unit type as used by spectrometer instruments. |
Definition at line 8 of file Spectrometer.cpp.
|
inlinenoexcept |
Determines the progress of a spectrum acquisition.
Definition at line 219 of file Spectrometer.h.
|
inlineprivatevirtualnoexcept |
Determines the progress of a spectrum acquisition.
Definition at line 260 of file Spectrometer.h.
|
inlinenoexcept |
Returns the spectrometer's current capturing state.
Definition at line 205 of file Spectrometer.h.
|
privatepure virtualnoexcept |
Returns the spectrometer's current capturing state.
|
inlinenoexcept |
Getter for CurrentExposureTime.
Definition at line 191 of file Spectrometer.h.
|
inlinenoexcept |
Getter for CurrentLowerFrequency.
Definition at line 194 of file Spectrometer.h.
|
inlinenoexcept |
Getter for CurrentUpperFrequency.
Definition at line 196 of file Spectrometer.h.
|
inlinenoexcept |
Getter for MaxExposureTime.
Definition at line 188 of file Spectrometer.h.
|
inlinenoexcept |
Getter for MinExposureTime.
Definition at line 185 of file Spectrometer.h.
|
inlinenoexcept |
Getter for SilentModeEnabled.
Definition at line 198 of file Spectrometer.h.
SpectrometerData::SpectrumType DynExpInstr::SpectrometerData::GetSpectrum | ( | ) | const |
Moving getter for CurrentSpectrum.
GetSpectrum()
will return an empty spectrum until a new one has been acquired. Definition at line 59 of file Spectrometer.cpp.
SpectrometerData::SpectrumType DynExpInstr::SpectrometerData::GetSpectrumCopy | ( | ) | const |
Copying getter for CurrentSpectrum. This function is more expensive than GetSpectrum()
.
Definition at line 64 of file Spectrometer.cpp.
|
inlinenoexcept |
Indicates whether the spectrum is empty.
Definition at line 224 of file Spectrometer.h.
|
static |
Returns a descriptive string of a respective intensity unit to be e.g. used in plots.
Unit | Intensity unit type as used by spectrometer instruments. |
Definition at line 19 of file Spectrometer.cpp.
|
inlinenoexcept |
Determines whether the spectrometer is currently acquiring a spectrum.
GetCapturingState()
returns CapturingStateType::Capturing, false otherwise. Definition at line 212 of file Spectrometer.h.
|
finaloverrideprivate |
Definition at line 79 of file Spectrometer.cpp.
|
inlineprivatevirtual |
Definition at line 253 of file Spectrometer.h.
|
inlinenoexcept |
Setter for CurrentExposureTime.
Definition at line 192 of file Spectrometer.h.
|
inlinenoexcept |
Setter for CurrentExposureTime.
Definition at line 193 of file Spectrometer.h.
|
inlinenoexcept |
Setter for CurrentLowerFrequency.
Definition at line 195 of file Spectrometer.h.
|
inlinenoexcept |
Setter for CurrentUpperFrequency.
Definition at line 197 of file Spectrometer.h.
|
inlinenoexcept |
Setter for MaxExposureTime.
Definition at line 189 of file Spectrometer.h.
|
inlinenoexcept |
Setter for MaxExposureTime.
Definition at line 190 of file Spectrometer.h.
|
inlinenoexcept |
Setter for MinExposureTime.
Definition at line 186 of file Spectrometer.h.
|
inlinenoexcept |
Setter for MinExposureTime.
Definition at line 187 of file Spectrometer.h.
|
inlinenoexcept |
Setter for SilentModeEnabled.
Definition at line 199 of file Spectrometer.h.
void DynExpInstr::SpectrometerData::SetSpectrum | ( | SpectrumType && | Other | ) |
Setter for CurrentSpectrum.
Other | Spectrum to set CurrentSpectrum to by moving from Other . |
Definition at line 69 of file Spectrometer.cpp.
|
private |
Current exposure time of the spectrometer.
Definition at line 265 of file Spectrometer.h.
|
private |
Current lower frequency limit where the spectrum acquisition begins.
Definition at line 266 of file Spectrometer.h.
|
mutableprivate |
Current spectrum acquired by the spectrometer. Logical const-ness: allow const member function GetSpectrum()
to move from CurrentSpectrum and ClearSpectrum()
to clear it.
Definition at line 275 of file Spectrometer.h.
|
private |
Current upper frequency limit where the spectrum acquisition ends.
Definition at line 267 of file Spectrometer.h.
|
private |
Maximal exposure time the spectrometer supports.
Definition at line 264 of file Spectrometer.h.
|
private |
Minimal exposure time the spectrometer supports.
Definition at line 263 of file Spectrometer.h.
|
private |
Indicates whether the spectrometer's silent mode is turned on, i.e. the spectrometer's fans are turned off.
Definition at line 268 of file Spectrometer.h.