DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
Meta instrument template for transforming meta instruments into network instruments, which connect to TCP sockets of gRPC servers. Derive from this class to build a network instrument based on a meta instrument. The network instrument connects to a corresponding server implemented with the DynExpModule::gRPCModule gRPC server module. The server controls the physical instrument itself. The respective meta instrument is selected as a template parameter. This class derives from the instrument. It is possible to use DynExp::InstrumentBase as the meta instrument to design network instruments, which allow accessing gRPC services directly. More...
Public Types | |
using | ParamsType = gRPCInstrumentParams< BaseInstr, 0, gRPCStubs... > |
Type of the parameter class belonging to this Object type. Declare this alias in every derived class with the respective parameter class accompanying the derived Object . More... | |
using | ConfigType = gRPCInstrumentConfigurator< BaseInstr, 0, gRPCStubs... > |
Type of the configurator class belonging to this Object type. Declare this alias in every derived class with the respective configurator class accompanying the derived Object . More... | |
using | InstrumentDataType = gRPCInstrumentData< BaseInstr, 0, gRPCStubs... > |
Type of the data class belonging to this InstrumentBase type. Declare this alias in every derived class with the respective data class accompanying the derived InstrumentBase . More... | |
Public Member Functions | |
virtual | ~gRPCInstrument () |
virtual std::string | GetName () const override |
Returns the name of this Object type. More... | |
virtual std::string | GetCategory () const override |
Returns the category of this Object type. More... | |
Static Public Member Functions | |
constexpr static auto | Name () noexcept |
Every derived class has to redefine this function. More... | |
constexpr static auto | Category () noexcept |
Every derived class has to redefine this function. More... | |
Protected Member Functions | |
gRPCInstrument (const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params) | |
Constructs an instrument instance. More... | |
Private Member Functions | |
void | ResetImpl (DynExp::Object::dispatch_tag< BaseInstr >) override final |
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every derived class gets called - starting from DynExp::Object, descending the inheritance hierarchy. More... | |
virtual void | ResetImpl (DynExp::Object::dispatch_tag< gRPCInstrument >) |
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every derived class gets called - starting from DynExp::Object, descending the inheritance hierarchy. More... | |
virtual std::unique_ptr< DynExp::InitTaskBase > | MakeInitTask () const override |
Factory function for an init task (InitTaskBase ). Override to define the desired initialization task in derived classes only if the respective task really does something and if it has no pure virtual function. More... | |
virtual std::unique_ptr< DynExp::ExitTaskBase > | MakeExitTask () const override |
Factory function for an exit task (ExitTaskBase ). Override to define the desired deinitialization task in derived classes only if the respective task really does something and if it has no pure virtual function. More... | |
virtual std::unique_ptr< DynExp::UpdateTaskBase > | MakeUpdateTask () const override |
Factory function for an update task (UpdateTaskBase ). Override to define the desired update task in derived classes only if the respective task really does something and if it has no pure virtual function. More... | |
Meta instrument template for transforming meta instruments into network instruments, which connect to TCP sockets of gRPC servers. Derive from this class to build a network instrument based on a meta instrument. The network instrument connects to a corresponding server implemented with the DynExpModule::gRPCModule gRPC server module. The server controls the physical instrument itself. The respective meta instrument is selected as a template parameter. This class derives from the instrument. It is possible to use DynExp::InstrumentBase as the meta instrument to design network instruments, which allow accessing gRPC services directly.
BaseInstr | Meta instrument this class derives from. |
enable_if_t | Internal check whether BaseInstr is derived from DynExp::InstrumentBase. Pass 0. |
...gRPCStubs | gRPC 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 292 of file gRPCInstrument.h.
using DynExpInstr::gRPCInstrument< BaseInstr,, gRPCStubs >::ConfigType = gRPCInstrumentConfigurator<BaseInstr, 0, gRPCStubs...> |
Type of the configurator class belonging to this Object
type. Declare this alias in every derived class with the respective configurator class accompanying the derived Object
.
Definition at line 296 of file gRPCInstrument.h.
using DynExpInstr::gRPCInstrument< BaseInstr,, gRPCStubs >::InstrumentDataType = gRPCInstrumentData<BaseInstr, 0, gRPCStubs...> |
Type of the data class belonging to this InstrumentBase
type. Declare this alias in every derived class with the respective data class accompanying the derived InstrumentBase
.
Definition at line 297 of file gRPCInstrument.h.
using DynExpInstr::gRPCInstrument< BaseInstr,, gRPCStubs >::ParamsType = gRPCInstrumentParams<BaseInstr, 0, gRPCStubs...> |
Type of the parameter class belonging to this Object
type. Declare this alias in every derived class with the respective parameter class accompanying the derived Object
.
Definition at line 295 of file gRPCInstrument.h.
|
inlineprotected |
Constructs an instrument instance.
OwnerThreadID | Thread id of the thread owning the Object instance to be constructed. |
Params | Parameter class instance to be assigned to the Object instance to be constructed. |
Util::InvalidArgException | is thrown if OwnerThreadID is an invalid thread id or if Params is nullptr. |
Util::InvalidArgException | is thrown if InstrumentParamsBase::InstrumentData of Params is nullptr. |
Definition at line 306 of file gRPCInstrument.h.
|
inlinevirtual |
Definition at line 310 of file gRPCInstrument.h.
|
inlinestaticconstexprnoexcept |
Every derived class has to redefine this function.
Definition at line 300 of file gRPCInstrument.h.
|
inlineoverridevirtual |
Returns the category of this Object
type.
Definition at line 313 of file gRPCInstrument.h.
|
inlineoverridevirtual |
Returns the name of this Object
type.
Reimplemented in DynExpInstr::WidefieldLocalization, DynExpInstr::NetworkTimeTaggerT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkSpectrometer, DynExpInstr::NetworkDigitalOutT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDigitalInT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDataStreamInstrumentT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDataStreamInstrumentT< DataStreamInstrument, 0, DynExpProto::NetworkDataStreamInstrument::NetworkDataStreamInstrument >, DynExpInstr::NetworkDataStreamInstrumentT< BaseInstr, 0, gRPCStubs... >, DynExpInstr::NetworkAnalogOutT< BaseInstr,, gRPCStubs >, and DynExpInstr::NetworkAnalogInT< BaseInstr,, gRPCStubs >.
Definition at line 312 of file gRPCInstrument.h.
|
inlineoverrideprivatevirtual |
Factory function for an exit task (ExitTaskBase
). Override to define the desired deinitialization task in derived classes only if the respective task really does something and if it has no pure virtual function.
MakeTask()
. Reimplemented in DynExpInstr::WidefieldLocalization, DynExpInstr::NetworkTimeTaggerT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkSpectrometer, DynExpInstr::NetworkDigitalOutT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDigitalInT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDataStreamInstrumentT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDataStreamInstrumentT< DataStreamInstrument, 0, DynExpProto::NetworkDataStreamInstrument::NetworkDataStreamInstrument >, DynExpInstr::NetworkDataStreamInstrumentT< BaseInstr, 0, gRPCStubs... >, DynExpInstr::NetworkAnalogOutT< BaseInstr,, gRPCStubs >, and DynExpInstr::NetworkAnalogInT< BaseInstr,, gRPCStubs >.
Definition at line 334 of file gRPCInstrument.h.
|
inlineoverrideprivatevirtual |
Factory function for an init task (InitTaskBase
). Override to define the desired initialization task in derived classes only if the respective task really does something and if it has no pure virtual function.
MakeTask()
. Reimplemented in DynExpInstr::WidefieldLocalization, DynExpInstr::NetworkTimeTaggerT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkSpectrometer, DynExpInstr::NetworkDigitalOutT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDigitalInT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDataStreamInstrumentT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDataStreamInstrumentT< DataStreamInstrument, 0, DynExpProto::NetworkDataStreamInstrument::NetworkDataStreamInstrument >, DynExpInstr::NetworkDataStreamInstrumentT< BaseInstr, 0, gRPCStubs... >, DynExpInstr::NetworkAnalogOutT< BaseInstr,, gRPCStubs >, and DynExpInstr::NetworkAnalogInT< BaseInstr,, gRPCStubs >.
Definition at line 329 of file gRPCInstrument.h.
|
inlineoverrideprivatevirtual |
Factory function for an update task (UpdateTaskBase
). Override to define the desired update task in derived classes only if the respective task really does something and if it has no pure virtual function.
MakeTask()
. Reimplemented in DynExpInstr::WidefieldLocalization, DynExpInstr::NetworkTimeTaggerT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkSpectrometer, DynExpInstr::NetworkDigitalOutT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDigitalInT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDataStreamInstrumentT< BaseInstr,, gRPCStubs >, DynExpInstr::NetworkDataStreamInstrumentT< DataStreamInstrument, 0, DynExpProto::NetworkDataStreamInstrument::NetworkDataStreamInstrument >, DynExpInstr::NetworkDataStreamInstrumentT< BaseInstr, 0, gRPCStubs... >, DynExpInstr::NetworkAnalogOutT< BaseInstr,, gRPCStubs >, and DynExpInstr::NetworkAnalogInT< BaseInstr,, gRPCStubs >.
Definition at line 339 of file gRPCInstrument.h.
|
inlinestaticconstexprnoexcept |
Every derived class has to redefine this function.
Definition at line 299 of file gRPCInstrument.h.
|
inlinefinaloverrideprivate |
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl()
of every derived class gets called - starting from DynExp::Object, descending the inheritance hierarchy.
Definition at line 319 of file gRPCInstrument.h.
|
inlineprivatevirtual |
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl()
of every derived class gets called - starting from DynExp::Object, descending the inheritance hierarchy.
Reimplemented in DynExpInstr::WidefieldLocalization.
Definition at line 324 of file gRPCInstrument.h.