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

Allow exclusive access to some of InstrumentDataBase's private methods to InstrumentBase. More...

Private Member Functions

constexpr InstrumentBaseOnlyType (InstrumentDataBase &Parent) noexcept
 Construcs an instance - one for each InstrumentDataBase instance. More...
 
void Reset ()
 Resets the InstrumentDataBase's instance and calls ResetImpl(dispatch_tag<InstrumentDataBase>) subsequently. More...
 
void EnqueueTask (std::unique_ptr< TaskBase > &&Task, bool CallFromInstrThread, bool NotifyReceiver)
 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, bool CallFromInstrThread, bool NotifyReceiver)
 Enqueues a task at the front of an instrument's task queue and notifies the instrument about the new task. More...
 
void RemoveTaskFromQueue (TaskQueueIteratorType &Task)
 Removes a task from the instrument's task queue and inserts it into the instrument's list of finished tasks if TaskBase::KeepFinishedTask() returns true. More...
 
void RemoveAllTasks ()
 Clears the instrument's task queue. More...
 
void RemoveAllTasksExceptFront ()
 Clears the instrument's task queue but keeps the front task (the task with highest priority which is handled next). More...
 
void CloseQueue ()
 Clsoes the instrument's task queue setting QueueClosed to true. More...
 
auto & GetNewTaskNotifier () noexcept
 Getter for NewTaskNotifier. More...
 

Private Attributes

InstrumentDataBaseParent
 Owning InstrumentDataBase instance. More...
 

Friends

class InstrumentDataBase
 
class InstrumentBase
 

Detailed Description

Allow exclusive access to some of InstrumentDataBase's private methods to InstrumentBase.

Definition at line 152 of file Instrument.h.

Constructor & Destructor Documentation

◆ InstrumentBaseOnlyType()

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

Construcs an instance - one for each InstrumentDataBase instance.

Parameters
ParentOwning InstrumentDataBase instance

Definition at line 161 of file Instrument.h.

Member Function Documentation

◆ CloseQueue()

void DynExp::InstrumentDataBase::InstrumentBaseOnlyType::CloseQueue ( )
inlineprivate

Clsoes the instrument's task queue setting QueueClosed to true.

Definition at line 169 of file Instrument.h.

◆ EnqueuePriorityTask()

void DynExp::InstrumentDataBase::InstrumentBaseOnlyType::EnqueuePriorityTask ( std::unique_ptr< TaskBase > &&  Task,
bool  CallFromInstrThread,
bool  NotifyReceiver 
)
inlineprivate

Enqueues a task at the front of an instrument's task queue and notifies the instrument about the new task.

Parameters
TaskTask to enqueue, the queue takes ownership of the task.
CallFromInstrThreadPass true if the instrument itself enqueues a task. This argument is forwarded to CheckQueueState().
NotifyReceiverDetermines whether the instrument thread is notified that a new task has been enqueued. This is e.g. not desired when enqueuing update tasks in InstrumentBase::UpdateData().

Definition at line 165 of file Instrument.h.

◆ EnqueueTask()

void DynExp::InstrumentDataBase::InstrumentBaseOnlyType::EnqueueTask ( std::unique_ptr< TaskBase > &&  Task,
bool  CallFromInstrThread,
bool  NotifyReceiver 
)
inlineprivate

Enqueues a task at the back of an instrument's task queue and notifies the instrument about the new task.

Parameters
TaskTask to enqueue, the queue takes ownership of the task.
CallFromInstrThreadPass true if the instrument itself enqueues a task. This argument is forwarded to CheckQueueState().
NotifyReceiverDetermines whether the instrument thread is notified that a new task has been enqueued. This is e.g. not desired when enqueuing update tasks in InstrumentBase::UpdateData().

Definition at line 164 of file Instrument.h.

◆ GetNewTaskNotifier()

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

Getter for NewTaskNotifier.

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

Definition at line 171 of file Instrument.h.

◆ RemoveAllTasks()

void DynExp::InstrumentDataBase::InstrumentBaseOnlyType::RemoveAllTasks ( )
inlineprivate

Clears the instrument's task queue.

Definition at line 167 of file Instrument.h.

◆ RemoveAllTasksExceptFront()

void DynExp::InstrumentDataBase::InstrumentBaseOnlyType::RemoveAllTasksExceptFront ( )
inlineprivate

Clears the instrument's task queue but keeps the front task (the task with highest priority which is handled next).

Definition at line 168 of file Instrument.h.

◆ RemoveTaskFromQueue()

void DynExp::InstrumentDataBase::InstrumentBaseOnlyType::RemoveTaskFromQueue ( TaskQueueIteratorType Task)
inlineprivate

Removes a task from the instrument's task queue and inserts it into the instrument's list of finished tasks if TaskBase::KeepFinishedTask() returns true.

Parameters
TaskIterator to an enqueued task.

Definition at line 166 of file Instrument.h.

◆ Reset()

void DynExp::InstrumentDataBase::InstrumentBaseOnlyType::Reset ( )
inlineprivate

Resets the InstrumentDataBase's instance and calls ResetImpl(dispatch_tag<InstrumentDataBase>) subsequently.

Definition at line 163 of file Instrument.h.

Friends And Related Function Documentation

◆ InstrumentBase

friend class InstrumentBase
friend

Definition at line 155 of file Instrument.h.

◆ InstrumentDataBase

friend class InstrumentDataBase
friend

Definition at line 154 of file Instrument.h.

Member Data Documentation

◆ Parent

InstrumentDataBase& DynExp::InstrumentDataBase::InstrumentBaseOnlyType::Parent
private

Owning InstrumentDataBase instance.

Definition at line 173 of file Instrument.h.


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