DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Loading...
Searching...
No Matches
DynExpInstr::LaserData Class Referenceabstract

Data class for Laser. More...

#include <Laser.h>

+ Inheritance diagram for DynExpInstr::LaserData:

Public Types

enum class  LaserStateType {
  Startup , Ready , EmissionEnabledConstant , EmissionEnabledScanning ,
  Error
}
 Possible laser states. 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.
 
using TaskQueueIteratorType = TaskQueueType::const_iterator
 Const iterator type to elements of TaskQueueType.
 

Public Member Functions

 LaserData ()=default
 
virtual ~LaserData ()=default
 
void SetFrequencyValue (double Frequency) noexcept
 Setter for Frequency.
 
auto GetFrequencyValue () const noexcept
 Getter for Frequency.
 
void SetIntensityValue (double Intensity) noexcept
 Setter for Intensity.
 
auto GetIntensityValue () const noexcept
 Getter for Intensity.
 
void SetScanRangeValue (double ScanRange) noexcept
 Setter for ScanRange.
 
auto GetScanRangeValue () const noexcept
 Getter for ScanRange.
 
void SetScanRateValue (double ScanRate) noexcept
 Setter for ScanRate.
 
auto GetScanRateValue () const noexcept
 Getter for ScanRate.
 
auto GetLaserState () const noexcept
 Returns the laser's current state.
 
- Public Member Functions inherited from DynExp::InstrumentDataBase
 InstrumentDataBase ()
 
virtual ~InstrumentDataBase ()
 
auto GetLastUpdateTime () const
 Getter for LastUpdate.
 
bool IsExceptionIndicated () const noexcept
 Getter for HasException. Only performs atomic operations. Hence, this instrument data instance does not need to be locked for this function call.
 
std::exception_ptr GetException () const noexcept
 Getter for InstrumentDataBase::InstrumentException. If InstrumentDataBase::InstrumentException is nullptr and InstrumentDataBase::HasException is still true, returns a pointer to a Util::Exception instance.
 
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.
 
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.
 
std::unique_ptr< TaskBasePopTaskFront ()
 Removes a task from the front of an instrument's task queue.
 
std::unique_ptr< TaskBasePopTaskBack ()
 Removes a task from the back of an instrument's task queue.
 
auto GetTaskFront () noexcept
 Getter for first enqueued task.
 
auto GetTaskBack () noexcept
 Getter for last enqueued task.
 
size_t GetNumEnqueuedTasks () const noexcept
 Getter for the instrument task queue's length.
 
std::unique_ptr< TaskBasePopFinishedTask ()
 Removes a task from the front of an instrument's list of finished tasks.
 
size_t GetNumFinishedTasks () const noexcept
 Getter for the length of the instrument's list of finished tasks.
 
bool IsQueueClosed () const noexcept
 Determines whether the instrument task queue is closed.
 
- Public Member Functions inherited from Util::INonCopyable
 INonCopyable (const INonCopyable &)=delete
 
INonCopyableoperator= (const INonCopyable &)=delete
 

Private Member Functions

void ResetImpl (dispatch_tag< InstrumentDataBase >) override final
 
virtual void ResetImpl (dispatch_tag< LaserData >)
 
Override

Refer to DynExp::InstrumentDataBase::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every derived class gets called - starting from InstrumentDataBase, descending the inheritance hierarchy. Override in order to reset derived classes.

Override by derived classes.

virtual LaserStateType GetLaserStateChild () const noexcept=0
 Returns the laser's current state.
 

Private Attributes

double Frequency = 0.0
 Current frequency.
 
double Intensity = 0.0
 Current intensity.
 
double ScanRange = 0.0
 Current scan range.
 
double ScanRate = 0.0
 Current scan rate.
 

Additional Inherited Members

- Public Attributes inherited from DynExp::InstrumentDataBase
InstrumentBaseOnlyType InstrumentBaseOnly
 Allow exclusive access to some of InstrumentDataBase's private methods to InstrumentBase.
 
InstrumenThreadOnlyType InstrumentThreadOnly
 Allow exclusive access to some of InstrumentDataBase's private methods to the instrument thread InstrumentThreadMain().
 
