Skip to content

Commit

Permalink
add proto from scope
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnN193 committed Dec 31, 2024
1 parent 87eaef6 commit b542193
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
18 changes: 18 additions & 0 deletions proto/viam/robot/v1/robot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ service RobotService {
option (google.api.http) = {post: "/viam/api/v1/operations/block"};
}

// GetModelsFromModules returns the list of models supported in modules on the machine.
rpc GetModelsFromModules(GetModelsFromModulesRequest) returns (GetModelsFromModulesResponse) {
option (google.api.http) = {get: "/viam/api/v1/module_models"};
}

// DiscoverComponents returns the list of discovered component configurations.
rpc DiscoverComponents(DiscoverComponentsRequest) returns (DiscoverComponentsResponse) {
option (google.api.http) = {get: "/viam/api/v1/discovery/components"};
Expand Down Expand Up @@ -244,6 +249,19 @@ message Discovery {
google.protobuf.Struct results = 2;
}

message ModuleModel {
string module_name = 1;
string model = 2;
string api = 3;
bool from_local_module = 4;
}

message GetModelsFromModulesRequest {}

message GetModelsFromModulesResponse {
repeated ModuleModel model = 1;
}

message DiscoverComponentsRequest {
repeated DiscoveryQuery queries = 1;
}
Expand Down
35 changes: 35 additions & 0 deletions proto/viam/service/discovery/v1/discovery.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
syntax = "proto3";

package viam.service.discovery.v1;

import "app/v1/robot.proto";
import "common/v1/common.proto";
import "google/api/annotations.proto";
import "google/protobuf/struct.proto";

option go_package = "go.viam.com/api/service/discovey/v1";
option java_package = "com.viam.service.discovery.v1";

service DiscoveryService {
// DiscoverResources returns the list of all discovered viam resources connected to the viam-server machine.
rpc DiscoverResources(DiscoverResourcesRequest) returns (DiscoverResourcesResponse) {
option (google.api.http) = {get: "/viam/api/v1/service/{name}/discovery"};
}

// DoCommand sends/receives arbitrary commands
rpc DoCommand(common.v1.DoCommandRequest) returns (common.v1.DoCommandResponse) {
option (google.api.http) = {post: "/viam/api/v1/service/discovery/{name}/do_command"};
}
}

message DiscoverResourcesRequest {
// name of the discover service
string name = 1;
// Additional arguments to the method
google.protobuf.Struct extra = 99;
}

message DiscoverResourcesResponse {
// list of ComponentConfigs that describe the components found by a discover service. Can be used with UpdateRobotPart.
repeated app.v1.ComponentConfig discovery = 1;
}

0 comments on commit b542193

Please sign in to comment.