DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExpInstr::gRPCInstrumentTasks::UpdateTask< BaseInstr,, gRPCStubs > Class Template Reference

Defines a task for updating an instrument within an instrument inheritance hierarchy. Each instrument (indirectly) derived from class InstrumentBase must be accompanied by an update task class derived from UpdateTaskBase. Even if the task does not do anything, at least it has to call UpdateTaskBase::UpdateFuncImpl() of the derived instrument's update task class. More...

+ Inheritance diagram for DynExpInstr::gRPCInstrumentTasks::UpdateTask< BaseInstr,, gRPCStubs >:

Protected Types

template<typename Type >
using dispatch_tag = DynExp::UpdateTaskBase::dispatch_tag< Type >
 Refer to DynExp::ParamsBase::dispatch_tag. More...
 

Private Member Functions

void UpdateFuncImpl (dispatch_tag< typename BaseInstr::UpdateTaskType >, DynExp::InstrumentInstance &Instance) override final
 Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() of a derived instrument's update task as the last command in a base instrument's update task UpdateFuncImpl() to ensure that derived instruments are updated after base instruments. Overriding functions must throw an exception in case of an error. More...
 
virtual void UpdateFuncImpl (dispatch_tag< UpdateTask >, DynExp::InstrumentInstance &Instance)
 Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() of a derived instrument's update task as the last command in a base instrument's update task UpdateFuncImpl() to ensure that derived instruments are updated after base instruments. Overriding functions must throw an exception in case of an error. More...
 

Detailed Description

template<typename BaseInstr, std::enable_if_t< std::is_base_of_v< DynExp::InstrumentBase, BaseInstr >, int >, typename... gRPCStubs>
class DynExpInstr::gRPCInstrumentTasks::UpdateTask< BaseInstr,, gRPCStubs >

Defines a task for updating an instrument within an instrument inheritance hierarchy. Each instrument (indirectly) derived from class InstrumentBase must be accompanied by an update task class derived from UpdateTaskBase. Even if the task does not do anything, at least it has to call UpdateTaskBase::UpdateFuncImpl() of the derived instrument's update task class.

Template Parameters
BaseInstrMeta instrument this class derives from.
enable_if_tInternal check whether BaseInstr is derived from DynExp::InstrumentBase. Pass 0.
...gRPCStubsgRPC stub types which this gRPC client expects from the server to be provided. The order of stub types should match the order of service types in the gRPCServices list of the respective DynExpModule::gRPCModule gRPC server.

Definition at line 113 of file gRPCInstrument.h.

Member Typedef Documentation

◆ dispatch_tag

template<typename BaseInstr , std::enable_if_t< std::is_base_of_v< DynExp::InstrumentBase, BaseInstr >, int > , typename... gRPCStubs>
template<typename Type >
using DynExpInstr::gRPCInstrumentTasks::UpdateTask< BaseInstr,, gRPCStubs >::dispatch_tag = DynExp::UpdateTaskBase::dispatch_tag<Type>
protected

Refer to DynExp::ParamsBase::dispatch_tag.

Template Parameters
Type(derived from DynExp::UpdateTaskBase) to instantiate the dispatch tag template with.

Definition at line 120 of file gRPCInstrument.h.

Member Function Documentation

◆ UpdateFuncImpl() [1/2]

template<typename BaseInstr , std::enable_if_t< std::is_base_of_v< DynExp::InstrumentBase, BaseInstr >, int > , typename... gRPCStubs>
void DynExpInstr::gRPCInstrumentTasks::UpdateTask< BaseInstr,, gRPCStubs >::UpdateFuncImpl ( dispatch_tag< typename BaseInstr::UpdateTaskType >  ,
DynExp::InstrumentInstance Instance 
)
inlinefinaloverrideprivate

Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() of a derived instrument's update task as the last command in a base instrument's update task UpdateFuncImpl() to ensure that derived instruments are updated after base instruments. Overriding functions must throw an exception in case of an error.

Parameters
InstanceHandle to the instrument thread's data

Definition at line 126 of file gRPCInstrument.h.

◆ UpdateFuncImpl() [2/2]

template<typename BaseInstr , std::enable_if_t< std::is_base_of_v< DynExp::InstrumentBase, BaseInstr >, int > , typename... gRPCStubs>
virtual void DynExpInstr::gRPCInstrumentTasks::UpdateTask< BaseInstr,, gRPCStubs >::UpdateFuncImpl ( dispatch_tag< UpdateTask< BaseInstr,, gRPCStubs > >  ,
DynExp::InstrumentInstance Instance 
)
inlineprivatevirtual

Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() of a derived instrument's update task as the last command in a base instrument's update task UpdateFuncImpl() to ensure that derived instruments are updated after base instruments. Overriding functions must throw an exception in case of an error.

Parameters
InstanceHandle to the instrument thread's data

Definition at line 134 of file gRPCInstrument.h.


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