DynExp
Highly flexible laboratory automation for dynamically changing experiments.
InterModuleCommunicator.cpp
Go to the documentation of this file.
1 // This file is part of DynExp.
2 
3 #include "stdafx.h"
5 
6 namespace DynExpInstr
7 {
9  {
10  // Initialize derived instrument last.
12  }
13 
15  {
16  // Shut down derived instrument first.
17  ExitFuncImpl(dispatch_tag<ExitTask>(), Instance);
18  }
19 
21  {
22  // Update derived instrument.
23  UpdateFuncImpl(dispatch_tag<UpdateTask>(), Instance);
24  }
25 
27  {
29  }
30 
31  InterModuleCommunicator::InterModuleCommunicator(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType&& Params)
32  : DynExp::InstrumentBase(OwnerThreadID, std::move(Params)), Core(GetParams()->GetCore())
33  {
34  }
35 
37  {
39  }
40 }
Implementation of the inter-module communicator instrument to exchange events in between DynExp modul...
void ResetImpl(dispatch_tag< DynExp::InstrumentDataBase >) override final
Refer to DynExp::InstrumentDataBase::Reset(). Using tag dispatch mechanism to ensure that ResetImpl()...
void ExitFuncImpl(dispatch_tag< DynExp::ExitTaskBase >, DynExp::InstrumentInstance &Instance) override final
Deinitializes the respective instrument within the instrument inheritance hierarchy....
void InitFuncImpl(dispatch_tag< DynExp::InitTaskBase >, DynExp::InstrumentInstance &Instance) override final
Initializes the respective instrument within the instrument inheritance hierarchy....
void UpdateFuncImpl(dispatch_tag< DynExp::UpdateTaskBase >, DynExp::InstrumentInstance &Instance) override final
Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() ...
InterModuleCommunicator(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
Constructs an instrument instance.
void ResetImpl(dispatch_tag< DynExp::InstrumentBase >) override final
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
Refer to DynExp::ParamsBase::dispatch_tag.
Definition: Instrument.h:1151
Refer to DynExp::ParamsBase::dispatch_tag.
Definition: Instrument.h:1120
Refer to ParamsBase::dispatch_tag.
Definition: Instrument.h:146
Defines data for a thread belonging to a InstrumentBase instance. Refer to RunnableInstance.
Definition: Instrument.h:772
Refer to ParamsBase::dispatch_tag.
Definition: Object.h:2018
Refer to DynExp::ParamsBase::dispatch_tag.
Definition: Instrument.h:1182
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
Definition: Instrument.h:1254
DynExp's main namespace contains the implementation of DynExp including classes to manage resources (...
std::unique_ptr< ParamsBase > ParamsBasePtrType
Alias for a pointer to the parameter system base class ParamsBase.
Definition: Object.h:1807
Accumulates include statements to provide a precompiled header.