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

Parameter class for gRPCInstrument. More...

+ Inheritance diagram for DynExpInstr::gRPCInstrumentParams< BaseInstr,, gRPCStubs >:

Public Member Functions

 gRPCInstrumentParams (DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
 Constructs the parameters for a gRPCInstrument instance. More...
 
virtual ~gRPCInstrumentParams ()=default
 
virtual const char * GetParamClassTag () const noexcept override
 This function is intended to be overridden once in each derived class returning the name of the respective class. Parameters defined in any class within the ParamsBase hierarchy will receive a 'this' pointer pointing to ParamsBase when their ParamBase constructors are called. The ParamBase constructors will register the respective parameter in ParamsBase::OwnedParams calling GetParamClassTag() on the given 'this' pointer. This allows the ParamBase constructor to obtain the name of the class where the respective parameter was declared in. The name is used as an XML tag containing related parameters in the project files. Here, it is fully intended that the virtual call to GetParamClassTag() leads only to a call of GetParamClassTag() of the current dynamic type of ParamsBase! More...
 

Public Attributes

DynExp::NetworkParamsExtension NetworkParams
 Network address of the gRPC server to connect to. More...
 

Private Member Functions

void ConfigureParamsImpl (DynExp::InstrumentParamsBase::dispatch_tag< typename BaseInstr::ParamsType >) override final
 Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag. More...
 
virtual void ConfigureParamsImpl (DynExp::InstrumentParamsBase::dispatch_tag< gRPCInstrumentParams >)
 Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag. More...
 
virtual const DynExp::NetworkParamsExtensionGetNetworkAddressParamsChild () const noexcept override
 Returns the network address parameters of a derived gRPC instrument. Override GetNetworkAddressParamsChild() in order to adjust. More...
 

Detailed Description

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

Parameter class for gRPCInstrument.

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 217 of file gRPCInstrument.h.

Constructor & Destructor Documentation

◆ gRPCInstrumentParams()

template<typename BaseInstr , typename std::enable_if_t< std::is_base_of_v< DynExp::InstrumentBase, BaseInstr >, int > , typename... gRPCStubs>
DynExpInstr::gRPCInstrumentParams< BaseInstr,, gRPCStubs >::gRPCInstrumentParams ( DynExp::ItemIDType  ID,
const DynExp::DynExpCore Core 
)
inline

Constructs the parameters for a gRPCInstrument instance.

Parameters
IDID of the Object this parameter class instance belongs to
CoreReference to DynExp's core

Definition at line 224 of file gRPCInstrument.h.

◆ ~gRPCInstrumentParams()

template<typename BaseInstr , typename std::enable_if_t< std::is_base_of_v< DynExp::InstrumentBase, BaseInstr >, int > , typename... gRPCStubs>
virtual DynExpInstr::gRPCInstrumentParams< BaseInstr,, gRPCStubs >::~gRPCInstrumentParams ( )
virtualdefault

Member Function Documentation

◆ ConfigureParamsImpl() [1/2]

template<typename BaseInstr , typename std::enable_if_t< std::is_base_of_v< DynExp::InstrumentBase, BaseInstr >, int > , typename... gRPCStubs>
virtual void DynExpInstr::gRPCInstrumentParams< BaseInstr,, gRPCStubs >::ConfigureParamsImpl ( DynExp::InstrumentParamsBase::dispatch_tag< gRPCInstrumentParams< BaseInstr,, gRPCStubs > >  )
inlineprivatevirtual

Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag.

Definition at line 248 of file gRPCInstrument.h.

◆ ConfigureParamsImpl() [2/2]

template<typename BaseInstr , typename std::enable_if_t< std::is_base_of_v< DynExp::InstrumentBase, BaseInstr >, int > , typename... gRPCStubs>
void DynExpInstr::gRPCInstrumentParams< BaseInstr,, gRPCStubs >::ConfigureParamsImpl ( DynExp::InstrumentParamsBase::dispatch_tag< typename BaseInstr::ParamsType >  )
inlinefinaloverrideprivate

Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag.

Definition at line 240 of file gRPCInstrument.h.

◆ GetNetworkAddressParamsChild()

template<typename BaseInstr , typename std::enable_if_t< std::is_base_of_v< DynExp::InstrumentBase, BaseInstr >, int > , typename... gRPCStubs>
virtual const DynExp::NetworkParamsExtension* DynExpInstr::gRPCInstrumentParams< BaseInstr,, gRPCStubs >::GetNetworkAddressParamsChild ( ) const
inlineoverrideprivatevirtualnoexcept

Returns the network address parameters of a derived gRPC instrument. Override GetNetworkAddressParamsChild() in order to adjust.

Returns
Pointer to parameters describing a network address and a network port. nullptr if not applicable (if the derived object is neither a gRPC server nor a gRPC client).

Definition at line 253 of file gRPCInstrument.h.

◆ GetParamClassTag()

template<typename BaseInstr , typename std::enable_if_t< std::is_base_of_v< DynExp::InstrumentBase, BaseInstr >, int > , typename... gRPCStubs>
virtual const char* DynExpInstr::gRPCInstrumentParams< BaseInstr,, gRPCStubs >::GetParamClassTag ( ) const
inlineoverridevirtualnoexcept

This function is intended to be overridden once in each derived class returning the name of the respective class. Parameters defined in any class within the ParamsBase hierarchy will receive a 'this' pointer pointing to ParamsBase when their ParamBase constructors are called. The ParamBase constructors will register the respective parameter in ParamsBase::OwnedParams calling GetParamClassTag() on the given 'this' pointer. This allows the ParamBase constructor to obtain the name of the class where the respective parameter was declared in. The name is used as an XML tag containing related parameters in the project files. Here, it is fully intended that the virtual call to GetParamClassTag() leads only to a call of GetParamClassTag() of the current dynamic type of ParamsBase!

Returns
Name of the class this function is defined in

Reimplemented in DynExpInstr::WidefieldLocalizationParams, DynExpInstr::NetworkTimeTaggerParams< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkSpectrometerParams, DynExpInstr::NetworkDigitalOutParams< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDigitalInParams< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDataStreamInstrumentParams< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDataStreamInstrumentParams< BaseInstr, 0, gRPCStubs... >, DynExpInstr::NetworkAnalogOutParams< BaseInstr,, gRPCStubs >, and DynExpInstr::NetworkAnalogInParams< BaseInstr,, gRPCStubs >.

Definition at line 232 of file gRPCInstrument.h.

Member Data Documentation

◆ NetworkParams

template<typename BaseInstr , typename std::enable_if_t< std::is_base_of_v< DynExp::InstrumentBase, BaseInstr >, int > , typename... gRPCStubs>
DynExp::NetworkParamsExtension DynExpInstr::gRPCInstrumentParams< BaseInstr,, gRPCStubs >::NetworkParams

Network address of the gRPC server to connect to.

Definition at line 234 of file gRPCInstrument.h.


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