Unverified Commit 147958b0 authored by per1234's avatar per1234 Committed by GitHub

[skip changelog] Add documentation for board components of the gRPC interface (#694)

Comments added to the .proto files are included in the generated gRPC interface documentation.
parent 31517efa
...@@ -21,11 +21,14 @@ var _ = math.Inf ...@@ -21,11 +21,14 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type BoardDetailsReq struct { type BoardDetailsReq struct {
Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` // Arduino Core Service instance from the `Init` response.
Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"` Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` // The fully qualified board name of the board you want information about
XXX_unrecognized []byte `json:"-"` // (e.g., `arduino:avr:uno`).
XXX_sizecache int32 `json:"-"` Fqbn string `protobuf:"bytes,2,opt,name=fqbn,proto3" json:"fqbn,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *BoardDetailsReq) Reset() { *m = BoardDetailsReq{} } func (m *BoardDetailsReq) Reset() { *m = BoardDetailsReq{} }
...@@ -68,17 +71,30 @@ func (m *BoardDetailsReq) GetFqbn() string { ...@@ -68,17 +71,30 @@ func (m *BoardDetailsReq) GetFqbn() string {
} }
type BoardDetailsResp struct { type BoardDetailsResp struct {
Fqbn string `protobuf:"bytes,1,opt,name=fqbn,proto3" json:"fqbn,omitempty"` // The fully qualified board name of the board.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Fqbn string `protobuf:"bytes,1,opt,name=fqbn,proto3" json:"fqbn,omitempty"`
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // Name used to identify the board to humans (e.g., Arduino/Genuino Uno).
PropertiesId string `protobuf:"bytes,4,opt,name=propertiesId,proto3" json:"propertiesId,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Alias string `protobuf:"bytes,5,opt,name=alias,proto3" json:"alias,omitempty"` // Installed version of the board's platform.
Official bool `protobuf:"varint,6,opt,name=official,proto3" json:"official,omitempty"` Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
Pinout string `protobuf:"bytes,7,opt,name=pinout,proto3" json:"pinout,omitempty"` // The board ID component of the FQBN (e.g., `uno`).
Package *Package `protobuf:"bytes,8,opt,name=package,proto3" json:"package,omitempty"` PropertiesId string `protobuf:"bytes,4,opt,name=propertiesId,proto3" json:"propertiesId,omitempty"`
Platform *BoardPlatform `protobuf:"bytes,9,opt,name=platform,proto3" json:"platform,omitempty"` // Board alias that can be used as a more user friendly alternative to the
ToolsDependencies []*ToolsDependencies `protobuf:"bytes,10,rep,name=toolsDependencies,proto3" json:"toolsDependencies,omitempty"` // FQBN.
ConfigOptions []*ConfigOption `protobuf:"bytes,11,rep,name=config_options,json=configOptions,proto3" json:"config_options,omitempty"` Alias string `protobuf:"bytes,5,opt,name=alias,proto3" json:"alias,omitempty"`
// Whether this is an official or 3rd party board.
Official bool `protobuf:"varint,6,opt,name=official,proto3" json:"official,omitempty"`
// URL of the board's pinout documentation.
Pinout string `protobuf:"bytes,7,opt,name=pinout,proto3" json:"pinout,omitempty"`
// Data about the package that contains the board's platform.
Package *Package `protobuf:"bytes,8,opt,name=package,proto3" json:"package,omitempty"`
// Data about the board's platform.
Platform *BoardPlatform `protobuf:"bytes,9,opt,name=platform,proto3" json:"platform,omitempty"`
// Tool dependencies of the board.
ToolsDependencies []*ToolsDependencies `protobuf:"bytes,10,rep,name=toolsDependencies,proto3" json:"toolsDependencies,omitempty"`
// The board's custom configuration options.
ConfigOptions []*ConfigOption `protobuf:"bytes,11,rep,name=config_options,json=configOptions,proto3" json:"config_options,omitempty"`
// Identifying information for the board (e.g., USB VID/PID).
IdentificationPref []*IdentificationPref `protobuf:"bytes,12,rep,name=identification_pref,json=identificationPref,proto3" json:"identification_pref,omitempty"` IdentificationPref []*IdentificationPref `protobuf:"bytes,12,rep,name=identification_pref,json=identificationPref,proto3" json:"identification_pref,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -195,6 +211,7 @@ func (m *BoardDetailsResp) GetIdentificationPref() []*IdentificationPref { ...@@ -195,6 +211,7 @@ func (m *BoardDetailsResp) GetIdentificationPref() []*IdentificationPref {
} }
type IdentificationPref struct { type IdentificationPref struct {
// Identifying information for USB-connected boards.
UsbID *USBID `protobuf:"bytes,1,opt,name=usbID,proto3" json:"usbID,omitempty"` UsbID *USBID `protobuf:"bytes,1,opt,name=usbID,proto3" json:"usbID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -234,7 +251,9 @@ func (m *IdentificationPref) GetUsbID() *USBID { ...@@ -234,7 +251,9 @@ func (m *IdentificationPref) GetUsbID() *USBID {
} }
type USBID struct { type USBID struct {
VID string `protobuf:"bytes,1,opt,name=VID,proto3" json:"VID,omitempty"` // USB vendor ID.
VID string `protobuf:"bytes,1,opt,name=VID,proto3" json:"VID,omitempty"`
// USB product ID.
PID string `protobuf:"bytes,2,opt,name=PID,proto3" json:"PID,omitempty"` PID string `protobuf:"bytes,2,opt,name=PID,proto3" json:"PID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -281,11 +300,18 @@ func (m *USBID) GetPID() string { ...@@ -281,11 +300,18 @@ func (m *USBID) GetPID() string {
} }
type Package struct { type Package struct {
Maintainer string `protobuf:"bytes,1,opt,name=maintainer,proto3" json:"maintainer,omitempty"` // Maintainer of the package.
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` Maintainer string `protobuf:"bytes,1,opt,name=maintainer,proto3" json:"maintainer,omitempty"`
WebsiteURL string `protobuf:"bytes,3,opt,name=websiteURL,proto3" json:"websiteURL,omitempty"` // The URL of the platforms index file
Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // (e.g., https://downloads.arduino.cc/packages/package_index.json).
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
// A URL provided by the package author, intended to point to their website.
WebsiteURL string `protobuf:"bytes,3,opt,name=websiteURL,proto3" json:"websiteURL,omitempty"`
// Email address of the package maintainer.
Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
// Package vendor name.
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
// Resources for getting help about using the package.
Help *Help `protobuf:"bytes,6,opt,name=help,proto3" json:"help,omitempty"` Help *Help `protobuf:"bytes,6,opt,name=help,proto3" json:"help,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -360,6 +386,7 @@ func (m *Package) GetHelp() *Help { ...@@ -360,6 +386,7 @@ func (m *Package) GetHelp() *Help {
} }
type Help struct { type Help struct {
// URL for getting online help.
Online string `protobuf:"bytes,1,opt,name=online,proto3" json:"online,omitempty"` Online string `protobuf:"bytes,1,opt,name=online,proto3" json:"online,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -399,12 +426,19 @@ func (m *Help) GetOnline() string { ...@@ -399,12 +426,19 @@ func (m *Help) GetOnline() string {
} }
type BoardPlatform struct { type BoardPlatform struct {
Architecture string `protobuf:"bytes,1,opt,name=architecture,proto3" json:"architecture,omitempty"` // Architecture of the platform (e.g., `avr`).
Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` Architecture string `protobuf:"bytes,1,opt,name=architecture,proto3" json:"architecture,omitempty"`
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` // Category of the platform. Set to `Contributed` for 3rd party platforms.
ArchiveFileName string `protobuf:"bytes,4,opt,name=archiveFileName,proto3" json:"archiveFileName,omitempty"` Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"`
Checksum string `protobuf:"bytes,5,opt,name=checksum,proto3" json:"checksum,omitempty"` // Download URL of the platform archive file.
Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"` Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
// File name of the platform archive.
ArchiveFileName string `protobuf:"bytes,4,opt,name=archiveFileName,proto3" json:"archiveFileName,omitempty"`
// Checksum of the platform archive.
Checksum string `protobuf:"bytes,5,opt,name=checksum,proto3" json:"checksum,omitempty"`
// File size of the platform archive.
Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"`
// Name used to identify the platform to humans.
Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -486,9 +520,13 @@ func (m *BoardPlatform) GetName() string { ...@@ -486,9 +520,13 @@ func (m *BoardPlatform) GetName() string {
} }
type ToolsDependencies struct { type ToolsDependencies struct {
Packager string `protobuf:"bytes,1,opt,name=packager,proto3" json:"packager,omitempty"` // Vendor name of the package containing the tool definition.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Packager string `protobuf:"bytes,1,opt,name=packager,proto3" json:"packager,omitempty"`
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // Tool name.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// Tool version.
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
// Data for the operating system-specific builds of the tool.
Systems []*Systems `protobuf:"bytes,4,rep,name=systems,proto3" json:"systems,omitempty"` Systems []*Systems `protobuf:"bytes,4,rep,name=systems,proto3" json:"systems,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -549,10 +587,15 @@ func (m *ToolsDependencies) GetSystems() []*Systems { ...@@ -549,10 +587,15 @@ func (m *ToolsDependencies) GetSystems() []*Systems {
} }
type Systems struct { type Systems struct {
Checksum string `protobuf:"bytes,1,opt,name=checksum,proto3" json:"checksum,omitempty"` // Checksum of the tool archive.
Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` Checksum string `protobuf:"bytes,1,opt,name=checksum,proto3" json:"checksum,omitempty"`
ArchiveFileName string `protobuf:"bytes,3,opt,name=archiveFileName,proto3" json:"archiveFileName,omitempty"` // Operating system identifier.
Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
// File name of the tool archive.
ArchiveFileName string `protobuf:"bytes,3,opt,name=archiveFileName,proto3" json:"archiveFileName,omitempty"`
// Download URL of the tool archive.
Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
// File size of the tool archive.
Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"` Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -620,8 +663,11 @@ func (m *Systems) GetSize() int64 { ...@@ -620,8 +663,11 @@ func (m *Systems) GetSize() int64 {
} }
type ConfigOption struct { type ConfigOption struct {
Option string `protobuf:"bytes,1,opt,name=option,proto3" json:"option,omitempty"` // ID of the configuration option. For identifying the option to machines.
OptionLabel string `protobuf:"bytes,2,opt,name=option_label,json=optionLabel,proto3" json:"option_label,omitempty"` Option string `protobuf:"bytes,1,opt,name=option,proto3" json:"option,omitempty"`
// Name of the configuration option for identifying the option to humans.
OptionLabel string `protobuf:"bytes,2,opt,name=option_label,json=optionLabel,proto3" json:"option_label,omitempty"`
// Possible values of the configuration option.
Values []*ConfigValue `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` Values []*ConfigValue `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -675,8 +721,11 @@ func (m *ConfigOption) GetValues() []*ConfigValue { ...@@ -675,8 +721,11 @@ func (m *ConfigOption) GetValues() []*ConfigValue {
} }
type ConfigValue struct { type ConfigValue struct {
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // The configuration option value.
ValueLabel string `protobuf:"bytes,2,opt,name=value_label,json=valueLabel,proto3" json:"value_label,omitempty"` Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
// Label to identify the configuration option to humans.
ValueLabel string `protobuf:"bytes,2,opt,name=value_label,json=valueLabel,proto3" json:"value_label,omitempty"`
// Whether the configuration option is selected.
Selected bool `protobuf:"varint,3,opt,name=selected,proto3" json:"selected,omitempty"` Selected bool `protobuf:"varint,3,opt,name=selected,proto3" json:"selected,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -730,13 +779,19 @@ func (m *ConfigValue) GetSelected() bool { ...@@ -730,13 +779,19 @@ func (m *ConfigValue) GetSelected() bool {
} }
type BoardAttachReq struct { type BoardAttachReq struct {
Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` // Arduino Core Service instance from the `Init` response.
BoardUri string `protobuf:"bytes,2,opt,name=board_uri,json=boardUri,proto3" json:"board_uri,omitempty"` Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
SketchPath string `protobuf:"bytes,3,opt,name=sketch_path,json=sketchPath,proto3" json:"sketch_path,omitempty"` // The board's URI (e.g., /dev/ttyACM0).
SearchTimeout string `protobuf:"bytes,4,opt,name=search_timeout,json=searchTimeout,proto3" json:"search_timeout,omitempty"` BoardUri string `protobuf:"bytes,2,opt,name=board_uri,json=boardUri,proto3" json:"board_uri,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` // Path of the sketch to attach the board to. The board attachment
XXX_unrecognized []byte `json:"-"` // metadata will be saved to `{sketch_path}/sketch.json`.
XXX_sizecache int32 `json:"-"` SketchPath string `protobuf:"bytes,3,opt,name=sketch_path,json=sketchPath,proto3" json:"sketch_path,omitempty"`
// Duration in seconds to search the given URI for a connected board before
// timing out. The default value is 5 seconds.
SearchTimeout string `protobuf:"bytes,4,opt,name=search_timeout,json=searchTimeout,proto3" json:"search_timeout,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *BoardAttachReq) Reset() { *m = BoardAttachReq{} } func (m *BoardAttachReq) Reset() { *m = BoardAttachReq{} }
...@@ -793,6 +848,7 @@ func (m *BoardAttachReq) GetSearchTimeout() string { ...@@ -793,6 +848,7 @@ func (m *BoardAttachReq) GetSearchTimeout() string {
} }
type BoardAttachResp struct { type BoardAttachResp struct {
// Description of the current stage of the board attachment.
TaskProgress *TaskProgress `protobuf:"bytes,1,opt,name=task_progress,json=taskProgress,proto3" json:"task_progress,omitempty"` TaskProgress *TaskProgress `protobuf:"bytes,1,opt,name=task_progress,json=taskProgress,proto3" json:"task_progress,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -832,6 +888,7 @@ func (m *BoardAttachResp) GetTaskProgress() *TaskProgress { ...@@ -832,6 +888,7 @@ func (m *BoardAttachResp) GetTaskProgress() *TaskProgress {
} }
type BoardListReq struct { type BoardListReq struct {
// Arduino Core Service instance from the `Init` response.
Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -871,6 +928,7 @@ func (m *BoardListReq) GetInstance() *Instance { ...@@ -871,6 +928,7 @@ func (m *BoardListReq) GetInstance() *Instance {
} }
type BoardListResp struct { type BoardListResp struct {
// List of ports and the boards detected on those ports.
Ports []*DetectedPort `protobuf:"bytes,1,rep,name=ports,proto3" json:"ports,omitempty"` Ports []*DetectedPort `protobuf:"bytes,1,rep,name=ports,proto3" json:"ports,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -910,9 +968,13 @@ func (m *BoardListResp) GetPorts() []*DetectedPort { ...@@ -910,9 +968,13 @@ func (m *BoardListResp) GetPorts() []*DetectedPort {
} }
type DetectedPort struct { type DetectedPort struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // Address of the port (e.g., `serial:///dev/ttyACM0`).
Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
ProtocolLabel string `protobuf:"bytes,3,opt,name=protocol_label,json=protocolLabel,proto3" json:"protocol_label,omitempty"` // Protocol of the port (e.g., `serial`).
Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
// A human friendly description of the protocol (e.g., "Serial Port (USB)").
ProtocolLabel string `protobuf:"bytes,3,opt,name=protocol_label,json=protocolLabel,proto3" json:"protocol_label,omitempty"`
// The boards attached to the port.
Boards []*BoardListItem `protobuf:"bytes,4,rep,name=boards,proto3" json:"boards,omitempty"` Boards []*BoardListItem `protobuf:"bytes,4,rep,name=boards,proto3" json:"boards,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -973,11 +1035,13 @@ func (m *DetectedPort) GetBoards() []*BoardListItem { ...@@ -973,11 +1035,13 @@ func (m *DetectedPort) GetBoards() []*BoardListItem {
} }
type BoardListAllReq struct { type BoardListAllReq struct {
Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` // Arduino Core Service instance from the `Init` response.
SearchArgs []string `protobuf:"bytes,2,rep,name=search_args,json=searchArgs,proto3" json:"search_args,omitempty"` Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` // The search query to filter the board list by.
XXX_unrecognized []byte `json:"-"` SearchArgs []string `protobuf:"bytes,2,rep,name=search_args,json=searchArgs,proto3" json:"search_args,omitempty"`
XXX_sizecache int32 `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *BoardListAllReq) Reset() { *m = BoardListAllReq{} } func (m *BoardListAllReq) Reset() { *m = BoardListAllReq{} }
...@@ -1020,6 +1084,7 @@ func (m *BoardListAllReq) GetSearchArgs() []string { ...@@ -1020,6 +1084,7 @@ func (m *BoardListAllReq) GetSearchArgs() []string {
} }
type BoardListAllResp struct { type BoardListAllResp struct {
// List of installed boards.
Boards []*BoardListItem `protobuf:"bytes,1,rep,name=boards,proto3" json:"boards,omitempty"` Boards []*BoardListItem `protobuf:"bytes,1,rep,name=boards,proto3" json:"boards,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
...@@ -1059,7 +1124,9 @@ func (m *BoardListAllResp) GetBoards() []*BoardListItem { ...@@ -1059,7 +1124,9 @@ func (m *BoardListAllResp) GetBoards() []*BoardListItem {
} }
type BoardListItem struct { type BoardListItem struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The name for use when identifying the board to a human.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The fully qualified board name. Used to identify the board to a machine.
FQBN string `protobuf:"bytes,2,opt,name=FQBN,proto3" json:"FQBN,omitempty"` FQBN string `protobuf:"bytes,2,opt,name=FQBN,proto3" json:"FQBN,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
......
...@@ -22,122 +22,189 @@ option go_package = "github.com/arduino/arduino-cli/rpc/commands"; ...@@ -22,122 +22,189 @@ option go_package = "github.com/arduino/arduino-cli/rpc/commands";
import "commands/common.proto"; import "commands/common.proto";
message BoardDetailsReq { message BoardDetailsReq {
// Arduino Core Service instance from the `Init` response.
Instance instance = 1; Instance instance = 1;
// The fully qualified board name of the board you want information about
// (e.g., `arduino:avr:uno`).
string fqbn = 2; string fqbn = 2;
} }
message BoardDetailsResp { message BoardDetailsResp {
// The fully qualified board name of the board.
string fqbn = 1; string fqbn = 1;
// Name used to identify the board to humans (e.g., Arduino/Genuino Uno).
string name = 2; string name = 2;
// Installed version of the board's platform.
string version = 3; string version = 3;
// The board ID component of the FQBN (e.g., `uno`).
string propertiesId = 4; string propertiesId = 4;
// Board alias that can be used as a more user friendly alternative to the
// FQBN.
string alias = 5; string alias = 5;
// Whether this is an official or 3rd party board.
bool official = 6; bool official = 6;
// URL of the board's pinout documentation.
string pinout = 7; string pinout = 7;
// Data about the package that contains the board's platform.
Package package = 8; Package package = 8;
// Data about the board's platform.
BoardPlatform platform = 9; BoardPlatform platform = 9;
// Tool dependencies of the board.
repeated ToolsDependencies toolsDependencies = 10; repeated ToolsDependencies toolsDependencies = 10;
// The board's custom configuration options.
repeated ConfigOption config_options = 11; repeated ConfigOption config_options = 11;
// Identifying information for the board (e.g., USB VID/PID).
repeated IdentificationPref identification_pref = 12; repeated IdentificationPref identification_pref = 12;
} }
message IdentificationPref { message IdentificationPref {
// Identifying information for USB-connected boards.
USBID usbID = 1; USBID usbID = 1;
} }
message USBID { message USBID {
// USB vendor ID.
string VID = 1; string VID = 1;
// USB product ID.
string PID = 2; string PID = 2;
} }
message Package { message Package {
// Maintainer of the package.
string maintainer = 1; string maintainer = 1;
// The URL of the platforms index file
// (e.g., https://downloads.arduino.cc/packages/package_index.json).
string url = 2; string url = 2;
// A URL provided by the package author, intended to point to their website.
string websiteURL = 3; string websiteURL = 3;
// Email address of the package maintainer.
string email = 4; string email = 4;
// Package vendor name.
string name = 5; string name = 5;
// Resources for getting help about using the package.
Help help = 6; Help help = 6;
} }
message Help { message Help {
// URL for getting online help.
string online = 1; string online = 1;
} }
message BoardPlatform { message BoardPlatform {
// Architecture of the platform (e.g., `avr`).
string architecture = 1; string architecture = 1;
// Category of the platform. Set to `Contributed` for 3rd party platforms.
string category = 2; string category = 2;
// Download URL of the platform archive file.
string url = 3; string url = 3;
// File name of the platform archive.
string archiveFileName = 4; string archiveFileName = 4;
// Checksum of the platform archive.
string checksum = 5; string checksum = 5;
// File size of the platform archive.
int64 size = 6; int64 size = 6;
// Name used to identify the platform to humans.
string name = 7; string name = 7;
} }
message ToolsDependencies { message ToolsDependencies {
// Vendor name of the package containing the tool definition.
string packager = 1; string packager = 1;
// Tool name.
string name = 2; string name = 2;
// Tool version.
string version = 3; string version = 3;
// Data for the operating system-specific builds of the tool.
repeated Systems systems = 4; repeated Systems systems = 4;
} }
message Systems { message Systems {
// Checksum of the tool archive.
string checksum = 1; string checksum = 1;
// Operating system identifier.
string host = 2; string host = 2;
// File name of the tool archive.
string archiveFileName = 3; string archiveFileName = 3;
// Download URL of the tool archive.
string url = 4; string url = 4;
// File size of the tool archive.
int64 size = 5; int64 size = 5;
} }
message ConfigOption { message ConfigOption {
// ID of the configuration option. For identifying the option to machines.
string option = 1; string option = 1;
// Name of the configuration option for identifying the option to humans.
string option_label = 2; string option_label = 2;
// Possible values of the configuration option.
repeated ConfigValue values = 3; repeated ConfigValue values = 3;
} }
message ConfigValue { message ConfigValue {
// The configuration option value.
string value = 1; string value = 1;
// Label to identify the configuration option to humans.
string value_label = 2; string value_label = 2;
// Whether the configuration option is selected.
bool selected = 3; bool selected = 3;
} }
message BoardAttachReq { message BoardAttachReq {
// Arduino Core Service instance from the `Init` response.
Instance instance = 1; Instance instance = 1;
// The board's URI (e.g., /dev/ttyACM0).
string board_uri = 2; string board_uri = 2;
// Path of the sketch to attach the board to. The board attachment
// metadata will be saved to `{sketch_path}/sketch.json`.
string sketch_path = 3; string sketch_path = 3;
// Duration in seconds to search the given URI for a connected board before
// timing out. The default value is 5 seconds.
string search_timeout = 4; string search_timeout = 4;
} }
message BoardAttachResp { message BoardAttachResp {
// Description of the current stage of the board attachment.
TaskProgress task_progress = 1; TaskProgress task_progress = 1;
} }
message BoardListReq { message BoardListReq {
// Arduino Core Service instance from the `Init` response.
Instance instance = 1; Instance instance = 1;
} }
message BoardListResp { message BoardListResp {
// List of ports and the boards detected on those ports.
repeated DetectedPort ports = 1; repeated DetectedPort ports = 1;
} }
message DetectedPort { message DetectedPort {
// Address of the port (e.g., `serial:///dev/ttyACM0`).
string address = 1; string address = 1;
// Protocol of the port (e.g., `serial`).
string protocol = 2; string protocol = 2;
// A human friendly description of the protocol (e.g., "Serial Port (USB)").
string protocol_label = 3; string protocol_label = 3;
// The boards attached to the port.
repeated BoardListItem boards = 4; repeated BoardListItem boards = 4;
} }
message BoardListAllReq { message BoardListAllReq {
// Arduino Core Service instance from the `Init` response.
Instance instance = 1; Instance instance = 1;
// The search query to filter the board list by.
repeated string search_args = 2; repeated string search_args = 2;
} }
message BoardListAllResp { message BoardListAllResp {
// List of installed boards.
repeated BoardListItem boards = 1; repeated BoardListItem boards = 1;
} }
message BoardListItem { message BoardListItem {
// The name for use when identifying the board to a human.
string name = 1; string name = 1;
// The fully qualified board name. Used to identify the board to a machine.
string FQBN = 2; string FQBN = 2;
} }
...@@ -641,8 +641,12 @@ type ArduinoCoreClient interface { ...@@ -641,8 +641,12 @@ type ArduinoCoreClient interface {
Version(ctx context.Context, in *VersionReq, opts ...grpc.CallOption) (*VersionResp, error) Version(ctx context.Context, in *VersionReq, opts ...grpc.CallOption) (*VersionResp, error)
// Requests details about a board // Requests details about a board
BoardDetails(ctx context.Context, in *BoardDetailsReq, opts ...grpc.CallOption) (*BoardDetailsResp, error) BoardDetails(ctx context.Context, in *BoardDetailsReq, opts ...grpc.CallOption) (*BoardDetailsResp, error)
// Attach a board to a sketch. When the `fqbn` field of a request is not
// provided, the FQBN of the attached board will be used.
BoardAttach(ctx context.Context, in *BoardAttachReq, opts ...grpc.CallOption) (ArduinoCore_BoardAttachClient, error) BoardAttach(ctx context.Context, in *BoardAttachReq, opts ...grpc.CallOption) (ArduinoCore_BoardAttachClient, error)
// List the boards currently connected to the computer.
BoardList(ctx context.Context, in *BoardListReq, opts ...grpc.CallOption) (*BoardListResp, error) BoardList(ctx context.Context, in *BoardListReq, opts ...grpc.CallOption) (*BoardListResp, error)
// List all the boards provided by installed platforms.
BoardListAll(ctx context.Context, in *BoardListAllReq, opts ...grpc.CallOption) (*BoardListAllResp, error) BoardListAll(ctx context.Context, in *BoardListAllReq, opts ...grpc.CallOption) (*BoardListAllResp, error)
Compile(ctx context.Context, in *CompileReq, opts ...grpc.CallOption) (ArduinoCore_CompileClient, error) Compile(ctx context.Context, in *CompileReq, opts ...grpc.CallOption) (ArduinoCore_CompileClient, error)
// Download and install a platform and its tool dependencies. // Download and install a platform and its tool dependencies.
...@@ -1240,8 +1244,12 @@ type ArduinoCoreServer interface { ...@@ -1240,8 +1244,12 @@ type ArduinoCoreServer interface {
Version(context.Context, *VersionReq) (*VersionResp, error) Version(context.Context, *VersionReq) (*VersionResp, error)
// Requests details about a board // Requests details about a board
BoardDetails(context.Context, *BoardDetailsReq) (*BoardDetailsResp, error) BoardDetails(context.Context, *BoardDetailsReq) (*BoardDetailsResp, error)
// Attach a board to a sketch. When the `fqbn` field of a request is not
// provided, the FQBN of the attached board will be used.
BoardAttach(*BoardAttachReq, ArduinoCore_BoardAttachServer) error BoardAttach(*BoardAttachReq, ArduinoCore_BoardAttachServer) error
// List the boards currently connected to the computer.
BoardList(context.Context, *BoardListReq) (*BoardListResp, error) BoardList(context.Context, *BoardListReq) (*BoardListResp, error)
// List all the boards provided by installed platforms.
BoardListAll(context.Context, *BoardListAllReq) (*BoardListAllResp, error) BoardListAll(context.Context, *BoardListAllReq) (*BoardListAllResp, error)
Compile(*CompileReq, ArduinoCore_CompileServer) error Compile(*CompileReq, ArduinoCore_CompileServer) error
// Download and install a platform and its tool dependencies. // Download and install a platform and its tool dependencies.
......
...@@ -55,10 +55,14 @@ service ArduinoCore { ...@@ -55,10 +55,14 @@ service ArduinoCore {
// Requests details about a board // Requests details about a board
rpc BoardDetails(BoardDetailsReq) returns (BoardDetailsResp); rpc BoardDetails(BoardDetailsReq) returns (BoardDetailsResp);
// Attach a board to a sketch. When the `fqbn` field of a request is not
// provided, the FQBN of the attached board will be used.
rpc BoardAttach(BoardAttachReq) returns (stream BoardAttachResp); rpc BoardAttach(BoardAttachReq) returns (stream BoardAttachResp);
// List the boards currently connected to the computer.
rpc BoardList(BoardListReq) returns (BoardListResp); rpc BoardList(BoardListReq) returns (BoardListResp);
// List all the boards provided by installed platforms.
rpc BoardListAll(BoardListAllReq) returns (BoardListAllResp); rpc BoardListAll(BoardListAllReq) returns (BoardListAllResp);
rpc Compile(CompileReq) returns (stream CompileResp); rpc Compile(CompileReq) returns (stream CompileResp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment