diff --git a/rpc/commands/commands.pb.go b/rpc/commands/commands.pb.go index 5f589b1fc9c..710ddaf85ca 100644 --- a/rpc/commands/commands.pb.go +++ b/rpc/commands/commands.pb.go @@ -661,6 +661,7 @@ type ArduinoCoreClient interface { PlatformUninstall(ctx context.Context, in *PlatformUninstallReq, opts ...grpc.CallOption) (ArduinoCore_PlatformUninstallClient, error) // Upgrade an installed platform to the latest version. PlatformUpgrade(ctx context.Context, in *PlatformUpgradeReq, opts ...grpc.CallOption) (ArduinoCore_PlatformUpgradeClient, error) + // Upload a compiled sketch to an Arduino board. Upload(ctx context.Context, in *UploadReq, opts ...grpc.CallOption) (ArduinoCore_UploadClient, error) // Search for a platform in the platforms indexes. PlatformSearch(ctx context.Context, in *PlatformSearchReq, opts ...grpc.CallOption) (*PlatformSearchResp, error) @@ -1264,6 +1265,7 @@ type ArduinoCoreServer interface { PlatformUninstall(*PlatformUninstallReq, ArduinoCore_PlatformUninstallServer) error // Upgrade an installed platform to the latest version. PlatformUpgrade(*PlatformUpgradeReq, ArduinoCore_PlatformUpgradeServer) error + // Upload a compiled sketch to an Arduino board. Upload(*UploadReq, ArduinoCore_UploadServer) error // Search for a platform in the platforms indexes. PlatformSearch(context.Context, *PlatformSearchReq) (*PlatformSearchResp, error) diff --git a/rpc/commands/commands.proto b/rpc/commands/commands.proto index f2201d0f4f3..25d7818b1cb 100644 --- a/rpc/commands/commands.proto +++ b/rpc/commands/commands.proto @@ -81,6 +81,7 @@ service ArduinoCore { // Upgrade an installed platform to the latest version. rpc PlatformUpgrade(PlatformUpgradeReq) returns (stream PlatformUpgradeResp); + // Upload a compiled sketch to an Arduino board. rpc Upload(UploadReq) returns (stream UploadResp); // Search for a platform in the platforms indexes. diff --git a/rpc/commands/upload.pb.go b/rpc/commands/upload.pb.go index 242b8bacb65..a7606d4695b 100644 --- a/rpc/commands/upload.pb.go +++ b/rpc/commands/upload.pb.go @@ -21,17 +21,30 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type UploadReq struct { - Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` - Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` - SketchPath string `protobuf:"bytes,3,opt,name=sketch_path,json=sketchPath,proto3" json:"sketch_path,omitempty"` - Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"` - Verbose bool `protobuf:"varint,5,opt,name=verbose,proto3" json:"verbose,omitempty"` - Verify bool `protobuf:"varint,6,opt,name=verify,proto3" json:"verify,omitempty"` - ImportFile string `protobuf:"bytes,7,opt,name=import_file,json=importFile,proto3" json:"import_file,omitempty"` // Deprecated: Do not use. - ImportDir string `protobuf:"bytes,8,opt,name=import_dir,json=importDir,proto3" json:"import_dir,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Arduino Core Service instance from the `Init` response. + Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + // Fully qualified board name of the target board (e.g., `arduino:avr:uno`). + // If this field is not defined, the FQBN of the board attached to the sketch + // via the `BoardAttach` method is used. + Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` + // Path where the sketch to be uploaded is stored. Unless the `import_file` + // field is defined, the compiled binary is assumed to be at the location and + // filename under this path where it is saved by the `Compile` method. + SketchPath string `protobuf:"bytes,3,opt,name=sketch_path,json=sketchPath,proto3" json:"sketch_path,omitempty"` + // The port of the board. + Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"` + // Whether to turn on verbose output during the upload. + Verbose bool `protobuf:"varint,5,opt,name=verbose,proto3" json:"verbose,omitempty"` + // After upload, verify that the contents of the memory on the board match the + // uploaded binary. + Verify bool `protobuf:"varint,6,opt,name=verify,proto3" json:"verify,omitempty"` + ImportFile string `protobuf:"bytes,7,opt,name=import_file,json=importFile,proto3" json:"import_file,omitempty"` // Deprecated: Do not use. + // Custom path to a directory containing compiled files. When `import_dir` is + // not specified, the standard build directory under `sketch_path` is used. + ImportDir string `protobuf:"bytes,8,opt,name=import_dir,json=importDir,proto3" json:"import_dir,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UploadReq) Reset() { *m = UploadReq{} } @@ -117,7 +130,9 @@ func (m *UploadReq) GetImportDir() string { } type UploadResp struct { - OutStream []byte `protobuf:"bytes,1,opt,name=out_stream,json=outStream,proto3" json:"out_stream,omitempty"` + // The output of the upload process. + OutStream []byte `protobuf:"bytes,1,opt,name=out_stream,json=outStream,proto3" json:"out_stream,omitempty"` + // The error output of the upload process. ErrStream []byte `protobuf:"bytes,2,opt,name=err_stream,json=errStream,proto3" json:"err_stream,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` diff --git a/rpc/commands/upload.proto b/rpc/commands/upload.proto index 1efe2789504..82b936eb293 100644 --- a/rpc/commands/upload.proto +++ b/rpc/commands/upload.proto @@ -22,17 +22,32 @@ option go_package = "github.com/arduino/arduino-cli/rpc/commands"; import "commands/common.proto"; message UploadReq { + // Arduino Core Service instance from the `Init` response. Instance instance = 1; + // Fully qualified board name of the target board (e.g., `arduino:avr:uno`). + // If this field is not defined, the FQBN of the board attached to the sketch + // via the `BoardAttach` method is used. string fqbn = 2; + // Path where the sketch to be uploaded is stored. Unless the `import_file` + // field is defined, the compiled binary is assumed to be at the location and + // filename under this path where it is saved by the `Compile` method. string sketch_path = 3; + // The port of the board. string port = 4; + // Whether to turn on verbose output during the upload. bool verbose = 5; + // After upload, verify that the contents of the memory on the board match the + // uploaded binary. bool verify = 6; - string import_file = 7 [deprecated = true]; // DEPRECTAED: Use import_dir instead + string import_file = 7 [deprecated = true]; // DEPRECATED: Use import_dir instead + // Custom path to a directory containing compiled files. When `import_dir` is + // not specified, the standard build directory under `sketch_path` is used. string import_dir = 8; } message UploadResp { + // The output of the upload process. bytes out_stream = 1; + // The error output of the upload process. bytes err_stream = 2; } \ No newline at end of file
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: