Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSDK-7258: change status to message type in board api #479

Merged
merged 8 commits into from
Apr 22, 2024
14 changes: 0 additions & 14 deletions proto/viam/common/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@ message ResourceName {
string name = 4;
}

message BoardStatus {
map<string, AnalogStatus> analogs = 1;
map<string, DigitalInterruptStatus> digital_interrupts = 2;
}

message AnalogStatus {
// Current value of the analog reader of a robot's board
int32 value = 1;
}

message DigitalInterruptStatus {
// Current value of the digital interrupt of a robot's board
int64 value = 1;
}
/* Pose is a combination of location and orientation.
Location is expressed as distance which is represented by x , y, z coordinates. Orientation is expressed as an orientation vector which
is represented by o_x, o_y, o_z and theta. The o_x, o_y, o_z coordinates represent the point on the cartesian unit sphere that the end of
Expand Down
17 changes: 3 additions & 14 deletions proto/viam/component/board/v1/board.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ option java_package = "com.viam.component.board.v1";

// BoardService services all Boards associated with a robot
service BoardService {
rpc Status(StatusRequest) returns (StatusResponse) {
option (google.api.http) = {
get: "/viam/api/v1/component/board/{name}/status"
};
}

rpc SetGPIO(SetGPIORequest) returns (SetGPIOResponse) {
option (google.api.http) = {
put: "/viam/api/v1/component/board/{name}/gpio"
Expand Down Expand Up @@ -117,14 +111,9 @@ service BoardService {
}
}

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

message StatusResponse {
common.v1.BoardStatus status = 1;
message Status {
map<string, int32> analogs = 1;
map<string, int64> digital_interrupts = 2;
}

message SetGPIORequest {
Expand Down
Loading