Skip to content

Commit c9b504f

Browse files
authored
Add simulation logs to simulation response (#52)
1 parent 5a15850 commit c9b504f

File tree

2 files changed

+53
-54
lines changed

2 files changed

+53
-54
lines changed

ansys/api/additive/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.0-dev0
1+
3.1.0-dev0

ansys/api/additive/v0/additive_simulation.proto

Lines changed: 52 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -9,85 +9,84 @@ import "ansys/api/additive/v0/additive_domain.proto";
99
import "google/longrunning/operations.proto";
1010

1111
service SimulationService {
12-
rpc Simulate(SimulationRequest) returns (google.longrunning.Operation) {
13-
option (google.longrunning.operation_info) = {
14-
response_type: "SimulationResponse"
15-
metadata_type: "OperationMetadata"
16-
};
17-
}
18-
19-
rpc UploadFile(stream UploadFileRequest) returns (stream UploadFileResponse);
20-
21-
rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse);
22-
23-
rpc SimulationLogs(SimulationLogsRequest) returns (stream DownloadFileResponse);
24-
25-
rpc Mesh(MeshRequest) returns (google.longrunning.Operation) {
26-
option (google.longrunning.operation_info) = {
27-
response_type: "MeshResponse"
28-
metadata_type: "OperationMetadata"
29-
};
30-
}
12+
rpc Simulate(SimulationRequest) returns (google.longrunning.Operation) {
13+
option (google.longrunning.operation_info) = {
14+
response_type: "SimulationResponse"
15+
metadata_type: "OperationMetadata"
16+
};
17+
}
18+
19+
rpc UploadFile(stream UploadFileRequest) returns (stream UploadFileResponse);
20+
21+
rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse);
22+
23+
rpc Mesh(MeshRequest) returns (google.longrunning.Operation) {
24+
option (google.longrunning.operation_info) = {
25+
response_type: "MeshResponse"
26+
metadata_type: "OperationMetadata"
27+
};
28+
}
3129
}
3230

3331
message SimulationResponse {
34-
string id = 1;
35-
oneof ResponseType {
36-
Progress progress = 10;
37-
MeltPool melt_pool = 11;
38-
PorosityResult porosity_result = 13;
39-
MicrostructureResult microstructure_result = 14;
40-
ThermalHistoryResult thermal_history_result = 15;
41-
ThermalStrainResult thermal_strain_result = 16;
42-
Microstructure3DResult microstructure_3d_result = 17;
43-
}
32+
string id = 1;
33+
bytes logs = 2;
34+
oneof ResponseType {
35+
Progress progress = 10;
36+
MeltPool melt_pool = 11;
37+
PorosityResult porosity_result = 13;
38+
MicrostructureResult microstructure_result = 14;
39+
ThermalHistoryResult thermal_history_result = 15;
40+
ThermalStrainResult thermal_strain_result = 16;
41+
Microstructure3DResult microstructure_3d_result = 17;
42+
}
4443
}
4544

4645
message SimulationRequest {
47-
string id = 1;
48-
oneof Input {
49-
SingleBeadInput single_bead_input = 10;
50-
PorosityInput porosity_input = 11;
51-
MicrostructureInput microstructure_input = 12;
52-
ThermalHistoryInput thermal_history_input = 13;
53-
ThermalStrainInput thermal_strain_input = 14;
54-
Microstructure3DInput microstructure_3d_input = 15;
55-
}
46+
string id = 1;
47+
oneof Input {
48+
SingleBeadInput single_bead_input = 10;
49+
PorosityInput porosity_input = 11;
50+
MicrostructureInput microstructure_input = 12;
51+
ThermalHistoryInput thermal_history_input = 13;
52+
ThermalStrainInput thermal_strain_input = 14;
53+
Microstructure3DInput microstructure_3d_input = 15;
54+
}
5655
}
5756

5857
// UploadFileRequest is used to transfer a file in chunks from
5958
// a client to the server. Each message should be <= 4MiB
6059
// unless the gRPC max receive message size has been changed.
6160
message UploadFileRequest {
62-
string name = 1; // file name on client
63-
uint64 total_size = 2; // total file size in bytes
64-
bytes content = 3; // chunk of file content
65-
string content_md5 = 4; // md5 hash of content
61+
string name = 1; // file name on client
62+
uint64 total_size = 2; // total file size in bytes
63+
bytes content = 3; // chunk of file content
64+
string content_md5 = 4; // md5 hash of content
6665
}
6766

6867
message UploadFileResponse {
69-
string remote_file_name = 1;
70-
Progress progress = 2;
68+
string remote_file_name = 1;
69+
Progress progress = 2;
7170
}
7271

7372
message DownloadFileRequest {
74-
string remote_file_name = 1; // full path to file on server
73+
string remote_file_name = 1; // full path to file on server
7574
}
7675

7776
message SimulationLogsRequest {
7877
string id = 1; // id of the simulation
7978
}
8079

8180
message MeshRequest {
82-
string id = 1;
83-
oneof Input {
84-
VoxelMeshInput voxel_mesh_input = 10;
85-
}
81+
string id = 1;
82+
oneof Input {
83+
VoxelMeshInput voxel_mesh_input = 10;
84+
}
8685
}
8786

8887
message MeshResponse {
89-
string id = 1;
90-
oneof ResponseType {
91-
VoxelMeshResult voxel_mesh_result = 10;
92-
}
88+
string id = 1;
89+
oneof ResponseType {
90+
VoxelMeshResult voxel_mesh_result = 10;
91+
}
9392
}

0 commit comments

Comments
 (0)