mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4429 Implement return values from the gRPC Command execution
This commit is contained in:
@@ -24,14 +24,10 @@
|
||||
#include <grpcpp/grpcpp.h>
|
||||
#include <vector>
|
||||
|
||||
namespace rips
|
||||
{
|
||||
class Empty;
|
||||
}
|
||||
|
||||
namespace caf
|
||||
{
|
||||
class PdmValueField;
|
||||
class PdmObject;
|
||||
}
|
||||
|
||||
namespace google
|
||||
@@ -48,11 +44,15 @@ class RiaAbstractGrpcCallback;
|
||||
class RiaGrpcCommandService : public rips::Commands::AsyncService, public RiaGrpcServiceInterface
|
||||
{
|
||||
public:
|
||||
grpc::Status Execute(grpc::ServerContext* context, const rips::CommandParams* request, rips::Empty* reply) override;
|
||||
grpc::Status Execute(grpc::ServerContext* context, const rips::CommandParams* request, rips::CommandReply* reply) override;
|
||||
std::vector<RiaAbstractGrpcCallback*> createCallbacks() override;
|
||||
|
||||
private:
|
||||
void assignFieldValue(caf::PdmValueField* pdmValueField,
|
||||
const google::protobuf::Message& params,
|
||||
const google::protobuf::FieldDescriptor* paramDescriptor);
|
||||
void assignPdmFieldValue(caf::PdmValueField* pdmValueField,
|
||||
const google::protobuf::Message& params,
|
||||
const google::protobuf::FieldDescriptor* paramDescriptor);
|
||||
void assignGrpcFieldValue(google::protobuf::Message* reply,
|
||||
const google::protobuf::FieldDescriptor* fieldDescriptor,
|
||||
const caf::PdmValueField* pdmValueField);
|
||||
void assignResultToReply(const caf::PdmObject* result, rips::CommandReply* reply);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user