Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 22 additions & 14 deletions protos/ansys/api/fluent/v0/datamodel_se.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,27 @@ package grpcRemoting;
import "variant.proto";

service DataModel {
rpc BeginStreaming(DataModelRequest) returns (stream DataModelResponse) {}
rpc BeginStreaming(DataModelRequest) returns (stream DataModelResponse) {
}

rpc initDatamodel(InitDatamodelRequest) returns (InitDatamodelResponse) {}
rpc getState(GetStateRequest) returns (GetStateResponse) {}
rpc setState(SetStateRequest) returns (SetStateResponse) {}
rpc updateDict(UpdateDictRequest) returns (UpdateDictResponse) {}
rpc deleteObject(DeleteObjectRequest) returns (DeleteObjectResponse) {}
rpc getAttributeValue(GetAttributeValueRequest) returns (GetAttributeValueResponse) {}
rpc executeCommand(ExecuteCommandRequest) returns (ExecuteCommandResponse) {}
rpc getSpecs(GetSpecsRequest) returns (GetSpecsResponse) {}
rpc getStaticInfo(GetStaticInfoRequest) returns (GetStaticInfoResponse) {}
rpc initDatamodel(InitDatamodelRequest) returns (InitDatamodelResponse) {
Copy link
Collaborator

@dnwillia-work dnwillia-work Apr 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is a bit annoying isn't it? I wonder if AllowShortBlocksOnASingleLine: Empty would help here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange though, when I format the files it does not do that. Here's my commands:

D:\ANSYSDev\NoBackup\pyansys\pyfluent\protos\ansys\api\fluent\v0>clang-format -style=file datamodel_se.proto > output.txt
D:\ANSYSDev\NoBackup\pyansys\pyfluent\protos\ansys\api\fluent\v0>move /y output.txt datamodel_se.proto
        1 file(s) moved.
D:\ANSYSDev\NoBackup\pyansys\pyfluent\protos\ansys\api\fluent\v0>clang-format -version
clang-format version 13.0.0 (https://github.com/llvm/llvm-project d7b669b3a30345cfcdb2fde2af6f48aa4b94845d)

Diffs on this proto look like this:
image

Copy link
Collaborator

@dnwillia-work dnwillia-work Apr 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the extra option in #310 and moved the options file up one level in case we use it for other things.

}
rpc getState(GetStateRequest) returns (GetStateResponse) {
}
rpc setState(SetStateRequest) returns (SetStateResponse) {
}
rpc updateDict(UpdateDictRequest) returns (UpdateDictResponse) {
}
rpc deleteObject(DeleteObjectRequest) returns (DeleteObjectResponse) {
}
rpc getAttributeValue(GetAttributeValueRequest) returns (GetAttributeValueResponse) {
}
rpc executeCommand(ExecuteCommandRequest) returns (ExecuteCommandResponse) {
}
rpc getSpecs(GetSpecsRequest) returns (GetSpecsResponse) {
}
rpc getStaticInfo(GetStaticInfoRequest) returns (GetStaticInfoResponse) {
}
}

message DataModelRequest {
Expand Down Expand Up @@ -64,16 +74,14 @@ message SetStateResponse {
repeated string deletedpaths = 2;
}

message UpdateDictRequest
{
message UpdateDictRequest {
string rules = 1;
string path = 2;
utils.Variant dicttomerge = 3;
bool wait = 4;
}

message UpdateDictResponse
{
message UpdateDictResponse {
utils.Variant state = 1;
repeated string deletedpaths = 2;
}
Expand Down
13 changes: 7 additions & 6 deletions protos/ansys/api/fluent/v0/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ syntax = "proto3";
package grpcRemoting;
service Events {
rpc BeginStreaming(BeginStreamingRequest)
returns (stream BeginStreamingResponse) {}
returns (stream BeginStreamingResponse) {
}
}

message BeginStreamingRequest {
Expand All @@ -17,15 +18,15 @@ message BeginStreamingRequest {
* Event at end of the time step.
*/
message TimestepEndedEvent {
sint64 index = 1; // Time step index.
double size = 2; // Time step size.
sint64 index = 1; // Time step index.
double size = 2; // Time step size.
}

/**
* Event at end of the iteration.
*/
message IterationEndedEvent {
sint64 index = 1; // Iteration index
sint64 index = 1; // Iteration index
}

/**
Expand All @@ -44,14 +45,14 @@ message CalculationsEndedEvent {
* Event at case read.
*/
message CaseReadEvent {
string casefilepath = 1; // Case file path.
string casefilepath = 1; // Case file path.
}

/**
* Event at data read.
*/
message DataReadEvent {
string datafilepath = 1; // Data file path.
string datafilepath = 1; // Data file path.
}

/**
Expand Down
48 changes: 29 additions & 19 deletions protos/ansys/api/fluent/v0/field_data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,44 @@ service FieldData {
rpc GetFields(GetFieldsRequest) returns (stream GetFieldsResponse);

/* Get scalar field range.*/
rpc GetRange(GetRangeRequest) returns (GetRangeResponse) {}
rpc GetRange(GetRangeRequest) returns (GetRangeResponse) {
}

/* Get surfaces info.*/
rpc GetSurfacesInfo(GetSurfacesInfoRequest) returns (GetSurfacesInfoResponse) {}
rpc GetSurfacesInfo(GetSurfacesInfoRequest) returns (GetSurfacesInfoResponse) {
}

/* Get vector fields info.*/
rpc GetVectorFieldsInfo(GetVectorFieldsInfoRequest) returns (GetVectorFieldsInfoResponse) {}
rpc GetVectorFieldsInfo(GetVectorFieldsInfoRequest) returns (GetVectorFieldsInfoResponse) {
}

/* Get scalar fields info.*/
rpc GetFieldsInfo(GetFieldsInfoRequest) returns (GetFieldsInfoResponse) {}
rpc GetFieldsInfo(GetFieldsInfoRequest) returns (GetFieldsInfoResponse) {
}

/* Get surfaces data.*/
rpc GetSurfaces(GetSurfacesRequest) returns (stream GetSurfacesResponse) {}
rpc GetSurfaces(GetSurfacesRequest) returns (stream GetSurfacesResponse) {
}

/* Get scalar field data.*/
rpc GetScalarField(GetScalarFieldRequest) returns (stream GetScalarFieldResponse) {}
rpc GetScalarField(GetScalarFieldRequest) returns (stream GetScalarFieldResponse) {
}

/* Get vector field data.*/
rpc GetVectorField(GetVectorFieldRequest) returns (stream GetVectorFieldResponse) {}
rpc GetVectorField(GetVectorFieldRequest) returns (stream GetVectorFieldResponse) {
}

/* Get pathlines field data.*/
rpc GetPathlinesField(GetPathlinesFieldRequest) returns (stream GetPathlinesFieldResponse) {}
rpc GetPathlinesField(GetPathlinesFieldRequest) returns (stream GetPathlinesFieldResponse) {
}

/* Get particle tracks field data.*/
rpc GetParticleTracksField(GetParticleTracksFieldRequest) returns (stream GetParticleTracksFieldResponse) {}
rpc GetParticleTracksField(GetParticleTracksFieldRequest) returns (stream GetParticleTracksFieldResponse) {
}

/*Check if boundary values are on.*/
rpc IsBoundaryValuesOn(IsBoundaryValuesOnRequest) returns (IsBoundaryValuesOnResponse) {}
rpc IsBoundaryValuesOn(IsBoundaryValuesOnRequest) returns (IsBoundaryValuesOnResponse) {
}
}

message DoublePayload {
Expand Down Expand Up @@ -75,21 +85,21 @@ enum FieldType {
* or it contains boundary values etc.
*/
enum PayloadTag {
OVERSET_MESH = 0; // This tag is set if oversetMesh flag in SurfaceRequest is set to True.
ELEMENT_LOCATION = 1; // This tag is set if dataLocation in ScalarFieldRequest is Elements.
NODE_LOCATION = 2; // This tag is set if dataLocation in ScalarFieldRequest is Nodes.
BOUNDARY_VALUES = 3; // This tag is set if provideBoundaryValues in ScalarFieldRequest is set to True.
OVERSET_MESH = 0; // This tag is set if oversetMesh flag in SurfaceRequest is set to True.
ELEMENT_LOCATION = 1; // This tag is set if dataLocation in ScalarFieldRequest is Elements.
NODE_LOCATION = 2; // This tag is set if dataLocation in ScalarFieldRequest is Nodes.
BOUNDARY_VALUES = 3; // This tag is set if provideBoundaryValues in ScalarFieldRequest is set to True.
}

/**
* Information about payload
*/
message PayloadInfo {
uint64 surfaceId = 1; // Surface id corresponding to field data.
string fieldName = 2; // Field name e.g. vertices, faces, temperature, vector etc.
FieldType fieldType = 3; // Field type.
uint64 fieldSize = 4; // Field size. For bytes it will be number of bytes otherwise array size.
repeated PayloadTag payloadTag = 5; //PayloadTag to provide extra information about payload.
uint64 surfaceId = 1; // Surface id corresponding to field data.
string fieldName = 2; // Field name e.g. vertices, faces, temperature, vector etc.
FieldType fieldType = 3; // Field type.
uint64 fieldSize = 4; // Field size. For bytes it will be number of bytes otherwise array size.
repeated PayloadTag payloadTag = 5; //PayloadTag to provide extra information about payload.
}

/**
Expand Down
3 changes: 2 additions & 1 deletion protos/ansys/api/fluent/v0/transcript.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ package grpcRemoting;
option objc_class_prefix = "HLW";

service Transcript {
rpc BeginStreaming(TranscriptRequest) returns (stream TranscriptResponse) {}
rpc BeginStreaming(TranscriptRequest) returns (stream TranscriptResponse) {
}
}

message TranscriptRequest {
Expand Down