From 8cd7ed27872591cccbb9a9a48a51acf6be5995b9 Mon Sep 17 00:00:00 2001 From: Peter Krull Date: Mon, 16 Dec 2024 12:12:49 -0700 Subject: [PATCH 1/2] Add simulation logs to simulation response --- ansys/api/additive/VERSION | 2 +- ansys/api/additive/v0/additive_simulation.proto | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ansys/api/additive/VERSION b/ansys/api/additive/VERSION index 953e3b9..45fbf50 100644 --- a/ansys/api/additive/VERSION +++ b/ansys/api/additive/VERSION @@ -1 +1 @@ -3.0.0-dev0 +3.1.0-dev0 diff --git a/ansys/api/additive/v0/additive_simulation.proto b/ansys/api/additive/v0/additive_simulation.proto index e04e5bc..2b7ee81 100644 --- a/ansys/api/additive/v0/additive_simulation.proto +++ b/ansys/api/additive/v0/additive_simulation.proto @@ -20,8 +20,6 @@ service SimulationService { rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse); - rpc SimulationLogs(SimulationLogsRequest) returns (stream DownloadFileResponse); - rpc Mesh(MeshRequest) returns (google.longrunning.Operation) { option (google.longrunning.operation_info) = { response_type: "MeshResponse" @@ -32,6 +30,7 @@ service SimulationService { message SimulationResponse { string id = 1; + bytes logs = 2; oneof ResponseType { Progress progress = 10; MeltPool melt_pool = 11; From e6ace9d09bdac48fe213aeebb458c287b488c991 Mon Sep 17 00:00:00 2001 From: Peter Krull Date: Mon, 16 Dec 2024 12:18:13 -0700 Subject: [PATCH 2/2] Fix indentation --- .../api/additive/v0/additive_simulation.proto | 96 +++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/ansys/api/additive/v0/additive_simulation.proto b/ansys/api/additive/v0/additive_simulation.proto index 2b7ee81..4a788a6 100644 --- a/ansys/api/additive/v0/additive_simulation.proto +++ b/ansys/api/additive/v0/additive_simulation.proto @@ -9,68 +9,68 @@ import "ansys/api/additive/v0/additive_domain.proto"; import "google/longrunning/operations.proto"; service SimulationService { - rpc Simulate(SimulationRequest) returns (google.longrunning.Operation) { - option (google.longrunning.operation_info) = { - response_type: "SimulationResponse" - metadata_type: "OperationMetadata" - }; - } + rpc Simulate(SimulationRequest) returns (google.longrunning.Operation) { + option (google.longrunning.operation_info) = { + response_type: "SimulationResponse" + metadata_type: "OperationMetadata" + }; + } - rpc UploadFile(stream UploadFileRequest) returns (stream UploadFileResponse); + rpc UploadFile(stream UploadFileRequest) returns (stream UploadFileResponse); - rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse); + rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse); - rpc Mesh(MeshRequest) returns (google.longrunning.Operation) { - option (google.longrunning.operation_info) = { - response_type: "MeshResponse" - metadata_type: "OperationMetadata" - }; - } + rpc Mesh(MeshRequest) returns (google.longrunning.Operation) { + option (google.longrunning.operation_info) = { + response_type: "MeshResponse" + metadata_type: "OperationMetadata" + }; + } } message SimulationResponse { - string id = 1; + string id = 1; bytes logs = 2; - oneof ResponseType { - Progress progress = 10; - MeltPool melt_pool = 11; - PorosityResult porosity_result = 13; - MicrostructureResult microstructure_result = 14; - ThermalHistoryResult thermal_history_result = 15; - ThermalStrainResult thermal_strain_result = 16; - Microstructure3DResult microstructure_3d_result = 17; - } + oneof ResponseType { + Progress progress = 10; + MeltPool melt_pool = 11; + PorosityResult porosity_result = 13; + MicrostructureResult microstructure_result = 14; + ThermalHistoryResult thermal_history_result = 15; + ThermalStrainResult thermal_strain_result = 16; + Microstructure3DResult microstructure_3d_result = 17; + } } message SimulationRequest { - string id = 1; - oneof Input { - SingleBeadInput single_bead_input = 10; - PorosityInput porosity_input = 11; - MicrostructureInput microstructure_input = 12; - ThermalHistoryInput thermal_history_input = 13; - ThermalStrainInput thermal_strain_input = 14; - Microstructure3DInput microstructure_3d_input = 15; - } + string id = 1; + oneof Input { + SingleBeadInput single_bead_input = 10; + PorosityInput porosity_input = 11; + MicrostructureInput microstructure_input = 12; + ThermalHistoryInput thermal_history_input = 13; + ThermalStrainInput thermal_strain_input = 14; + Microstructure3DInput microstructure_3d_input = 15; + } } // UploadFileRequest is used to transfer a file in chunks from // a client to the server. Each message should be <= 4MiB // unless the gRPC max receive message size has been changed. message UploadFileRequest { - string name = 1; // file name on client - uint64 total_size = 2; // total file size in bytes - bytes content = 3; // chunk of file content - string content_md5 = 4; // md5 hash of content + string name = 1; // file name on client + uint64 total_size = 2; // total file size in bytes + bytes content = 3; // chunk of file content + string content_md5 = 4; // md5 hash of content } message UploadFileResponse { - string remote_file_name = 1; - Progress progress = 2; + string remote_file_name = 1; + Progress progress = 2; } message DownloadFileRequest { - string remote_file_name = 1; // full path to file on server + string remote_file_name = 1; // full path to file on server } message SimulationLogsRequest { @@ -78,15 +78,15 @@ message SimulationLogsRequest { } message MeshRequest { - string id = 1; - oneof Input { - VoxelMeshInput voxel_mesh_input = 10; - } + string id = 1; + oneof Input { + VoxelMeshInput voxel_mesh_input = 10; + } } message MeshResponse { - string id = 1; - oneof ResponseType { - VoxelMeshResult voxel_mesh_result = 10; - } + string id = 1; + oneof ResponseType { + VoxelMeshResult voxel_mesh_result = 10; + } }