From 6bb94250d957abc4207ec1d3ded65bd400233b36 Mon Sep 17 00:00:00 2001 From: Riccardo Rizzo Date: Thu, 16 May 2019 14:10:31 +0200 Subject: [PATCH] Porting attach command(WIP) --- arduino/sketches/sketches.go | 1 + cli/board/attach.go | 146 +++-------------------------- commands/board/attach.go | 164 ++++++++++++++++++++++++++++++++ daemon/client/client.go | 20 +++- daemon/daemon.go | 4 + rpc/board.pb.go | 177 ++++++++++++++++++++++++++++------- rpc/board.proto | 11 +++ rpc/commands.pb.go | 168 ++++++++++++++++++++------------- rpc/commands.proto | 2 + 9 files changed, 455 insertions(+), 238 deletions(-) create mode 100644 commands/board/attach.go diff --git a/arduino/sketches/sketches.go b/arduino/sketches/sketches.go index b8f8d1ded14..7bbb926b891 100644 --- a/arduino/sketches/sketches.go +++ b/arduino/sketches/sketches.go @@ -69,6 +69,7 @@ func NewSketchFromPath(path *paths.Path) (*Sketch, error) { sketch := &Sketch{ FullPath: path, Name: path.Base(), + Metadata: &Metadata{}, } sketch.ImportMetadata() return sketch, nil diff --git a/cli/board/attach.go b/cli/board/attach.go index 67c9a28830c..b459139a9c1 100644 --- a/cli/board/attach.go +++ b/cli/board/attach.go @@ -18,20 +18,13 @@ package board import ( - "fmt" - "net/url" + "context" "os" - "strings" - "time" - "github.com/arduino/arduino-cli/arduino/cores" - "github.com/arduino/arduino-cli/arduino/cores/packagemanager" - "github.com/arduino/arduino-cli/arduino/sketches" "github.com/arduino/arduino-cli/cli" + "github.com/arduino/arduino-cli/commands/board" "github.com/arduino/arduino-cli/common/formatter" - discovery "github.com/arduino/board-discovery" - paths "github.com/arduino/go-paths-helper" - "github.com/sirupsen/logrus" + "github.com/arduino/arduino-cli/rpc" "github.com/spf13/cobra" ) @@ -59,131 +52,20 @@ var attachFlags struct { } func runAttachCommand(cmd *cobra.Command, args []string) { - boardURI := args[0] - - var path *paths.Path + instance := cli.CreateInstance() + var path string if len(args) > 0 { - path = paths.New(args[0]) + path = args[1] } - sketchPath := cli.InitSketchPath(path) - - sketch, err := sketches.NewSketchFromPath(sketchPath) + _, err := board.BoardAttach(context.Background(), &rpc.BoardAttachReq{ + Instance: instance, + BoardURI: args[0], + SketchPath: path, + BoardFlavour: attachFlags.boardFlavour, + SearchTimeout: attachFlags.searchTimeout, + }) if err != nil { - formatter.PrintError(err, "Error opening sketch.") + formatter.PrintError(err, "attach board error") os.Exit(cli.ErrGeneric) } - - logrus.WithField("fqbn", boardURI).Print("Parsing FQBN") - fqbn, err := cores.ParseFQBN(boardURI) - if err != nil && !strings.HasPrefix(boardURI, "serial") { - boardURI = "serial://" + boardURI - } - - pm, _ := cli.InitPackageAndLibraryManager() - - if fqbn != nil { - sketch.Metadata.CPU = sketches.BoardMetadata{ - Fqbn: fqbn.String(), - } - } else { - deviceURI, err := url.Parse(boardURI) - if err != nil { - formatter.PrintError(err, "The provided Device URL is not in a valid format.") - os.Exit(cli.ErrBadCall) - } - - var findBoardFunc func(*packagemanager.PackageManager, *discovery.Monitor, *url.URL) *cores.Board - switch deviceURI.Scheme { - case "serial", "tty": - findBoardFunc = findSerialConnectedBoard - case "http", "https", "tcp", "udp": - findBoardFunc = findNetworkConnectedBoard - default: - formatter.PrintErrorMessage("Invalid device port type provided. Accepted types are: serial://, tty://, http://, https://, tcp://, udp://.") - os.Exit(cli.ErrBadCall) - } - - duration, err := time.ParseDuration(attachFlags.searchTimeout) - if err != nil { - logrus.WithError(err).Warnf("Invalid interval `%s` provided, using default (5s).", attachFlags.searchTimeout) - duration = time.Second * 5 - } - - monitor := discovery.New(time.Second) - monitor.Start() - - time.Sleep(duration) - - // TODO: Handle the case when no board is found. - board := findBoardFunc(pm, monitor, deviceURI) - if board == nil { - formatter.PrintErrorMessage("No supported board has been found at " + deviceURI.String() + ", try either install new cores or check your board URI.") - os.Exit(cli.ErrGeneric) - } - formatter.Print("Board found: " + board.Name()) - - sketch.Metadata.CPU = sketches.BoardMetadata{ - Fqbn: board.FQBN(), - Name: board.Name(), - } - } - - err = sketch.ExportMetadata() - if err != nil { - formatter.PrintError(err, "Cannot export sketch metadata.") - } - formatter.PrintResult("Selected fqbn: " + sketch.Metadata.CPU.Fqbn) -} - -// FIXME: Those should probably go in a "BoardManager" pkg or something -// findSerialConnectedBoard find the board which is connected to the specified URI via serial port, using a monitor and a set of Boards -// for the matching. -func findSerialConnectedBoard(pm *packagemanager.PackageManager, monitor *discovery.Monitor, deviceURI *url.URL) *cores.Board { - found := false - location := deviceURI.Path - var serialDevice discovery.SerialDevice - for _, device := range monitor.Serial() { - if device.Port == location { - // Found the device ! - found = true - serialDevice = *device - } - } - if !found { - return nil - } - - boards := pm.FindBoardsWithVidPid(serialDevice.VendorID, serialDevice.ProductID) - if len(boards) == 0 { - os.Exit(cli.ErrGeneric) - } - - return boards[0] -} - -// findNetworkConnectedBoard find the board which is connected to the specified URI on the network, using a monitor and a set of Boards -// for the matching. -func findNetworkConnectedBoard(pm *packagemanager.PackageManager, monitor *discovery.Monitor, deviceURI *url.URL) *cores.Board { - found := false - - var networkDevice discovery.NetworkDevice - - for _, device := range monitor.Network() { - if device.Address == deviceURI.Host && - fmt.Sprint(device.Port) == deviceURI.Port() { - // Found the device ! - found = true - networkDevice = *device - } - } - if !found { - return nil - } - - boards := pm.FindBoardsWithID(networkDevice.Name) - if len(boards) == 0 { - return nil - } - - return boards[0] } diff --git a/commands/board/attach.go b/commands/board/attach.go new file mode 100644 index 00000000000..2fcd2e2a0fe --- /dev/null +++ b/commands/board/attach.go @@ -0,0 +1,164 @@ +/* + * This file is part of arduino-cli. + * + * Copyright 2018 ARDUINO SA (http://www.arduino.cc/) + * + * This software is released under the GNU General Public License version 3, + * which covers the main part of arduino-cli. + * The terms of this license can be found at: + * https://www.gnu.org/licenses/gpl-3.0.en.html + * + * You can be released from the requirements of the above licenses by purchasing + * a commercial license. Buying such a license is mandatory if you want to modify or + * otherwise use the software for commercial activities involving the Arduino + * software without disclosing the source code of your own applications. To purchase + * a commercial license, send an email to license@arduino.cc. + */ + +package board + +import ( + "context" + "errors" + "fmt" + "net/url" + "strings" + "time" + + "github.com/arduino/arduino-cli/arduino/cores" + "github.com/arduino/arduino-cli/arduino/cores/packagemanager" + "github.com/arduino/arduino-cli/arduino/sketches" + "github.com/arduino/arduino-cli/commands" + "github.com/arduino/arduino-cli/common/formatter" + "github.com/arduino/arduino-cli/rpc" + discovery "github.com/arduino/board-discovery" + paths "github.com/arduino/go-paths-helper" +) + +func BoardAttach(ctx context.Context, req *rpc.BoardAttachReq) (*rpc.BoardAttachResp, error) { + + pm := commands.GetPackageManager(req) + if pm == nil { + return nil, errors.New("invalid instance") + } + var sketchPath *paths.Path + if req.GetSketchPath() != "" { + sketchPath = paths.New(req.GetSketchPath()) + } + sketch, err := sketches.NewSketchFromPath(sketchPath) + if err != nil { + return nil, fmt.Errorf("opening sketch: %s", err) + } + if sketch.Metadata == nil { + formatter.Print("sketch errrorrrerereererer") + } + boardURI := req.GetBoardURI() + fqbn, err := cores.ParseFQBN(boardURI) + if err != nil && !strings.HasPrefix(boardURI, "serial") { + boardURI = "serial://" + boardURI + } + + if fqbn != nil { + sketch.Metadata.CPU = sketches.BoardMetadata{ + Fqbn: fqbn.String(), + } + } else { + deviceURI, err := url.Parse(boardURI) + if err != nil { + return nil, fmt.Errorf("invalid Device URL format: %s", err) + } + + var findBoardFunc func(*packagemanager.PackageManager, *discovery.Monitor, *url.URL) *cores.Board + switch deviceURI.Scheme { + case "serial", "tty": + findBoardFunc = findSerialConnectedBoard + case "http", "https", "tcp", "udp": + findBoardFunc = findNetworkConnectedBoard + default: + return nil, fmt.Errorf("invalid device port type provided") + } + + duration, err := time.ParseDuration(req.GetSearchTimeout()) + if err != nil { + //logrus.WithError(err).Warnf("Invalid interval `%s` provided, using default (5s).", req.GetSearchTimeout()) + duration = time.Second * 5 + } + + monitor := discovery.New(time.Second) + monitor.Start() + + time.Sleep(duration) + + // TODO: Handle the case when no board is found. + board := findBoardFunc(pm, monitor, deviceURI) + if board == nil { + return nil, fmt.Errorf("no supported board found at %s", deviceURI.String()) + } + formatter.Print("Board found: " + board.Name()) + + sketch.Metadata.CPU = sketches.BoardMetadata{ + Fqbn: board.FQBN(), + Name: board.Name(), + } + } + + err = sketch.ExportMetadata() + if err != nil { + return nil, fmt.Errorf("cannot export sketch metadata: %s", err) + } + formatter.PrintResult("Selected fqbn: " + sketch.Metadata.CPU.Fqbn) + return &rpc.BoardAttachResp{}, nil +} + +// FIXME: Those should probably go in a "BoardManager" pkg or something +// findSerialConnectedBoard find the board which is connected to the specified URI via serial port, using a monitor and a set of Boards +// for the matching. +func findSerialConnectedBoard(pm *packagemanager.PackageManager, monitor *discovery.Monitor, deviceURI *url.URL) *cores.Board { + found := false + location := deviceURI.Path + var serialDevice discovery.SerialDevice + for _, device := range monitor.Serial() { + if device.Port == location { + // Found the device ! + found = true + serialDevice = *device + } + } + if !found { + return nil + } + + boards := pm.FindBoardsWithVidPid(serialDevice.VendorID, serialDevice.ProductID) + if len(boards) == 0 { + return nil + } + + return boards[0] +} + +// findNetworkConnectedBoard find the board which is connected to the specified URI on the network, using a monitor and a set of Boards +// for the matching. +func findNetworkConnectedBoard(pm *packagemanager.PackageManager, monitor *discovery.Monitor, deviceURI *url.URL) *cores.Board { + found := false + + var networkDevice discovery.NetworkDevice + + for _, device := range monitor.Network() { + if device.Address == deviceURI.Host && + fmt.Sprint(device.Port) == deviceURI.Port() { + // Found the device ! + found = true + networkDevice = *device + } + } + if !found { + return nil + } + + boards := pm.FindBoardsWithID(networkDevice.Name) + if len(boards) == 0 { + return nil + } + + return boards[0] +} diff --git a/daemon/client/client.go b/daemon/client/client.go index 28f0450479d..23c00376ec2 100644 --- a/daemon/client/client.go +++ b/daemon/client/client.go @@ -85,10 +85,10 @@ func main() { } // PLATFORM SEARCH - fmt.Println("=== calling PlatformSearch(uno)") + fmt.Println("=== calling PlatformSearch(samd)") searchResp, err := client.PlatformSearch(context.Background(), &rpc.PlatformSearchReq{ Instance: instance, - SearchArgs: "uno", + SearchArgs: "samd", }) if err != nil { fmt.Printf("Search error: %s\n", err) @@ -194,6 +194,18 @@ func main() { fmt.Printf("---> %+v\n", details) fmt.Println() + // BOARDS ATTACH + fmt.Println("=== calling BoardAttach(serial:///dev/ttyACM0)") + _, err = client.BoardAttach(context.Background(), &rpc.BoardAttachReq{ + Instance: instance, + BoardURI: "serial:///dev/ttyACM0", + SketchPath: "/home/riccardo/Arduino/MyFirstSketch", + }) + if err != nil { + fmt.Printf("attach error : %s\n", err) + os.Exit(1) + } + // COMPILE fmt.Println("=== calling Compile(arduino:samd:mkr1000, VERBOSE, " + os.Args[2] + ")") compRespStream, err := client.Compile(context.Background(), &rpc.CompileReq{ @@ -265,12 +277,12 @@ func main() { } // PLATFORM UNINSTALL - fmt.Println("=== calling PlatformUninstall(arduino:samd@1.6.21)") + fmt.Println("=== calling PlatformUninstall(arduino:samd@1.6.19)") uninstallRespStream, err := client.PlatformUninstall(context.Background(), &rpc.PlatformUninstallReq{ Instance: instance, PlatformPackage: "arduino", Architecture: "samd", - Version: "1.6.21", + Version: "1.6.19", }) if err != nil { fmt.Printf("Uninstall error: %s\n", err) diff --git a/daemon/daemon.go b/daemon/daemon.go index 4e8af3162bf..bde59e54b66 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -60,6 +60,10 @@ func (s *ArduinoCoreServerImpl) BoardDetails(ctx context.Context, req *rpc.Board return board.BoardDetails(ctx, req) } +func (s *ArduinoCoreServerImpl) BoardAttach(ctx context.Context, req *rpc.BoardAttachReq) (*rpc.BoardAttachResp, error) { + return board.BoardAttach(ctx, req) +} + func (s *ArduinoCoreServerImpl) Destroy(ctx context.Context, req *rpc.DestroyReq) (*rpc.DestroyResp, error) { return commands.Destroy(ctx, req) } diff --git a/rpc/board.pb.go b/rpc/board.pb.go index 04cb1cd601b..a9a3e86a856 100644 --- a/rpc/board.pb.go +++ b/rpc/board.pb.go @@ -30,7 +30,7 @@ func (m *BoardDetailsReq) Reset() { *m = BoardDetailsReq{} } func (m *BoardDetailsReq) String() string { return proto.CompactTextString(m) } func (*BoardDetailsReq) ProtoMessage() {} func (*BoardDetailsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_board_f3bfb990d0990ad4, []int{0} + return fileDescriptor_board_51480c53f741d70d, []int{0} } func (m *BoardDetailsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BoardDetailsReq.Unmarshal(m, b) @@ -77,7 +77,7 @@ func (m *BoardDetailsResp) Reset() { *m = BoardDetailsResp{} } func (m *BoardDetailsResp) String() string { return proto.CompactTextString(m) } func (*BoardDetailsResp) ProtoMessage() {} func (*BoardDetailsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_board_f3bfb990d0990ad4, []int{1} + return fileDescriptor_board_51480c53f741d70d, []int{1} } func (m *BoardDetailsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BoardDetailsResp.Unmarshal(m, b) @@ -131,7 +131,7 @@ func (m *ConfigOption) Reset() { *m = ConfigOption{} } func (m *ConfigOption) String() string { return proto.CompactTextString(m) } func (*ConfigOption) ProtoMessage() {} func (*ConfigOption) Descriptor() ([]byte, []int) { - return fileDescriptor_board_f3bfb990d0990ad4, []int{2} + return fileDescriptor_board_51480c53f741d70d, []int{2} } func (m *ConfigOption) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigOption.Unmarshal(m, b) @@ -185,7 +185,7 @@ func (m *ConfigValue) Reset() { *m = ConfigValue{} } func (m *ConfigValue) String() string { return proto.CompactTextString(m) } func (*ConfigValue) ProtoMessage() {} func (*ConfigValue) Descriptor() ([]byte, []int) { - return fileDescriptor_board_f3bfb990d0990ad4, []int{3} + return fileDescriptor_board_51480c53f741d70d, []int{3} } func (m *ConfigValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ConfigValue.Unmarshal(m, b) @@ -239,7 +239,7 @@ func (m *RequiredTool) Reset() { *m = RequiredTool{} } func (m *RequiredTool) String() string { return proto.CompactTextString(m) } func (*RequiredTool) ProtoMessage() {} func (*RequiredTool) Descriptor() ([]byte, []int) { - return fileDescriptor_board_f3bfb990d0990ad4, []int{4} + return fileDescriptor_board_51480c53f741d70d, []int{4} } func (m *RequiredTool) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RequiredTool.Unmarshal(m, b) @@ -280,40 +280,147 @@ func (m *RequiredTool) GetPackager() string { return "" } +type BoardAttachReq struct { + Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + BoardURI string `protobuf:"bytes,2,opt,name=boardURI,proto3" json:"boardURI,omitempty"` + SketchPath string `protobuf:"bytes,3,opt,name=sketchPath,proto3" json:"sketchPath,omitempty"` + BoardFlavour string `protobuf:"bytes,4,opt,name=boardFlavour,proto3" json:"boardFlavour,omitempty"` + SearchTimeout string `protobuf:"bytes,5,opt,name=searchTimeout,proto3" json:"searchTimeout,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoardAttachReq) Reset() { *m = BoardAttachReq{} } +func (m *BoardAttachReq) String() string { return proto.CompactTextString(m) } +func (*BoardAttachReq) ProtoMessage() {} +func (*BoardAttachReq) Descriptor() ([]byte, []int) { + return fileDescriptor_board_51480c53f741d70d, []int{5} +} +func (m *BoardAttachReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoardAttachReq.Unmarshal(m, b) +} +func (m *BoardAttachReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoardAttachReq.Marshal(b, m, deterministic) +} +func (dst *BoardAttachReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoardAttachReq.Merge(dst, src) +} +func (m *BoardAttachReq) XXX_Size() int { + return xxx_messageInfo_BoardAttachReq.Size(m) +} +func (m *BoardAttachReq) XXX_DiscardUnknown() { + xxx_messageInfo_BoardAttachReq.DiscardUnknown(m) +} + +var xxx_messageInfo_BoardAttachReq proto.InternalMessageInfo + +func (m *BoardAttachReq) GetInstance() *Instance { + if m != nil { + return m.Instance + } + return nil +} + +func (m *BoardAttachReq) GetBoardURI() string { + if m != nil { + return m.BoardURI + } + return "" +} + +func (m *BoardAttachReq) GetSketchPath() string { + if m != nil { + return m.SketchPath + } + return "" +} + +func (m *BoardAttachReq) GetBoardFlavour() string { + if m != nil { + return m.BoardFlavour + } + return "" +} + +func (m *BoardAttachReq) GetSearchTimeout() string { + if m != nil { + return m.SearchTimeout + } + return "" +} + +type BoardAttachResp struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoardAttachResp) Reset() { *m = BoardAttachResp{} } +func (m *BoardAttachResp) String() string { return proto.CompactTextString(m) } +func (*BoardAttachResp) ProtoMessage() {} +func (*BoardAttachResp) Descriptor() ([]byte, []int) { + return fileDescriptor_board_51480c53f741d70d, []int{6} +} +func (m *BoardAttachResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BoardAttachResp.Unmarshal(m, b) +} +func (m *BoardAttachResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BoardAttachResp.Marshal(b, m, deterministic) +} +func (dst *BoardAttachResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoardAttachResp.Merge(dst, src) +} +func (m *BoardAttachResp) XXX_Size() int { + return xxx_messageInfo_BoardAttachResp.Size(m) +} +func (m *BoardAttachResp) XXX_DiscardUnknown() { + xxx_messageInfo_BoardAttachResp.DiscardUnknown(m) +} + +var xxx_messageInfo_BoardAttachResp proto.InternalMessageInfo + func init() { proto.RegisterType((*BoardDetailsReq)(nil), "cc.arduino.core.rpc.BoardDetailsReq") proto.RegisterType((*BoardDetailsResp)(nil), "cc.arduino.core.rpc.BoardDetailsResp") proto.RegisterType((*ConfigOption)(nil), "cc.arduino.core.rpc.ConfigOption") proto.RegisterType((*ConfigValue)(nil), "cc.arduino.core.rpc.ConfigValue") proto.RegisterType((*RequiredTool)(nil), "cc.arduino.core.rpc.RequiredTool") -} - -func init() { proto.RegisterFile("board.proto", fileDescriptor_board_f3bfb990d0990ad4) } - -var fileDescriptor_board_f3bfb990d0990ad4 = []byte{ - // 381 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x92, 0xdf, 0x6a, 0xdb, 0x30, - 0x14, 0xc6, 0xf1, 0x92, 0x65, 0xc9, 0xb1, 0xb3, 0x0d, 0x6d, 0x0c, 0x13, 0x18, 0x4b, 0xcc, 0x2e, - 0x72, 0x33, 0x07, 0xd6, 0x9b, 0xf6, 0x36, 0xed, 0x45, 0x0b, 0x85, 0x82, 0x28, 0xa5, 0xf4, 0x26, - 0x95, 0x15, 0x25, 0x15, 0xb5, 0x25, 0x47, 0xb2, 0xf3, 0x02, 0x7d, 0xab, 0x3e, 0x5d, 0x25, 0xf9, - 0x0f, 0x0e, 0x84, 0x5c, 0xe5, 0x7c, 0x27, 0x3f, 0x7d, 0xe7, 0x7c, 0x92, 0xc1, 0x4f, 0x24, 0x51, - 0xeb, 0x38, 0x57, 0xb2, 0x90, 0xe8, 0x07, 0xa5, 0xb1, 0x51, 0x25, 0x17, 0x32, 0xa6, 0x52, 0xb1, - 0x58, 0xe5, 0x74, 0x12, 0x50, 0x99, 0x65, 0x52, 0x54, 0x48, 0xf4, 0x0c, 0xdf, 0x96, 0xf6, 0xc4, - 0x15, 0x2b, 0x08, 0x4f, 0x35, 0x66, 0x3b, 0x74, 0x01, 0x43, 0x2e, 0x74, 0x41, 0x04, 0x65, 0xa1, - 0x37, 0xf5, 0xe6, 0xfe, 0xff, 0xdf, 0xf1, 0x11, 0xa3, 0xf8, 0xa6, 0x86, 0x70, 0x8b, 0x23, 0x04, - 0xfd, 0xcd, 0x2e, 0x11, 0xe1, 0x27, 0x73, 0x6c, 0x84, 0x5d, 0x1d, 0xbd, 0x7b, 0xf0, 0xfd, 0x70, - 0x84, 0xce, 0x2d, 0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2, 0x2d, 0x2f, 0x5e, 0xca, 0xc4, 0x44, 0xcc, - 0x16, 0x75, 0xdc, 0xe6, 0xf7, 0x1f, 0x4d, 0xf9, 0xc2, 0xa4, 0x4e, 0x06, 0xee, 0x6b, 0x3c, 0xfb, - 0x08, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x6a, 0xe5, 0xd5, 0xbf, 0x02, 0x00, 0x00, + proto.RegisterType((*BoardAttachReq)(nil), "cc.arduino.core.rpc.BoardAttachReq") + proto.RegisterType((*BoardAttachResp)(nil), "cc.arduino.core.rpc.BoardAttachResp") +} + +func init() { proto.RegisterFile("board.proto", fileDescriptor_board_51480c53f741d70d) } + +var fileDescriptor_board_51480c53f741d70d = []byte{ + // 463 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x93, 0x51, 0x6f, 0xd3, 0x30, + 0x10, 0xc7, 0x15, 0xb6, 0x95, 0xf6, 0x92, 0x0e, 0x30, 0x08, 0x45, 0x93, 0x80, 0x2e, 0xda, 0xc3, + 0x5e, 0xc8, 0x24, 0x78, 0x81, 0x47, 0x06, 0x42, 0x4c, 0x42, 0x02, 0x59, 0x03, 0x21, 0x5e, 0x8a, + 0xe3, 0xde, 0x9a, 0x68, 0x49, 0x9c, 0xda, 0x4e, 0xbf, 0x00, 0xdf, 0x8a, 0x6f, 0xc1, 0x37, 0xc2, + 0x76, 0x9c, 0x28, 0x95, 0xa6, 0xbe, 0xf0, 0xd4, 0xfb, 0x5f, 0x7f, 0xb9, 0xbb, 0xbf, 0xcf, 0x86, + 0x30, 0x13, 0x4c, 0xae, 0xd2, 0x46, 0x0a, 0x2d, 0xc8, 0x63, 0xce, 0x53, 0xa3, 0xda, 0xa2, 0x16, + 0x29, 0x17, 0x12, 0x53, 0xd9, 0xf0, 0x93, 0x88, 0x8b, 0xaa, 0x12, 0x75, 0x87, 0x24, 0xbf, 0xe0, + 0xc1, 0x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03, 0x80, 0x4b, 0x75, 0xfd, 0x4f, 0x60, 0xaa, 0xb0, + 0x44, 0xae, 0x71, 0x65, 0x26, 0x08, 0xce, 0xa7, 0x74, 0xd0, 0xc9, 0x0f, 0x88, 0xc6, 0xc7, 0x30, + 0xec, 0x27, 0x18, 0xed, 0x27, 0x86, 0xfb, 0x5b, 0x94, 0xca, 0x7a, 0xef, 0x8a, 0xf7, 0xd2, 0x56, + 0x6e, 0x18, 0xbf, 0x65, 0x6b, 0x94, 0xae, 0xf2, 0x8c, 0x0e, 0x3a, 0xf9, 0x1b, 0xc0, 0xb1, 0x5b, + 0xff, 0x3b, 0xad, 0x19, 0xcf, 0xff, 0xf3, 0x82, 0x99, 0x4e, 0xee, 0x82, 0x7f, 0xa3, 0x57, 0x7e, + 0x88, 0x41, 0x93, 0xe7, 0x00, 0xea, 0x16, 0x35, 0xcf, 0xbf, 0x32, 0x9d, 0xfb, 0x39, 0x46, 0x19, + 0x92, 0x40, 0xe4, 0xd8, 0x8f, 0x25, 0xdb, 0x8a, 0x56, 0x9a, 0x3b, 0x61, 0x89, 0x9d, 0x1c, 0x39, + 0x83, 0xb9, 0x42, 0x26, 0x79, 0x7e, 0x5d, 0x54, 0x28, 0x5a, 0x1d, 0x1f, 0x39, 0x68, 0x37, 0x99, + 0x3c, 0xf2, 0x8f, 0xa6, 0xb7, 0xa4, 0x9a, 0xcb, 0xb3, 0x9f, 0xc9, 0xba, 0xd0, 0x79, 0x9b, 0x99, + 0xf1, 0xab, 0x0b, 0x6f, 0xa5, 0xff, 0x7d, 0xc9, 0xcb, 0xe2, 0xc2, 0x38, 0xca, 0x26, 0xee, 0xd1, + 0xbd, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0x07, 0x16, 0x9d, 0x43, 0xa6, 0x03, 0x00, 0x00, } diff --git a/rpc/board.proto b/rpc/board.proto index f10193e71f4..e0a69f3839f 100644 --- a/rpc/board.proto +++ b/rpc/board.proto @@ -51,3 +51,14 @@ message RequiredTool { string version = 2; string packager = 3; } + +message BoardAttachReq { + Instance instance = 1; + string boardURI = 2; + string sketchPath = 3; + string boardFlavour = 4; + string searchTimeout = 5; +} + +message BoardAttachResp { +} diff --git a/rpc/commands.pb.go b/rpc/commands.pb.go index fdf5775c414..f927ecfe1ec 100644 --- a/rpc/commands.pb.go +++ b/rpc/commands.pb.go @@ -46,7 +46,7 @@ func (m *Configuration) Reset() { *m = Configuration{} } func (m *Configuration) String() string { return proto.CompactTextString(m) } func (*Configuration) ProtoMessage() {} func (*Configuration) Descriptor() ([]byte, []int) { - return fileDescriptor_commands_ef92369e556c7c67, []int{0} + return fileDescriptor_commands_18fb36c0a9a0836b, []int{0} } func (m *Configuration) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Configuration.Unmarshal(m, b) @@ -106,7 +106,7 @@ func (m *InitReq) Reset() { *m = InitReq{} } func (m *InitReq) String() string { return proto.CompactTextString(m) } func (*InitReq) ProtoMessage() {} func (*InitReq) Descriptor() ([]byte, []int) { - return fileDescriptor_commands_ef92369e556c7c67, []int{1} + return fileDescriptor_commands_18fb36c0a9a0836b, []int{1} } func (m *InitReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InitReq.Unmarshal(m, b) @@ -153,7 +153,7 @@ func (m *InitResp) Reset() { *m = InitResp{} } func (m *InitResp) String() string { return proto.CompactTextString(m) } func (*InitResp) ProtoMessage() {} func (*InitResp) Descriptor() ([]byte, []int) { - return fileDescriptor_commands_ef92369e556c7c67, []int{2} + return fileDescriptor_commands_18fb36c0a9a0836b, []int{2} } func (m *InitResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InitResp.Unmarshal(m, b) @@ -205,7 +205,7 @@ func (m *DestroyReq) Reset() { *m = DestroyReq{} } func (m *DestroyReq) String() string { return proto.CompactTextString(m) } func (*DestroyReq) ProtoMessage() {} func (*DestroyReq) Descriptor() ([]byte, []int) { - return fileDescriptor_commands_ef92369e556c7c67, []int{3} + return fileDescriptor_commands_18fb36c0a9a0836b, []int{3} } func (m *DestroyReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DestroyReq.Unmarshal(m, b) @@ -242,7 +242,7 @@ func (m *DestroyResp) Reset() { *m = DestroyResp{} } func (m *DestroyResp) String() string { return proto.CompactTextString(m) } func (*DestroyResp) ProtoMessage() {} func (*DestroyResp) Descriptor() ([]byte, []int) { - return fileDescriptor_commands_ef92369e556c7c67, []int{4} + return fileDescriptor_commands_18fb36c0a9a0836b, []int{4} } func (m *DestroyResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DestroyResp.Unmarshal(m, b) @@ -273,7 +273,7 @@ func (m *RescanReq) Reset() { *m = RescanReq{} } func (m *RescanReq) String() string { return proto.CompactTextString(m) } func (*RescanReq) ProtoMessage() {} func (*RescanReq) Descriptor() ([]byte, []int) { - return fileDescriptor_commands_ef92369e556c7c67, []int{5} + return fileDescriptor_commands_18fb36c0a9a0836b, []int{5} } func (m *RescanReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RescanReq.Unmarshal(m, b) @@ -312,7 +312,7 @@ func (m *RescanResp) Reset() { *m = RescanResp{} } func (m *RescanResp) String() string { return proto.CompactTextString(m) } func (*RescanResp) ProtoMessage() {} func (*RescanResp) Descriptor() ([]byte, []int) { - return fileDescriptor_commands_ef92369e556c7c67, []int{6} + return fileDescriptor_commands_18fb36c0a9a0836b, []int{6} } func (m *RescanResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RescanResp.Unmarshal(m, b) @@ -357,7 +357,7 @@ func (m *UpdateIndexReq) Reset() { *m = UpdateIndexReq{} } func (m *UpdateIndexReq) String() string { return proto.CompactTextString(m) } func (*UpdateIndexReq) ProtoMessage() {} func (*UpdateIndexReq) Descriptor() ([]byte, []int) { - return fileDescriptor_commands_ef92369e556c7c67, []int{7} + return fileDescriptor_commands_18fb36c0a9a0836b, []int{7} } func (m *UpdateIndexReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateIndexReq.Unmarshal(m, b) @@ -395,7 +395,7 @@ func (m *UpdateIndexResp) Reset() { *m = UpdateIndexResp{} } func (m *UpdateIndexResp) String() string { return proto.CompactTextString(m) } func (*UpdateIndexResp) ProtoMessage() {} func (*UpdateIndexResp) Descriptor() ([]byte, []int) { - return fileDescriptor_commands_ef92369e556c7c67, []int{8} + return fileDescriptor_commands_18fb36c0a9a0836b, []int{8} } func (m *UpdateIndexResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateIndexResp.Unmarshal(m, b) @@ -433,7 +433,7 @@ func (m *UpdateLibrariesIndexReq) Reset() { *m = UpdateLibrariesIndexReq func (m *UpdateLibrariesIndexReq) String() string { return proto.CompactTextString(m) } func (*UpdateLibrariesIndexReq) ProtoMessage() {} func (*UpdateLibrariesIndexReq) Descriptor() ([]byte, []int) { - return fileDescriptor_commands_ef92369e556c7c67, []int{9} + return fileDescriptor_commands_18fb36c0a9a0836b, []int{9} } func (m *UpdateLibrariesIndexReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateLibrariesIndexReq.Unmarshal(m, b) @@ -471,7 +471,7 @@ func (m *UpdateLibrariesIndexResp) Reset() { *m = UpdateLibrariesIndexRe func (m *UpdateLibrariesIndexResp) String() string { return proto.CompactTextString(m) } func (*UpdateLibrariesIndexResp) ProtoMessage() {} func (*UpdateLibrariesIndexResp) Descriptor() ([]byte, []int) { - return fileDescriptor_commands_ef92369e556c7c67, []int{10} + return fileDescriptor_commands_18fb36c0a9a0836b, []int{10} } func (m *UpdateLibrariesIndexResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateLibrariesIndexResp.Unmarshal(m, b) @@ -536,6 +536,7 @@ type ArduinoCoreClient interface { UpdateLibrariesIndex(ctx context.Context, in *UpdateLibrariesIndexReq, opts ...grpc.CallOption) (ArduinoCore_UpdateLibrariesIndexClient, error) // Requests details about a board BoardDetails(ctx context.Context, in *BoardDetailsReq, opts ...grpc.CallOption) (*BoardDetailsResp, error) + BoardAttach(ctx context.Context, in *BoardAttachReq, opts ...grpc.CallOption) (*BoardAttachResp, error) Compile(ctx context.Context, in *CompileReq, opts ...grpc.CallOption) (ArduinoCore_CompileClient, error) PlatformInstall(ctx context.Context, in *PlatformInstallReq, opts ...grpc.CallOption) (ArduinoCore_PlatformInstallClient, error) PlatformDownload(ctx context.Context, in *PlatformDownloadReq, opts ...grpc.CallOption) (ArduinoCore_PlatformDownloadClient, error) @@ -660,6 +661,15 @@ func (c *arduinoCoreClient) BoardDetails(ctx context.Context, in *BoardDetailsRe return out, nil } +func (c *arduinoCoreClient) BoardAttach(ctx context.Context, in *BoardAttachReq, opts ...grpc.CallOption) (*BoardAttachResp, error) { + out := new(BoardAttachResp) + err := c.cc.Invoke(ctx, "/cc.arduino.core.rpc.ArduinoCore/BoardAttach", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *arduinoCoreClient) Compile(ctx context.Context, in *CompileReq, opts ...grpc.CallOption) (ArduinoCore_CompileClient, error) { stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[2], "/cc.arduino.core.rpc.ArduinoCore/Compile", opts...) if err != nil { @@ -1030,6 +1040,7 @@ type ArduinoCoreServer interface { UpdateLibrariesIndex(*UpdateLibrariesIndexReq, ArduinoCore_UpdateLibrariesIndexServer) error // Requests details about a board BoardDetails(context.Context, *BoardDetailsReq) (*BoardDetailsResp, error) + BoardAttach(context.Context, *BoardAttachReq) (*BoardAttachResp, error) Compile(*CompileReq, ArduinoCore_CompileServer) error PlatformInstall(*PlatformInstallReq, ArduinoCore_PlatformInstallServer) error PlatformDownload(*PlatformDownloadReq, ArduinoCore_PlatformDownloadServer) error @@ -1164,6 +1175,24 @@ func _ArduinoCore_BoardDetails_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _ArduinoCore_BoardAttach_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BoardAttachReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArduinoCoreServer).BoardAttach(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cc.arduino.core.rpc.ArduinoCore/BoardAttach", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArduinoCoreServer).BoardAttach(ctx, req.(*BoardAttachReq)) + } + return interceptor(ctx, in, info, handler) +} + func _ArduinoCore_Compile_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(CompileReq) if err := stream.RecvMsg(m); err != nil { @@ -1466,6 +1495,10 @@ var _ArduinoCore_serviceDesc = grpc.ServiceDesc{ MethodName: "BoardDetails", Handler: _ArduinoCore_BoardDetails_Handler, }, + { + MethodName: "BoardAttach", + Handler: _ArduinoCore_BoardAttach_Handler, + }, { MethodName: "PlatformSearch", Handler: _ArduinoCore_PlatformSearch_Handler, @@ -1548,63 +1581,64 @@ var _ArduinoCore_serviceDesc = grpc.ServiceDesc{ Metadata: "commands.proto", } -func init() { proto.RegisterFile("commands.proto", fileDescriptor_commands_ef92369e556c7c67) } +func init() { proto.RegisterFile("commands.proto", fileDescriptor_commands_18fb36c0a9a0836b) } -var fileDescriptor_commands_ef92369e556c7c67 = []byte{ - // 869 bytes of a gzipped FileDescriptorProto +var fileDescriptor_commands_18fb36c0a9a0836b = []byte{ + // 885 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x97, 0xdd, 0x6e, 0xe3, 0x44, 0x14, 0xc7, 0xc9, 0xee, 0x6a, 0xdb, 0x9e, 0x7c, 0x74, 0x77, 0xb6, 0x40, 0x64, 0xb1, 0x6c, 0xe5, - 0x4d, 0xdb, 0x5d, 0x44, 0xd3, 0xaa, 0x70, 0xc3, 0x0d, 0x52, 0xdb, 0x14, 0xa8, 0x5a, 0xa0, 0x0a, - 0x44, 0x42, 0x80, 0x88, 0x26, 0xf6, 0x34, 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x43, 0x53, 0x86, 0x22, 0x1a, 0x10, 0xf3, 0x08, 0x3a, 0x27, 0xf9, 0xde, 0x98, 0x45, 0x01, 0xc3, + 0x16, 0xdc, 0x08, 0xe8, 0x38, 0xf9, 0xea, 0xfe, 0x53, 0x83, 0xe6, 0x11, 0x0b, 0x2f, 0xe8, 0x64, + 0xc6, 0x71, 0x4c, 0x59, 0x88, 0xda, 0xb0, 0xe6, 0xe3, 0x18, 0xf7, 0x29, 0x6f, 0xd7, 0xb6, 0x6b, + 0xaf, 0x36, 0x06, 0xf6, 0x11, 0x75, 0xa0, 0x29, 0xae, 0x48, 0xec, 0x5d, 0x8e, 0x19, 0xbb, 0x52, + 0xf1, 0x07, 0x3a, 0x9e, 0x3d, 0x44, 0x2e, 0x34, 0x7c, 0x76, 0x1d, 0xaa, 0x76, 0x42, 0x41, 0x0f, + 0x35, 0x94, 0x39, 0x43, 0x5f, 0x82, 0xa3, 0x07, 0xff, 0x16, 0x87, 0x78, 0x42, 0x78, 0xcf, 0xf7, + 0xa9, 0xea, 0x8d, 0x83, 0x21, 0x0f, 0x44, 0xfb, 0xd1, 0xf6, 0x43, 0x99, 0x51, 0x42, 0xb8, 0x7f, + 0xd5, 0x60, 0xed, 0x24, 0xa4, 0xf1, 0x80, 0xfc, 0x8e, 0xbe, 0x01, 0x79, 0xef, 0x85, 0x0b, 0xe8, + 0xa9, 0xeb, 0x07, 0x6e, 0x37, 0x67, 0x7b, 0xdd, 0xcc, 0x55, 0x07, 0xd9, 0x44, 0xb4, 0x0f, 0x5b, + 0x72, 0x31, 0x1c, 0xf3, 0xf9, 0x68, 0x9a, 0xb4, 0x1d, 0xb1, 0x30, 0x98, 0xeb, 0x6b, 0xae, 0x0f, + 0x90, 0x89, 0x99, 0x89, 0xbe, 0x97, 0x11, 0xf7, 0xef, 0x1a, 0xac, 0x27, 0x73, 0x88, 0x08, 0x7d, + 0x01, 0xeb, 0x34, 0x14, 0x31, 0x0e, 0x3d, 0x62, 0x66, 0x78,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d, 0x17, 0xd0, 0xb7, 0x32, + 0x6b, 0xfc, 0x58, 0xff, 0x5b, 0xf2, 0xd9, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xb9, 0xfa, + 0x5c, 0x0c, 0x0d, 0x00, 0x00, } diff --git a/rpc/commands.proto b/rpc/commands.proto index d659e0c1ee8..f32b488d407 100644 --- a/rpc/commands.proto +++ b/rpc/commands.proto @@ -54,6 +54,8 @@ service ArduinoCore { // Requests details about a board rpc BoardDetails(BoardDetailsReq) returns (BoardDetailsResp); + rpc BoardAttach(BoardAttachReq) returns (BoardAttachResp); + rpc Compile(CompileReq) returns (stream CompileResp); rpc PlatformInstall(PlatformInstallReq) returns (stream PlatformInstallResp);