DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExp::InstrumentDataBase::InstrumenThreadOnlyType Class Reference

Allow exclusive access to some of InstrumentDataBase's private methods to the instrument thread InstrumentThreadMain(). More...

Private Member Functions

constexpr InstrumenThreadOnlyType (InstrumentDataBase &Parent) noexcept
 Construcs an instance - one for each InstrumentDataBase instance. More...
 
auto & GetNewTaskNotifier () noexcept
 Getter for NewTaskNotifier. More...
 
void SetLastUpdateTime (std::chrono::system_clock::time_point LastUpdate)
 Setter for InstrumentDataBase::LastUpdate. More...
 
void SetException (std::exception_ptr InstrumentException) noexcept
 Setter for InstrumentDataBase::InstrumentException. More...
 

Private Attributes

InstrumentDataBaseParent
 Owning InstrumentDataBase instance. More...
 

Friends

class InstrumentDataBase
 
int InstrumentThreadMain (InstrumentInstance, InstrumentBase *const)
 Instruments run in their own thread. This is the instrument thread's main function. More...
 

Detailed Description

Allow exclusive access to some of InstrumentDataBase's private methods to the instrument thread InstrumentThreadMain().

Definition at line 180 of file Instrument.h.

Constructor & Destructor Documentation

◆ InstrumenThreadOnlyType()

constexpr DynExp::InstrumentDataBase::InstrumenThreadOnlyType::InstrumenThreadOnlyType ( InstrumentDataBase Parent)
inlineconstexprprivatenoexcept

Construcs an instance - one for each InstrumentDataBase instance.

Parameters
ParentOwning InstrumentDataBase instance

Definition at line 189 of file Instrument.h.

Member Function Documentation

◆ GetNewTaskNotifier()

auto& DynExp::InstrumentDataBase::InstrumenThreadOnlyType::GetNewTaskNotifier ( )
inlineprivatenoexcept

Getter for NewTaskNotifier.

Returns
Returns NewTaskNotifier to notify the instrument thread about new tasks.

Definition at line 191 of file Instrument.h.

◆ SetException()

void DynExp::InstrumentDataBase::InstrumenThreadOnlyType::SetException ( std::exception_ptr  InstrumentException)
inlineprivatenoexcept

Setter for InstrumentDataBase::InstrumentException.

Definition at line 193 of file Instrument.h.

◆ SetLastUpdateTime()

void DynExp::InstrumentDataBase::InstrumenThreadOnlyType::SetLastUpdateTime ( std::chrono::system_clock::time_point  LastUpdate)
inlineprivate

Setter for InstrumentDataBase::LastUpdate.

Definition at line 192 of file Instrument.h.

Friends And Related Function Documentation

◆ InstrumentDataBase

friend class InstrumentDataBase
friend

Definition at line 182 of file Instrument.h.

◆ InstrumentThreadMain

int InstrumentThreadMain ( InstrumentInstance  ,
InstrumentBase * const   
)
friend

Instruments run in their own thread. This is the instrument thread's main function.

Parameters
InstanceHandle to the instrument thread's data related to the instrument running this thread. The instrument thread is expected to let the lifetime of Instance expire upon termination.
InstrumentPointer to the instrument running this thread
Returns
Util::DynExpErrorCodes::NoError if the thread terminated without an error, the respective error code otherwise.

Definition at line 8 of file Instrument.cpp.

Member Data Documentation

◆ Parent

InstrumentDataBase& DynExp::InstrumentDataBase::InstrumenThreadOnlyType::Parent
private

Owning InstrumentDataBase instance.

Definition at line 195 of file Instrument.h.


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