Skip to content

change board status to message instead of req/resp #475

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions proto/viam/common/v1/common.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// The following is a list of messages that are used across multiple resource subtypes

Check failure on line 1 in proto/viam/common/v1/common.proto

View workflow job for this annotation

GitHub Actions / Test For Lint and Breaking Changes

Previously present message "AnalogStatus" was deleted from file.

Check failure on line 1 in proto/viam/common/v1/common.proto

View workflow job for this annotation

GitHub Actions / Test For Lint and Breaking Changes

Previously present message "BoardStatus" was deleted from file.

Check failure on line 1 in proto/viam/common/v1/common.proto

View workflow job for this annotation

GitHub Actions / Test For Lint and Breaking Changes

Previously present message "BoardStatus.AnalogsEntry" was deleted from file.

Check failure on line 1 in proto/viam/common/v1/common.proto

View workflow job for this annotation

GitHub Actions / Test For Lint and Breaking Changes

Previously present message "BoardStatus.DigitalInterruptsEntry" was deleted from file.

Check failure on line 1 in proto/viam/common/v1/common.proto

View workflow job for this annotation

GitHub Actions / Test For Lint and Breaking Changes

Previously present message "DigitalInterruptStatus" was deleted from file.
syntax = "proto3";

package viam.common.v1;
Expand All @@ -18,20 +18,6 @@
optional string machine_part_id = 5;
}

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
@@ -1,4 +1,4 @@
syntax = "proto3";

Check failure on line 1 in proto/viam/component/board/v1/board.proto

View workflow job for this annotation

GitHub Actions / Test For Lint and Breaking Changes

Previously present message "StatusRequest" was deleted from file.

Check failure on line 1 in proto/viam/component/board/v1/board.proto

View workflow job for this annotation

GitHub Actions / Test For Lint and Breaking Changes

Previously present message "StatusResponse" was deleted from file.

package viam.component.board.v1;

Expand All @@ -11,13 +11,7 @@
option java_package = "com.viam.component.board.v1";

// BoardService services all Boards associated with a robot
service BoardService {

Check failure on line 14 in proto/viam/component/board/v1/board.proto

View workflow job for this annotation

GitHub Actions / Test For Lint and Breaking Changes

Previously present RPC "Status" on service "BoardService" was deleted.
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 @@
}
}

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