Skip to content

Commit

Permalink
Add Handshake rpc service to all proto files
Browse files Browse the repository at this point in the history
Handshake service has been added to all protobuf files. This was done to allow for a basic interaction to verify
communication integrity before the actual data transaction takes place. This handshaking mechanism helps establish
parameters of a data transfer before it starts and can also be used for subscribing to broadcasts.

Contributes to CURA-10714
  • Loading branch information
jellespijker committed Jul 5, 2023
1 parent 6787243 commit b77f6d3
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cura/plugins/slots/comb/v0/comb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ package cura.plugins.slots.comb.v0;

import "cura/plugins/v0/polygons.proto";
import "cura/plugins/v0/toolpaths.proto";
import "cura/plugins/v0/handshake.proto";

service CombService {
rpc Handshake(cura.plugins.v0.HandshakeRequest) returns (cura.plugins.v0.HandshakeResponse) {}
rpc Modify(CombServiceModifyRequest) returns (CombServiceModifyResponse) {}
}

Expand Down
2 changes: 2 additions & 0 deletions cura/plugins/slots/infill/v0/infill.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ syntax = "proto3";
package cura.plugins.slots.infill.v0;

import "cura/plugins/v0/layers.proto";
import "cura/plugins/v0/handshake.proto";

service InfillService {
rpc Handshake(cura.plugins.v0.HandshakeRequest) returns (cura.plugins.v0.HandshakeResponse) {}
rpc Modify(InfillServiceModifyRequest) returns (InfillServiceModifyResponse) {}
}

Expand Down
2 changes: 2 additions & 0 deletions cura/plugins/slots/overhang_areas/v0/overhang_areas.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ syntax = "proto3";
package cura.plugins.slots.overhang_areas.v0;

import "cura/plugins/v0/polygons.proto";
import "cura/plugins/v0/handshake.proto";

service OverhangAreasService {
rpc Handshake(cura.plugins.v0.HandshakeRequest) returns (cura.plugins.v0.HandshakeResponse) {}
rpc Modify(OverhangAreasServiceModifyRequest) returns (OverhangAreasServiceModifyResponse) {}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ package cura.plugins.slots.platform_adhesion.v0;

import "cura/plugins/v0/polygons.proto";
import "cura/plugins/v0/toolpaths.proto";
import "cura/plugins/v0/handshake.proto";

service PlatformAdhesionService {
rpc Handshake(cura.plugins.v0.HandshakeRequest) returns (cura.plugins.v0.HandshakeResponse) {}
rpc Modify(PlatformAdhesionServiceModifyRequest) returns (PlatformAdhesionServiceModifyResponse) {}
}

Expand Down
3 changes: 3 additions & 0 deletions cura/plugins/slots/postprocess/v0/postprocess.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ syntax = "proto3";

package cura.plugins.slots.postprocess.v0;

import "cura/plugins/v0/handshake.proto";

service PostprocessService {
rpc Handshake(cura.plugins.v0.HandshakeRequest) returns (cura.plugins.v0.HandshakeResponse) {}
rpc Modify(PostprocessServiceModifyRequest) returns (PostprocessServiceModifyResponse) {}
}

Expand Down
2 changes: 2 additions & 0 deletions cura/plugins/slots/simplify/v0/simplify.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ syntax = "proto3";
package cura.plugins.slots.simplify.v0;

import "cura/plugins/v0/polygons.proto";
import "cura/plugins/v0/handshake.proto";

service SimplifyService {
rpc Handshake(cura.plugins.v0.HandshakeRequest) returns (cura.plugins.v0.HandshakeResponse) {}
rpc Modify(SimplifyServiceModifyRequest) returns (SimplifyServiceModifyResponse) {}
}

Expand Down
3 changes: 3 additions & 0 deletions cura/plugins/slots/skin/v0/skin.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
syntax = "proto3";

package cura.plugins.slots.skin.v0;

import "cura/plugins/v0/layers.proto";
import "cura/plugins/v0/handshake.proto";

service SkinService {
rpc Handshake(cura.plugins.v0.HandshakeRequest) returns (cura.plugins.v0.HandshakeResponse) {}
rpc Modify(SkinServiceModifyRequest) returns (SkinServiceModifyResponse) {}
}

Expand Down
2 changes: 2 additions & 0 deletions cura/plugins/slots/slice/v0/slice.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ syntax = "proto3";
package cura.plugins.slots.slice.v0;

import "cura/plugins/v0/polygons.proto";
import "cura/plugins/v0/handshake.proto";

service SliceService {
rpc Handshake(cura.plugins.v0.HandshakeRequest) returns (cura.plugins.v0.HandshakeResponse) {}
rpc Modify(SliceServiceModifyRequest) returns (SliceResponse) {}
}

Expand Down
2 changes: 2 additions & 0 deletions cura/plugins/slots/wall_toolpaths/v0/wall_toolpaths.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ syntax = "proto3";
package cura.plugins.slots.wall_toolpaths.v0;

import "cura/plugins/v0/layers.proto";
import "cura/plugins/v0/handshake.proto";

service WallToolpathsService {
rpc Handshake(cura.plugins.v0.HandshakeRequest) returns (cura.plugins.v0.HandshakeResponse) {}
rpc Modify(WallToolpathsServiceModifyRequest) returns (WallToolpathsServiceModifyResponse) {}
}

Expand Down
15 changes: 15 additions & 0 deletions cura/plugins/v0/handshake.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
syntax = "proto3";

package cura.plugins.v0;

message HandshakeRequest {
string service_name = 1;
string version_range = 2;
}

message HandshakeResponse {
string slot_version = 1;
string plugin_name = 2;
string plugin_version = 3;
repeated string subscriptions = 4;
}

0 comments on commit b77f6d3

Please sign in to comment.