ResInsight/ApplicationCode/GrpcInterface/GrpcProtos/Case.proto
Gaute Lindkvist a468532d7f
#4457 Python: clean up grpc api, Python client API and make installable python package (#4456)
* gRPC: Make names more consistent

* gRPC: clean up case info and improve Python API for cases

* gRPC: much more object oriented Python interface

* Python: Make a proper pip-installable package

* Update rips Python package to auto generate setup.py with version number

* Python: add setup.py to gitignore

* Python: Update Python RIPS interface

* gRPC: Remove example client from cmake file and unit test

* gRPC: Fix up unit test after merge and hide warnings

* gRPC: fix up python client code
2019-06-03 14:33:16 +02:00

117 lines
1.8 KiB
Protocol Buffer

syntax = "proto3";
package rips;
service Case
{
rpc GetGridCount(CaseRequest) returns(GridCount) {}
rpc GetCellCount(CellInfoRequest) returns (CellCount) {}
rpc GetCellInfoForActiveCells(CellInfoRequest) returns (stream CellInfoArray) {}
rpc GetCoarseningInfoArray(CaseRequest) returns (CoarseningInfoArray) {}
rpc GetTimeSteps(CaseRequest) returns (TimeStepDates) {}
rpc GetTimeStepDaysSinceStart(CaseRequest) returns (DoubleDates) {}
rpc GetCaseInfo(CaseRequest) returns (CaseInfo) {}
}
message CaseRequest {
int32 id = 1;
}
message CaseInfo
{
int32 id = 1;
int32 group_id = 2;
string name = 3;
string type = 4;
}
message CaseInfoArray
{
repeated CaseInfo data = 1;
}
message CaseGroup
{
int32 id = 1;
string name = 2;
}
message CaseGroups
{
repeated CaseGroup case_groups = 1;
}
message GridCount
{
int32 count = 1;
}
message Vec3i {
int32 i = 1;
int32 j = 2;
int32 k = 3;
}
message CellCount
{
int32 active_cell_count = 1;
int32 reservoir_cell_count = 2;
}
enum PorosityModelType
{
MATRIX_MODEL = 0;
FRACTURE_MODEL = 1;
}
message CellInfoRequest
{
CaseRequest case_request = 1;
PorosityModelType porosity_model = 2;
}
message CellInfoArray
{
repeated CellInfo data = 1;
}
message CellInfo
{
int32 grid_index = 1;
int32 parent_grid_index = 2;
int32 coarsening_box_index = 3;
Vec3i local_ijk = 4;
Vec3i parent_ijk = 5;
}
message CoarseningInfoArray
{
repeated CoarseningInfo data = 1;
}
message CoarseningInfo
{
Vec3i min = 1;
Vec3i max = 2;
}
message TimeStepDates
{
repeated TimeStepDate dates = 1;
}
message TimeStepDate
{
int32 year = 1;
int32 month = 2;
int32 day = 3;
int32 hour = 4;
int32 minute = 5;
int32 second = 6;
}
message DoubleDates
{
repeated double date_decimals = 1;
}