12#include "../MetaInstruments/DigitalOut.h"
15#include "NetworkDigitalOut.grpc.pb.h"
19 template <
typename... gRPCServices>
20 class NetworkDigitalOutT;
22 template <
typename... gRPCServices>
40 template <
typename... gRPCServices>
47 virtual const char*
GetParamClassTag() const noexcept
override {
return "NetworkDigitalOutParams"; }
56 template <
typename... gRPCServices>
70 template <
typename... gRPCServices>
79 constexpr static auto Name() noexcept {
return "Network Digital Out"; }
85 virtual std::string
GetName()
const override {
return Name(); }
89 :
public gRPCModule<gRPCServices...>::template TypedCallDataBase<CallDataSetAsync, ThisServiceType, DynExpProto::NetworkDigitalOut::SampleMessage, DynExpProto::Common::VoidMessage>
91 using Base =
gRPCModule<gRPCServices...>::template TypedCallDataBase<CallDataSetAsync, ThisServiceType, DynExpProto::NetworkDigitalOut::SampleMessage, DynExpProto::Common::VoidMessage>;
92 using Base::RequestMessage;
96 : Base::TypedCallDataBase(OwningModule, &ThisServiceType::AsyncService::RequestSetAsync) {}
104 ModuleData->GetDigitalOut()->Set(RequestMessage.value());
109 :
public gRPCModule<gRPCServices...>::template TypedCallDataBase<CallDataSetSync, ThisServiceType, DynExpProto::NetworkDigitalOut::SampleMessage, DynExpProto::Common::VoidMessage>
111 using Base =
gRPCModule<gRPCServices...>::template TypedCallDataBase<CallDataSetSync, ThisServiceType, DynExpProto::NetworkDigitalOut::SampleMessage, DynExpProto::Common::VoidMessage>;
112 using Base::RequestMessage;
116 : Base::TypedCallDataBase(OwningModule, &DynExpProto::NetworkDigitalOut::NetworkDigitalOut::AsyncService::RequestSetSync) {}
124 ModuleData->GetDigitalOut()->SetSync(RequestMessage.value());
129 :
public gRPCModule<gRPCServices...>::template TypedCallDataBase<CallDataSetDefault, ThisServiceType, DynExpProto::Common::VoidMessage, DynExpProto::Common::VoidMessage>
131 using Base =
gRPCModule<gRPCServices...>::template TypedCallDataBase<CallDataSetDefault, ThisServiceType, DynExpProto::Common::VoidMessage, DynExpProto::Common::VoidMessage>;
135 : Base::TypedCallDataBase(OwningModule, &DynExpProto::NetworkDigitalOut::NetworkDigitalOut::AsyncService::RequestSetDefault) {}
157 CallDataSetAsync::MakeCall(
this, Instance);
158 CallDataSetSync::MakeCall(
this, Instance);
159 CallDataSetDefault::MakeCall(
this, Instance);
Implementation of a gRPC server module to provide remote access to a data stream instrument meta inst...
Implementation of the data stream meta instrument, which is a base class for all instruments reading/...
Meta instrument for a single digital output port based on the data stream, function generator,...
virtual DynExp::ParamsBasePtrType MakeParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core) const override
Override to make derived classes call DynExp::MakeParams with the correct configurator type derived f...
virtual ~NetworkDigitalOutConfigurator()=default
NetworkDigitalOutConfigurator()=default
virtual void ResetImpl(DynExp::ModuleDataBase::dispatch_tag< NetworkDigitalOutData >)
virtual ~NetworkDigitalOutData()=default
void ResetImpl(DynExp::ModuleDataBase::dispatch_tag< NetworkDataStreamInstrumentData< gRPCServices... > >) override final
virtual ~NetworkDigitalOutParams()=default
virtual void ConfigureParamsImpl(DynExp::ParamsBase::dispatch_tag< NetworkDigitalOutParams >)
DynExp::ParamsBase::DummyParam Dummy
virtual const char * GetParamClassTag() const noexcept override
This function is intended to be overridden once in each derived class returning the name of the respe...
void ConfigureParamsImpl(DynExp::ParamsBase::dispatch_tag< NetworkDataStreamInstrumentParams< gRPCServices... > >) override final
NetworkDigitalOutParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
virtual ~CallDataSetAsync()=default
CallDataSetAsync(const gRPCModule< gRPCServices... > *const OwningModule) noexcept
gRPCModule< gRPCServices... >::template TypedCallDataBase< CallDataSetAsync, ThisServiceType, DynExpProto::NetworkDigitalOut::SampleMessage, DynExpProto::Common::VoidMessage > Base
virtual void ProcessChildImpl(DynExp::ModuleInstance &Instance) override
CallDataSetDefault(const gRPCModule< gRPCServices... > *const OwningModule) noexcept
virtual ~CallDataSetDefault()=default
virtual void ProcessChildImpl(DynExp::ModuleInstance &Instance) override
gRPCModule< gRPCServices... >::template TypedCallDataBase< CallDataSetDefault, ThisServiceType, DynExpProto::Common::VoidMessage, DynExpProto::Common::VoidMessage > Base
virtual void ProcessChildImpl(DynExp::ModuleInstance &Instance) override
CallDataSetSync(const gRPCModule< gRPCServices... > *const OwningModule) noexcept
gRPCModule< gRPCServices... >::template TypedCallDataBase< CallDataSetSync, ThisServiceType, DynExpProto::NetworkDigitalOut::SampleMessage, DynExpProto::Common::VoidMessage > Base
virtual ~CallDataSetSync()=default
virtual void ValidateInstrType(const DynExpInstr::DataStreamInstrument *Instr) const override
DynExpProto::NetworkDigitalOut::NetworkDigitalOut ThisServiceType
virtual ~NetworkDigitalOutT()=default
static constexpr auto Name() noexcept
void CreateInitialCallDataObjectsImpl(DynExp::Object::dispatch_tag< NetworkDataStreamInstrumentT< gRPCServices... > >, DynExp::ModuleInstance &Instance) const override final
virtual void CreateInitialCallDataObjectsImpl(DynExp::Object::dispatch_tag< NetworkDigitalOutT >, DynExp::ModuleInstance &Instance) const
NetworkDigitalOutT(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
void ResetImpl(DynExp::Object::dispatch_tag< NetworkDataStreamInstrumentT< gRPCServices... > >) override final
virtual std::string GetName() const override
Returns the name of this Object type.
virtual void ResetImpl(DynExp::Object::dispatch_tag< NetworkDigitalOutT >)
Module template for building gRPC servers listening on TCP sockets for network instruments to connect...
DynExp's core class acts as the interface between the user interface and DynExp's internal data like ...
const std::unique_ptr< ModuleDataType > ModuleData
Module data belonging to this ModuleBase instance.
Refer to ParamsBase::dispatch_tag.
Defines data for a thread belonging to a ModuleBase instance. Refer to RunnableInstance.
const ModuleBase::ModuleDataGetterType ModuleDataGetter
Getter for module's data. Refer to ModuleBase::ModuleDataGetterType.
const std::thread::id OwnerThreadID
Thread id of the thread which has constructed (and owns) this Object instance.
const ParamsBasePtrType Params
Pointer to the parameter class instance belonging to this Object instance.
Refer to ParamsBase::dispatch_tag.
Dummy parameter which is to be owned once by parameter classes that do not contain any other paramete...
const ItemIDType ID
ID of the Object this parameter class instance belongs to.
const DynExpCore & Core
Reference to DynExp's core.
Tag for function dispatching mechanism within this class used when derived classes are not intended t...
DynExp's module namespace contains the implementation of DynExp modules which extend DynExp's core fu...
std::unique_ptr< ParamsBase > ParamsBasePtrType
Alias for a pointer to the parameter system base class ParamsBase.
size_t ItemIDType
ID type of objects/items managed by DynExp.
Accumulates include statements to provide a precompiled header.