Skip to content

Commit 802917d

Browse files
authored
Added gRPC calls. (#1492)
* Added new Monitor command (will replace current Monitor service) * Added new EnumerateMonitorPortParameters gRPC call * Force compile error on gRPC deamon when there are unimplemented methods * Updated deamon implementation stub * fix i18n
1 parent 70b5f47 commit 802917d

File tree

8 files changed

+1457
-477
lines changed

8 files changed

+1457
-477
lines changed

Diff for: commands/daemon/daemon.go

+13-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ import (
3737

3838
// ArduinoCoreServerImpl FIXMEDOC
3939
type ArduinoCoreServerImpl struct {
40-
rpc.UnimplementedArduinoCoreServiceServer
40+
// Force compile error for unimplemented methods
41+
rpc.UnsafeArduinoCoreServiceServer
42+
4143
VersionString string
4244
}
4345

@@ -463,3 +465,13 @@ func (s *ArduinoCoreServerImpl) GitLibraryInstall(req *rpc.GitLibraryInstallRequ
463465
}
464466
return stream.Send(&rpc.GitLibraryInstallResponse{})
465467
}
468+
469+
// EnumerateMonitorPortSettings FIXMEDOC
470+
func (s *ArduinoCoreServerImpl) EnumerateMonitorPortSettings(context.Context, *rpc.EnumerateMonitorPortSettingsRequest) (*rpc.EnumerateMonitorPortSettingsResponse, error) {
471+
return nil, status.New(codes.Unimplemented, "Not implemented").Err()
472+
}
473+
474+
// Monitor FIXMEDOC
475+
func (s *ArduinoCoreServerImpl) Monitor(stream rpc.ArduinoCoreService_MonitorServer) error {
476+
return status.New(codes.Unimplemented, "Not implemented").Err()
477+
}

Diff for: i18n/data/en.po

+1-1
Original file line numberDiff line numberDiff line change
@@ -2923,7 +2923,7 @@ msgstr "no compatible version of %s tools found for the current os"
29232923
msgid "no executable specified"
29242924
msgstr "no executable specified"
29252925

2926-
#: commands/daemon/daemon.go:96
2926+
#: commands/daemon/daemon.go:98
29272927
msgid "no instance specified"
29282928
msgstr "no instance specified"
29292929

Diff for: i18n/rice-box.go

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: rpc/cc/arduino/cli/commands/v1/commands.pb.go

+499-471
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: rpc/cc/arduino/cli/commands/v1/commands.proto

+8
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import "cc/arduino/cli/commands/v1/common.proto";
2525
import "cc/arduino/cli/commands/v1/board.proto";
2626
import "cc/arduino/cli/commands/v1/compile.proto";
2727
import "cc/arduino/cli/commands/v1/core.proto";
28+
import "cc/arduino/cli/commands/v1/monitor.proto";
2829
import "cc/arduino/cli/commands/v1/upload.proto";
2930
import "cc/arduino/cli/commands/v1/lib.proto";
3031

@@ -170,6 +171,13 @@ service ArduinoCoreService {
170171

171172
// List the installed libraries.
172173
rpc LibraryList(LibraryListRequest) returns (LibraryListResponse);
174+
175+
// Open a monitor connection to a board port
176+
rpc Monitor(stream MonitorRequest) returns (stream MonitorResponse);
177+
178+
// Returns the parameters that can be set in the MonitorRequest calls
179+
rpc EnumerateMonitorPortSettings(EnumerateMonitorPortSettingsRequest)
180+
returns (EnumerateMonitorPortSettingsResponse);
173181
}
174182

175183
message CreateRequest {}

Diff for: rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go

+108
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)