32 :
DynExp::InstrumentBase(OwnerThreadID, std::move(Params)), Core(GetParams()->GetCore())
41 for (
auto ID : UserIDs)
44 if (Caller.
GetID() == ID)
47 auto Resource = ModuleMgr.GetResource(ID);
50 for (
int NumTries = 0;
true; NumTries++)
54 if (Resource->IsReady())
57 Resource->EnqueueEvent(InterModuleEvent.
Clone(
GetID()));
66 std::this_thread::yield();
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() ...
void PostEvent(const DynExp::ModuleBase &Caller, const DynExp::InterModuleEventBase &InterModuleEvent) const
Inserts the event passed to the function into the event queues of the modules making use of this Inte...
const DynExp::DynExpCore & Core
Reference to DynExp's core.
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...
auto & GetModuleManager() noexcept
Getter for the module manager.
Refer to DynExp::ParamsBase::dispatch_tag.
Refer to DynExp::ParamsBase::dispatch_tag.
Refer to ParamsBase::dispatch_tag.
Defines data for a thread belonging to a InstrumentBase instance. Refer to RunnableInstance.
Common base class for all inter-module events.
virtual InterModuleEventPtrType Clone(ItemIDType CommunicatorID) const =0
Creates a deep copy of this inter-module instance.
Base class for modules. Modules implement programs on their own (e.g. measurement protocols or server...
auto GetUserIDs(const std::chrono::milliseconds Timeout=Util::ILockable::DefaultTimeout) const
Returns a list of the IDs of the registered users in a thread-safe way.
ItemIDType GetID() const noexcept
Returns the ID of this Object instance. Thread-safe since ID is const.
Refer to ParamsBase::dispatch_tag.
Refer to DynExp::ParamsBase::dispatch_tag.
Thrown when an operation timed out before it could be completed, especially used for locking shared d...
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
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.
Accumulates include statements to provide a precompiled header.