mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
gRPC: Add SetGridProperties.py example
This commit is contained in:
parent
7c475e72e4
commit
9ac15ec553
@ -288,6 +288,17 @@ grpc::Status RiaGrpcPropertiesService::SetActiveCellResults(grpc::ServerContext*
|
||||
return stateHandler->receiveStreamRequest(request);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
grpc::Status RiaGrpcPropertiesService::SetGridResults(grpc::ServerContext* context,
|
||||
const rips::ResultRequestChunk* request,
|
||||
rips::Empty* reply,
|
||||
RiaGridCellResultsStateHandler* stateHandler)
|
||||
{
|
||||
return stateHandler->receiveStreamRequest(request);
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -302,9 +313,12 @@ std::vector<RiaAbstractGrpcCallback*> RiaGrpcPropertiesService::createCallbacks(
|
||||
new RiaGrpcStreamCallback<Self, ResultRequest, ResultArray, RiaGridCellResultsStateHandler>(
|
||||
this, &Self::GetGridResults, &Self::RequestGetGridResults, new RiaGridCellResultsStateHandler),
|
||||
new RiaGrpcClientStreamCallback<Self, ResultRequestChunk, Empty, RiaActiveCellResultsStateHandler>(
|
||||
this, &Self::SetActiveCellResults, &Self::RequestSetActiveCellResults, new RiaActiveCellResultsStateHandler)
|
||||
this, &Self::SetActiveCellResults, &Self::RequestSetActiveCellResults, new RiaActiveCellResultsStateHandler),
|
||||
new RiaGrpcClientStreamCallback<Self, ResultRequestChunk, Empty, RiaGridCellResultsStateHandler>(
|
||||
this, &Self::SetGridResults, &Self::RequestSetGridResults, new RiaGridCellResultsStateHandler)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
static bool RiaGrpcPropertiesService_init =
|
||||
RiaGrpcServiceFactory::instance()->registerCreator<RiaGrpcPropertiesService>(typeid(RiaGrpcPropertiesService).hash_code());
|
@ -34,21 +34,25 @@ class RiaGridCellResultsStateHandler;
|
||||
class RiaGrpcPropertiesService final : public rips::Properties::AsyncService, public RiaGrpcServiceInterface
|
||||
{
|
||||
public:
|
||||
grpc::Status GetAvailableProperties(grpc::ServerContext* context,
|
||||
grpc::Status GetAvailableProperties(grpc::ServerContext* context,
|
||||
const rips::PropertiesRequest* request,
|
||||
rips::AvailableProperties* reply) override;
|
||||
rips::AvailableProperties* reply) override;
|
||||
grpc::Status GetActiveCellResults(grpc::ServerContext* context,
|
||||
const rips::ResultRequest* request,
|
||||
rips::ResultArray* reply,
|
||||
rips::ResultArray* reply,
|
||||
RiaActiveCellResultsStateHandler* stateHandler);
|
||||
grpc::Status GetGridResults(grpc::ServerContext* context,
|
||||
const rips::ResultRequest* request,
|
||||
rips::ResultArray* reply,
|
||||
rips::ResultArray* reply,
|
||||
RiaGridCellResultsStateHandler* stateHandler);
|
||||
grpc::Status SetActiveCellResults(grpc::ServerContext* context,
|
||||
const rips::ResultRequestChunk* request,
|
||||
rips::Empty* reply,
|
||||
RiaActiveCellResultsStateHandler* stateHandler);
|
||||
grpc::Status SetGridResults(grpc::ServerContext* context,
|
||||
const rips::ResultRequestChunk* request,
|
||||
rips::Empty* reply,
|
||||
RiaGridCellResultsStateHandler* stateHandler);
|
||||
|
||||
std::vector<RiaAbstractGrpcCallback*> createCallbacks() override;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user