- Protected Member Functions inherited from Util::ISynchronizedPointerLockable
 ISynchronizedPointerLockable ()
 
 ~ISynchronizedPointerLockable ()
 Object should never be destroyed before completely unlocked.
 
- Protected Member Functions inherited from Util::INonCopyable
constexpr INonCopyable ()=default
 
 ~INonCopyable ()=default
 

Detailed Description

Data class for Laser.

Definition at line 65 of file Laser.h.

Member Enumeration Documentation

◆ LaserStateType

Possible laser states.

Enumerator
Startup 

The laser is warming up.

Ready 

The laser is ready for emission.

EmissionEnabledConstant 

The laser is emitting in constant mode.

EmissionEnabledScanning 

The laser is emitting in scan mode.

Error 

The laser is in an error state.

Definition at line 71 of file Laser.h.

Constructor & Destructor Documentation

◆ LaserData()

DynExpInstr::LaserData::LaserData ( )
default

◆ ~LaserData()

virtual DynExpInstr::LaserData::~LaserData ( )
virtualdefault

Member Function Documentation

◆ GetFrequencyValue()

auto DynExpInstr::LaserData::GetFrequencyValue ( ) const
inlinenoexcept

Getter for Frequency.

Definition at line 83 of file Laser.h.

◆ GetIntensityValue()

auto DynExpInstr::LaserData::GetIntensityValue ( ) const
inlinenoexcept

Getter for Intensity.

Definition at line 85 of file Laser.h.

◆ GetLaserState()

auto DynExpInstr::LaserData::GetLaserState ( ) const
inlinenoexcept

Returns the laser's current state.

Returns
Laser state of type LaserData::StateType

Definition at line 95 of file Laser.h.

◆ GetLaserStateChild()

virtual LaserStateType DynExpInstr::LaserData::GetLaserStateChild ( ) const
privatepure virtualnoexcept

Returns the laser's current state.

Returns
Laser state of type LaserData::StateType

◆ GetScanRangeValue()

auto DynExpInstr::LaserData::GetScanRangeValue ( ) const
inlinenoexcept

Getter for ScanRange.

Definition at line 87 of file Laser.h.

◆ GetScanRateValue()

auto DynExpInstr::LaserData::GetScanRateValue ( ) const
inlinenoexcept

Getter for ScanRate.

Definition at line 89 of file Laser.h.

◆ ResetImpl() [1/2]

void DynExpInstr::LaserData::ResetImpl ( dispatch_tag< InstrumentDataBase )
finaloverrideprivate

Definition at line 8 of file Laser.cpp.

◆ ResetImpl() [2/2]

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

Definition at line 99 of file Laser.h.

◆ SetFrequencyValue()

void DynExpInstr::LaserData::SetFrequencyValue ( double  Frequency)
inlinenoexcept

Setter for Frequency.

Definition at line 82 of file Laser.h.

◆ SetIntensityValue()

void DynExpInstr::LaserData::SetIntensityValue ( double  Intensity)
inlinenoexcept

Setter for Intensity.

Definition at line 84 of file Laser.h.

◆ SetScanRangeValue()

void DynExpInstr::LaserData::SetScanRangeValue ( double  ScanRange)
inlinenoexcept

Setter for ScanRange.

Definition at line 86 of file Laser.h.

◆ SetScanRateValue()

void DynExpInstr::LaserData::SetScanRateValue ( double  ScanRate)
inlinenoexcept

Setter for ScanRate.

Definition at line 88 of file Laser.h.

Member Data Documentation

◆ Frequency

double DynExpInstr::LaserData::Frequency = 0.0
private

Current frequency.

Definition at line 108 of file Laser.h.

◆ Intensity

double DynExpInstr::LaserData::Intensity = 0.0
private

Current intensity.

Definition at line 109 of file Laser.h.

◆ ScanRange

double DynExpInstr::LaserData::ScanRange = 0.0
private

Current scan range.

Definition at line 110 of file Laser.h.

◆ ScanRate

double DynExpInstr::LaserData::ScanRate = 0.0
private

Current scan rate.

Definition at line 111 of file Laser.h.


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