Skip to content

Commit

Permalink
Deprecate sensors service api
Browse files Browse the repository at this point in the history
  • Loading branch information
randhid committed Jan 3, 2024
1 parent 471005c commit ab6c737
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions proto/viam/service/sensors/v1/sensors.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,54 @@ option go_package = "go.viam.com/api/service/sensors/v1";
option java_package = "com.viam.service.sensors.v1";

// A SensorsService services keeps track of all sensors associated with a robot
// This service is deprecated
service SensorsService {
// GetSensors returns the list of all sensors.
rpc GetSensors(GetSensorsRequest) returns (GetSensorsResponse) {
option (google.api.http) = {
get: "/viam/api/v1/service/{name}/sensors"
};
option deprecated = true;
}

// GetReadings returns the list of readings for all sensors specified.
rpc GetReadings(GetReadingsRequest) returns (GetReadingsResponse) {
option (google.api.http) = {
get: "/viam/api/v1/service/sensors/{name}/readings"
};
option deprecated = true;
}

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

// The sensor service messages are deprecated
message GetSensorsRequest {
string name = 1;
string name = 1 [deprecated = true];
// Additional arguments to the method
google.protobuf.Struct extra = 99;
google.protobuf.Struct extra = 99 [deprecated = true];
}

message GetSensorsResponse {
repeated common.v1.ResourceName sensor_names = 1;
repeated common.v1.ResourceName sensor_names = 1 [deprecated = true];
}

message GetReadingsRequest {
string name = 1;
repeated common.v1.ResourceName sensor_names = 2;
repeated common.v1.ResourceName sensor_names = 2 [deprecated = true];
// Additional arguments to the method
google.protobuf.Struct extra = 99;
google.protobuf.Struct extra = 99 [deprecated = true];
}

message Readings {
common.v1.ResourceName name = 1;
map<string, google.protobuf.Value> readings = 2;
map<string, google.protobuf.Value> readings = 2 [deprecated = true];
}

message GetReadingsResponse {
Expand Down

0 comments on commit ab6c737

Please sign in to comment.