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

Defines data for a thread belonging to a InstrumentBase instance. Refer to RunnableInstance. More...

+ Inheritance diagram for DynExp::InstrumentInstance:

Public Member Functions

 InstrumentInstance (InstrumentBase &Owner, std::promise< void > &&ThreadExitedPromise, const InstrumentBase::InstrumentDataGetterType InstrumentDataGetter)
 Constructs a non-empty RunnableInstance instance. More...
 
 InstrumentInstance (InstrumentInstance &&Other)
 Move-constructs a RunnableInstance instance. Other becomes empty. Not noexcept since LinkedObjectWrapperBase::ListType (std::list) move constructor might throw. More...
 
 ~InstrumentInstance ()=default
 
- Public Member Functions inherited from DynExp::RunnableInstance
const auto & GetOwner () const noexcept
 Returns Owner. More...
 
template<typename ObjectT >
void TryLockObject (const ParamsBase::Param< ObjectLink< ObjectT >> &LinkParam, LinkedObjectWrapperContainer< ObjectT > &ObjectWrapperContainer, std::chrono::milliseconds Timeout=ObjectLinkBase::LockObjectTimeoutDefault)
 Locks an Object instance referenced by a parameter LinkParam of type ParamsBase::Param< ObjectLink< ObjectT > > and makes the LinkedObjectWrapperContainer ObjectWrapperContainer point to the locked resource. More...
 
template<typename ObjectT >
void LockObject (const ParamsBase::Param< ObjectLink< ObjectT >> &LinkParam, LinkedObjectWrapperContainer< ObjectT > &ObjectWrapperContainer, std::chrono::milliseconds Timeout=ObjectLinkBase::LockObjectTimeoutDefault)
 Locks an Object instance referenced by a parameter LinkParam of type ParamsBase::Param< ObjectLink< ObjectT > > and makes the LinkedObjectWrapperContainer ObjectWrapperContainer point to the locked resource. More...
 
template<typename ObjectT >
void UnlockObject (LinkedObjectWrapperContainer< ObjectT > &ObjectWrapperContainer)
 Unlocks an Object instance stored in the LinkedObjectWrapperContainer ObjectWrapperContainer. The LinkedObjectWrapperPointer contained in ObjectWrapperContainer is invalidated (set to nullptr)! More...
 
template<typename ObjectT >
void LockObject (const ParamsBase::ListParam< ObjectLink< ObjectT >> &LinkListParam, LinkedObjectWrapperContainerList< ObjectT > &ObjectWrapperContainerList, std::chrono::milliseconds Timeout=ObjectLinkBase::LockObjectTimeoutDefault)
 Locks Object instances referenced by a list parameter LinkListParam of type ParamsBase::ListParam< ObjectLink< ObjectT > > and creates containers in LinkedObjectWrapperContainerList ObjectWrapperContainerList which point to the locked resources. More...
 
template<typename ObjectT >
void UnlockObject (LinkedObjectWrapperContainerList< ObjectT > &ObjectWrapperContainerList)
 Unlocks Object instances stored in the LinkedObjectWrapperContainerList ObjectWrapperContainerList. More...
 
bool CareAboutWrappers ()
 Unregisters owned LinkedObjectWrapper instances from their destiny resources in case of the respective destiny resource not being in a ready state (e.g. a stopped/error state). Registers again after the respective destiny resource has returned to a ready state. More...
 
std::string GetNotReadyObjectNamesString () const
 Finds all linked Object instances Owner makes use of which are not in a ready state and builds a string identifying all these Object instances. More...
 
- Public Member Functions inherited from Util::INonCopyable
 INonCopyable (const INonCopyable &)=delete
 
INonCopyableoperator= (const INonCopyable &)=delete
 

Public Attributes

const InstrumentBase::InstrumentDataGetterType InstrumentDataGetter
 Getter for instrument's data. Refer to InstrumentBase::InstrumentDataGetterType. More...
 
- Public Attributes inherited from DynExp::RunnableInstance
const Object::ParamsGetterType ParamsGetter
 Invoke to obtain the parameters (derived from ParamsBase) of Owner. More...
 

Additional Inherited Members

- Protected Member Functions inherited from DynExp::RunnableInstance
 RunnableInstance (RunnableObject &Owner, std::promise< void > &&ThreadExitedPromise)
 Constructs a non-empty RunnableInstance instance. More...
 
 RunnableInstance (RunnableInstance &&Other)
 Move-constructs a RunnableInstance instance. Other becomes empty. Not noexcept since LinkedObjectWrapperBase::ListType (std::list) move constructor might throw. More...
 
 ~RunnableInstance ()
 
- Protected Member Functions inherited from Util::INonCopyable
constexpr INonCopyable ()=default
 
 ~INonCopyable ()=default
 

Detailed Description

Defines data for a thread belonging to a InstrumentBase instance. Refer to RunnableInstance.

Definition at line 771 of file Instrument.h.

Constructor & Destructor Documentation

◆ InstrumentInstance() [1/2]

DynExp::InstrumentInstance::InstrumentInstance ( InstrumentBase Owner,
std::promise< void > &&  ThreadExitedPromise,
const InstrumentBase::InstrumentDataGetterType  InstrumentDataGetter 
)

Constructs a non-empty RunnableInstance instance.

Parameters
OwnerRefer to Owner.
ThreadExitedPromiseRefer to ThreadExitedPromise.
InstrumentDataGetterGetter for instrument's data. Refer to InstrumentBase::InstrumentDataGetterType.

Definition at line 430 of file Instrument.cpp.

◆ InstrumentInstance() [2/2]

DynExp::InstrumentInstance::InstrumentInstance ( InstrumentInstance &&  Other)

Move-constructs a RunnableInstance instance. Other becomes empty. Not noexcept since LinkedObjectWrapperBase::ListType (std::list) move constructor might throw.

Parameters
OtherRunnableInstance instance to move from

Definition at line 437 of file Instrument.cpp.

◆ ~InstrumentInstance()

DynExp::InstrumentInstance::~InstrumentInstance ( )
default

Member Data Documentation

◆ InstrumentDataGetter

const InstrumentBase::InstrumentDataGetterType DynExp::InstrumentInstance::InstrumentDataGetter

Getter for instrument's data. Refer to InstrumentBase::InstrumentDataGetterType.

Definition at line 791 of file Instrument.h.


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