diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index ecd248e00..49d774e2b 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -149,7 +149,7 @@ ], "arduino": { "cli": { - "version": "0.19.1" + "version": "0.20.0" }, "fwuploader": { "version": "2.0.0" diff --git a/arduino-ide-extension/src/browser/boards/boards-config.tsx b/arduino-ide-extension/src/browser/boards/boards-config.tsx index 083fa6124..dd2e82989 100644 --- a/arduino-ide-extension/src/browser/boards/boards-config.tsx +++ b/arduino-ide-extension/src/browser/boards/boards-config.tsx @@ -10,8 +10,12 @@ import { BoardWithPackage, } from '../../common/protocol/boards-service'; import { NotificationCenter } from '../notification-center'; -import { BoardsServiceProvider } from './boards-service-provider'; +import { + AvailableBoard, + BoardsServiceProvider, +} from './boards-service-provider'; import { nls } from '@theia/core/lib/browser/nls'; +import { naturalCompare } from '../../common/utils'; export namespace BoardsConfig { export interface Config { @@ -184,11 +188,50 @@ export class BoardsConfig extends React.Component< .filter(notEmpty); } + protected get availableBoards(): AvailableBoard[] { + return this.props.boardsServiceProvider.availableBoards; + } + protected queryPorts = async ( availablePorts: MaybePromise = this.availablePorts ) => { - const ports = await availablePorts; - return { knownPorts: ports.sort(Port.compare) }; + // Available ports must be sorted in this order: + // 1. Serial with recognized boards + // 2. Serial with guessed boards + // 3. Serial with incomplete boards + // 4. Network with recognized boards + // 5. Other protocols with recognized boards + const ports = (await availablePorts).sort((left: Port, right: Port) => { + if (left.protocol === 'serial' && right.protocol !== 'serial') { + return -1; + } else if (left.protocol !== 'serial' && right.protocol === 'serial') { + return 1; + } else if (left.protocol === 'network' && right.protocol !== 'network') { + return -1; + } else if (left.protocol !== 'network' && right.protocol === 'network') { + return 1; + } else if (left.protocol === right.protocol) { + // We show ports, including those that have guessed + // or unrecognized boards, so we must sort those too. + const leftBoard = this.availableBoards.find((board) => + Port.sameAs(board.port, left) + ); + const rightBoard = this.availableBoards.find((board) => + Port.sameAs(board.port, right) + ); + if (leftBoard && !rightBoard) { + return -1; + } else if (!leftBoard && rightBoard) { + return 1; + } else if (leftBoard?.state! < rightBoard?.state!) { + return -1; + } else if (leftBoard?.state! > rightBoard?.state!) { + return 1; + } + } + return naturalCompare(left.address, right.address); + }); + return { knownPorts: ports }; }; protected toggleFilterPorts = () => { @@ -281,8 +324,24 @@ export class BoardsConfig extends React.Component< } protected renderPorts(): React.ReactNode { - const filter = this.state.showAllPorts ? () => true : Port.isBoardPort; - const ports = this.state.knownPorts.filter(filter); + let ports = [] as Port[]; + if (this.state.showAllPorts) { + ports = this.state.knownPorts; + } else { + ports = this.state.knownPorts.filter((port) => { + if (port.protocol === 'serial') { + return true; + } + // All other ports with different protocol are + // only shown if there is a recognized board + // connected + for (const board of this.availableBoards) { + if (board.port?.address === port.address) { + return true; + } + } + }); + } return !ports.length ? (
No ports discovered
) : ( diff --git a/arduino-ide-extension/src/browser/boards/boards-service-provider.ts b/arduino-ide-extension/src/browser/boards/boards-service-provider.ts index b9f5fd0e9..97c660e87 100644 --- a/arduino-ide-extension/src/browser/boards/boards-service-provider.ts +++ b/arduino-ide-extension/src/browser/boards/boards-service-provider.ts @@ -42,6 +42,7 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { protected readonly onAvailableBoardsChangedEmitter = new Emitter< AvailableBoard[] >(); + protected readonly onAvailablePortsChangedEmitter = new Emitter(); /** * Used for the auto-reconnecting. Sometimes, the attached board gets disconnected after uploading something to it. @@ -67,8 +68,8 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { * This event is also emitted when the board package for the currently selected board was uninstalled. */ readonly onBoardsConfigChanged = this.onBoardsConfigChangedEmitter.event; - readonly onAvailableBoardsChanged = - this.onAvailableBoardsChangedEmitter.event; + readonly onAvailableBoardsChanged = this.onAvailableBoardsChangedEmitter.event; + readonly onAvailablePortsChanged = this.onAvailablePortsChangedEmitter.event; onStart(): void { this.notificationCenter.onAttachedBoardsChanged( @@ -88,6 +89,7 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { ]).then(([attachedBoards, availablePorts]) => { this._attachedBoards = attachedBoards; this._availablePorts = availablePorts; + this.onAvailablePortsChangedEmitter.fire(this._availablePorts); this.reconcileAvailableBoards().then(() => this.tryReconnect()); }); } @@ -102,6 +104,7 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { } this._attachedBoards = event.newState.boards; this._availablePorts = event.newState.ports; + this.onAvailablePortsChangedEmitter.fire(this._availablePorts); this.reconcileAvailableBoards().then(() => this.tryReconnect()); } @@ -180,8 +183,8 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { const selectedAvailableBoard = AvailableBoard.is(selectedBoard) ? selectedBoard : this._availableBoards.find((availableBoard) => - Board.sameAs(availableBoard, selectedBoard) - ); + Board.sameAs(availableBoard, selectedBoard) + ); if ( selectedAvailableBoard && selectedAvailableBoard.selected && @@ -358,14 +361,14 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { const timeoutTask = !!timeout && timeout > 0 ? new Promise((_, reject) => - setTimeout( - () => reject(new Error(`Timeout after ${timeout} ms.`)), - timeout - ) + setTimeout( + () => reject(new Error(`Timeout after ${timeout} ms.`)), + timeout ) + ) : new Promise(() => { - /* never */ - }); + /* never */ + }); const waitUntilTask = new Promise((resolve) => { let candidate = find(what, this.availableBoards); if (candidate) { @@ -384,7 +387,6 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { } protected async reconcileAvailableBoards(): Promise { - const attachedBoards = this._attachedBoards; const availablePorts = this._availablePorts; // Unset the port on the user's config, if it is not available anymore. if ( @@ -402,51 +404,64 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { const boardsConfig = this.boardsConfig; const currentAvailableBoards = this._availableBoards; const availableBoards: AvailableBoard[] = []; - const availableBoardPorts = availablePorts.filter(Port.isBoardPort); - const attachedSerialBoards = attachedBoards.filter(({ port }) => !!port); + const attachedBoards = this._attachedBoards.filter(({ port }) => !!port); + const availableBoardPorts = availablePorts.filter((port) => { + if (port.protocol === "serial") { + // We always show all serial ports, even if there + // is no recognized board connected to it + return true; + } + + // All other ports with different protocol are + // only shown if there is a recognized board + // connected + for (const board of attachedBoards) { + if (board.port?.address === port.address) { + return true; + } + } + return false; + }); for (const boardPort of availableBoardPorts) { - let state = AvailableBoard.State.incomplete; // Initial pessimism. - let board = attachedSerialBoards.find(({ port }) => - Port.sameAs(boardPort, port) - ); + let board = attachedBoards.find(({ port }) => Port.sameAs(boardPort, port)); + const lastSelectedBoard = await this.getLastSelectedBoardOnPort(boardPort); + + let availableBoard = {} as AvailableBoard; if (board) { - state = AvailableBoard.State.recognized; - } else { + availableBoard = { + ...board, + state: AvailableBoard.State.recognized, + selected: BoardsConfig.Config.sameAs(boardsConfig, board), + port: boardPort, + }; + } else if (lastSelectedBoard) { // If the selected board is not recognized because it is a 3rd party board: https://github.com/arduino/arduino-cli/issues/623 // We still want to show it without the red X in the boards toolbar: https://github.com/arduino/arduino-pro-ide/issues/198#issuecomment-599355836 - const lastSelectedBoard = await this.getLastSelectedBoardOnPort( - boardPort - ); - if (lastSelectedBoard) { - board = { - ...lastSelectedBoard, - port: boardPort, - }; - state = AvailableBoard.State.guessed; - } - } - if (!board) { - availableBoards.push({ - name: nls.localize('arduino/common/unknown', 'Unknown'), + availableBoard = { + ...lastSelectedBoard, + state: AvailableBoard.State.guessed, + selected: BoardsConfig.Config.sameAs(boardsConfig, lastSelectedBoard), port: boardPort, - state, - }); + }; } else { - const selected = BoardsConfig.Config.sameAs(boardsConfig, board); - availableBoards.push({ - ...board, - state, - selected, + availableBoard = { + name: nls.localize('arduino/common/unknown', 'Unknown'), port: boardPort, - }); + state: AvailableBoard.State.incomplete, + }; } + availableBoards.push(availableBoard); } - if ( - boardsConfig.selectedBoard && - !availableBoards.some(({ selected }) => selected) - ) { + if (boardsConfig.selectedBoard && !availableBoards.some(({ selected }) => selected)) { + // If the selected board has the same port of an unknown board + // that is already in availableBoards we might get a duplicate port. + // So we remove the one already in the array and add the selected one. + const found = availableBoards.findIndex(board => board.port?.address === boardsConfig.selectedPort?.address); + if (found >= 0) { + availableBoards.splice(found, 1); + } availableBoards.push({ ...boardsConfig.selectedBoard, port: boardsConfig.selectedPort, @@ -455,28 +470,20 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { }); } - const sortedAvailableBoards = availableBoards.sort(AvailableBoard.compare); - let hasChanged = - sortedAvailableBoards.length !== currentAvailableBoards.length; - for (let i = 0; !hasChanged && i < sortedAvailableBoards.length; i++) { - hasChanged = - AvailableBoard.compare( - sortedAvailableBoards[i], - currentAvailableBoards[i] - ) !== 0; + availableBoards.sort(AvailableBoard.compare); + + let hasChanged = availableBoards.length !== currentAvailableBoards.length; + for (let i = 0; !hasChanged && i < availableBoards.length; i++) { + const [left, right] = [availableBoards[i], currentAvailableBoards[i]]; + hasChanged = !!AvailableBoard.compare(left, right) || left.selected !== right.selected; } if (hasChanged) { - this._availableBoards = sortedAvailableBoards; + this._availableBoards = availableBoards; this.onAvailableBoardsChangedEmitter.fire(this._availableBoards); } } - protected async getLastSelectedBoardOnPort( - port: Port | string | undefined - ): Promise { - if (!port) { - return undefined; - } + protected async getLastSelectedBoardOnPort(port: Port): Promise { const key = this.getLastSelectedBoardOnPortKey(port); return this.getData(key); } @@ -497,11 +504,8 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { ]); } - protected getLastSelectedBoardOnPortKey(port: Port | string): string { - // TODO: we lose the port's `protocol` info (`serial`, `network`, etc.) here if the `port` is a `string`. - return `last-selected-board-on-port:${ - typeof port === 'string' ? port : Port.toString(port) - }`; + protected getLastSelectedBoardOnPortKey(port: Port): string { + return `last-selected-board-on-port:${Port.toString(port)}`; } protected async loadState(): Promise { @@ -585,35 +589,30 @@ export namespace AvailableBoard { return !!board.port; } + // Available boards must be sorted in this order: + // 1. Serial with recognized boards + // 2. Serial with guessed boards + // 3. Serial with incomplete boards + // 4. Network with recognized boards + // 5. Other protocols with recognized boards export const compare = (left: AvailableBoard, right: AvailableBoard) => { - if (left.selected && !right.selected) { + if (left.port?.protocol === "serial" && right.port?.protocol !== "serial") { return -1; - } - if (right.selected && !left.selected) { + } else if (left.port?.protocol !== "serial" && right.port?.protocol === "serial") { return 1; - } - let result = naturalCompare(left.name, right.name); - if (result !== 0) { - return result; - } - if (left.fqbn && right.fqbn) { - result = naturalCompare(left.fqbn, right.fqbn); - if (result !== 0) { - return result; - } - } - if (left.port && right.port) { - result = Port.compare(left.port, right.port); - if (result !== 0) { - return result; - } - } - if (!!left.selected && !right.selected) { + } else if (left.port?.protocol === "network" && right.port?.protocol !== "network") { return -1; - } - if (!!right.selected && !left.selected) { + } else if (left.port?.protocol !== "network" && right.port?.protocol === "network") { return 1; + } else if (left.port?.protocol === right.port?.protocol) { + // We show all ports, including those that have guessed + // or unrecognized boards, so we must sort those too. + if (left.state < right.state) { + return -1; + } else if (left.state > right.state) { + return 1; + } } - return left.state - right.state; - }; + return naturalCompare(left.port?.address!, right.port?.address!); + } } diff --git a/arduino-ide-extension/src/browser/boards/boards-toolbar-item.tsx b/arduino-ide-extension/src/browser/boards/boards-toolbar-item.tsx index ffc7f9d66..b55ec33a7 100644 --- a/arduino-ide-extension/src/browser/boards/boards-toolbar-item.tsx +++ b/arduino-ide-extension/src/browser/boards/boards-toolbar-item.tsx @@ -50,6 +50,10 @@ export class BoardsDropDown extends React.Component { if (coords === 'hidden') { return ''; } + const footerLabel = nls.localize( + 'arduino/board/openBoardsConfig', + 'Select other board and port…' + ); return (
{ ...coords, }} > - {this.renderItem({ - label: 'Select Other Board & Port', - onClick: () => this.props.openBoardsConfig(), - })} {items .map(({ name, port, selected, onClick }) => ({ - label: `${name} at ${Port.toString(port)}`, + label: nls.localize( + 'arduino/board/boardListItem', + '{0} at {1}', + name, + Port.toString(port) + ), selected, onClick, })) .map(this.renderItem)} +
this.props.openBoardsConfig()} + > +
{footerLabel}
+
); } diff --git a/arduino-ide-extension/src/browser/contributions/board-selection.ts b/arduino-ide-extension/src/browser/contributions/board-selection.ts index a401164d5..eb8237c7b 100644 --- a/arduino-ide-extension/src/browser/contributions/board-selection.ts +++ b/arduino-ide-extension/src/browser/contributions/board-selection.ts @@ -110,6 +110,9 @@ PID: ${PID}`; this.boardsServiceProvider.onAvailableBoardsChanged( this.updateMenus.bind(this) ); + this.boardsServiceProvider.onAvailablePortsChanged( + this.updateMenus.bind(this) + ); } protected async updateMenus(): Promise { @@ -247,19 +250,25 @@ PID: ${PID}`; } // Installed ports - const registerPorts = (ports: AvailablePorts) => { + const registerPorts = ( + protocol: string, + protocolOrder: number, + ports: AvailablePorts + ) => { const addresses = Object.keys(ports); if (!addresses.length) { return; } // Register placeholder for protocol - const [port] = ports[addresses[0]]; - const protocol = port.protocol; - const menuPath = [...portsSubmenuPath, protocol]; + const menuPath = [ + ...portsSubmenuPath, + `${protocolOrder.toString()}_${protocol}`, + ]; const placeholder = new PlaceholderMenuNode( menuPath, - `${firstToUpperCase(port.protocol)} ports` + `${firstToUpperCase(protocol)} ports`, + { order: protocolOrder.toString() } ); this.menuModelRegistry.registerMenuNode(menuPath, placeholder); this.toDisposeBeforeMenuRebuild.push( @@ -268,63 +277,76 @@ PID: ${PID}`; ) ); - for (const address of addresses) { - if (!!ports[address]) { - const [port, boards] = ports[address]; - if (!boards.length) { - boards.push({ - name: '', - }); - } - for (const { name, fqbn } of boards) { - const id = `arduino-select-port--${address}${ - fqbn ? `--${fqbn}` : '' - }`; - const command = { id }; - const handler = { - execute: () => { - if ( - !Port.equals( - port, - this.boardsServiceProvider.boardsConfig.selectedPort - ) - ) { - this.boardsServiceProvider.boardsConfig = { - selectedBoard: - this.boardsServiceProvider.boardsConfig.selectedBoard, - selectedPort: port, - }; - } - }, - isToggled: () => - Port.equals( - port, - this.boardsServiceProvider.boardsConfig.selectedPort - ), - }; - const label = `${address}${name ? ` (${name})` : ''}`; - const menuAction = { - commandId: id, - label, - order: `1${label}`, // `1` comes after the placeholder which has order `0` - }; - this.commandRegistry.registerCommand(command, handler); - this.toDisposeBeforeMenuRebuild.push( - Disposable.create(() => - this.commandRegistry.unregisterCommand(command) - ) - ); - this.menuModelRegistry.registerMenuAction(menuPath, menuAction); - } + // First we show addresses with recognized boards connected, + // then all the rest. + const sortedAddresses = Object.keys(ports); + sortedAddresses.sort((left: string, right: string): number => { + const [, leftBoards] = ports[left]; + const [, rightBoards] = ports[right]; + return rightBoards.length - leftBoards.length; + }); + + for (let i = 0; i < sortedAddresses.length; i++) { + const address = sortedAddresses[i]; + const [port, boards] = ports[address]; + let label = `${address}`; + if (boards.length) { + const boardsList = boards.map((board) => board.name).join(', '); + label = `${label} (${boardsList})`; } + const id = `arduino-select-port--${address}`; + const command = { id }; + const handler = { + execute: () => { + if ( + !Port.equals( + port, + this.boardsServiceProvider.boardsConfig.selectedPort + ) + ) { + this.boardsServiceProvider.boardsConfig = { + selectedBoard: + this.boardsServiceProvider.boardsConfig.selectedBoard, + selectedPort: port, + }; + } + }, + isToggled: () => + Port.equals( + port, + this.boardsServiceProvider.boardsConfig.selectedPort + ), + }; + const menuAction = { + commandId: id, + label, + order: `${protocolOrder + i + 1}`, + }; + this.commandRegistry.registerCommand(command, handler); + this.toDisposeBeforeMenuRebuild.push( + Disposable.create(() => + this.commandRegistry.unregisterCommand(command) + ) + ); + this.menuModelRegistry.registerMenuAction(menuPath, menuAction); } }; - const { serial, network, unknown } = - AvailablePorts.groupByProtocol(availablePorts); - registerPorts(serial); - registerPorts(network); - registerPorts(unknown); + const grouped = AvailablePorts.byProtocol(availablePorts); + let protocolOrder = 100; + // We first show serial and network ports, then all the rest + ['serial', 'network'].forEach((protocol) => { + const ports = grouped.get(protocol); + if (ports) { + registerPorts(protocol, protocolOrder, ports); + grouped.delete(protocol); + protocolOrder = protocolOrder + 100; + } + }); + grouped.forEach((ports, protocol) => { + registerPorts(protocol, protocolOrder, ports); + protocolOrder = protocolOrder + 100; + }); this.mainMenuManager.update(); } diff --git a/arduino-ide-extension/src/browser/style/boards-config-dialog.css b/arduino-ide-extension/src/browser/style/boards-config-dialog.css index afeb5b4ce..fe8c1b934 100644 --- a/arduino-ide-extension/src/browser/style/boards-config-dialog.css +++ b/arduino-ide-extension/src/browser/style/boards-config-dialog.css @@ -1,224 +1,237 @@ div#select-board-dialog { - margin: 5px; + margin: 5px; } div#select-board-dialog .selectBoardContainer .body { - display: flex; - overflow: hidden; + display: flex; + overflow: hidden; } .select-board-dialog .head { - margin: 5px; + margin: 5px; } div.dialogContent.select-board-dialog > div.head .title { - font-weight: 400; - letter-spacing: .02em; - font-size: 1.2em; - color: var(--theia-arduino-branding-primary); - margin-bottom: 10px; + font-weight: 400; + letter-spacing: 0.02em; + font-size: 1.2em; + color: var(--theia-arduino-branding-primary); + margin-bottom: 10px; } div#select-board-dialog .selectBoardContainer .body .list .item.selected { - background: var(--theia-secondaryButton-hoverBackground); + background: var(--theia-secondaryButton-hoverBackground); } div#select-board-dialog .selectBoardContainer .body .list .item.selected i { - color: var(--theia-arduino-branding-primary); + color: var(--theia-arduino-branding-primary); } #select-board-dialog .selectBoardContainer .search, #select-board-dialog .selectBoardContainer .search input, #select-board-dialog .selectBoardContainer .list, #select-board-dialog .selectBoardContainer .list { - background: var(--theia-editor-background); + background: var(--theia-editor-background); } #select-board-dialog .selectBoardContainer .body .search input { - border: none; - width: 100%; - height: auto; - max-height: 37px; - padding: 10px 5px 10px 10px; - margin: 0; - vertical-align: top; - display: flex; - color: var(--theia-editor-foreground); + border: none; + width: 100%; + height: auto; + max-height: 37px; + padding: 10px 5px 10px 10px; + margin: 0; + vertical-align: top; + display: flex; + color: var(--theia-editor-foreground); } #select-board-dialog .selectBoardContainer .body .search input:focus { - box-shadow: none; + box-shadow: none; } #select-board-dialog .selectBoardContainer .body .container { - flex: 1; - padding: 0px 10px 0px 0px; - min-width: 240px; - max-width: 240px; + flex: 1; + padding: 0px 10px 0px 0px; + min-width: 240px; + max-width: 240px; } #select-board-dialog .selectBoardContainer .body .left.container .content { - margin: 0 5px 0 0; + margin: 0 5px 0 0; } #select-board-dialog .selectBoardContainer .body .right.container .content { - margin: 0 0 0 5px; + margin: 0 0 0 5px; } #select-board-dialog .selectBoardContainer .body .container .content .title { - color: #7f8c8d; - padding: 0px 0px 10px 0px; - text-transform: uppercase; + color: #7f8c8d; + padding: 0px 0px 10px 0px; + text-transform: uppercase; } #select-board-dialog .selectBoardContainer .body .container .content .footer { - padding: 10px 5px 10px 0px; + padding: 10px 5px 10px 0px; } #select-board-dialog .selectBoardContainer .body .container .content .loading { - font-size: var(--theia-ui-font-size1); - color: var(--theia-arduino-branding-secondary); - padding: 10px 5px 10px 10px; - text-transform: uppercase; - /* The max, min-height comes from `.body .list` 200px + 47px top padding - 2 * 10px top padding */ - max-height: 227px; - min-height: 227px; + font-size: var(--theia-ui-font-size1); + color: var(--theia-arduino-branding-secondary); + padding: 10px 5px 10px 10px; + text-transform: uppercase; + /* The max, min-height comes from `.body .list` 200px + 47px top padding - 2 * 10px top padding */ + max-height: 227px; + min-height: 227px; } #select-board-dialog .selectBoardContainer .body .list .item { - padding: 10px 5px 10px 10px; - display: flex; - justify-content: end; - white-space: nowrap; - overflow-x: hidden; + padding: 10px 5px 10px 10px; + display: flex; + justify-content: end; + white-space: nowrap; + overflow-x: hidden; } #select-board-dialog .selectBoardContainer .body .list .item .selected-icon { - margin-left: auto; + margin-left: auto; } #select-board-dialog .selectBoardContainer .body .list .item .details { - font-size: var(--theia-ui-font-size1); - opacity: var(--theia-mod-disabled-opacity); - width: 155px; /* used heuristics for the calculation */ - white-space: pre; - overflow: hidden; - text-overflow: ellipsis; + font-size: var(--theia-ui-font-size1); + opacity: var(--theia-mod-disabled-opacity); + width: 155px; /* used heuristics for the calculation */ + white-space: pre; + overflow: hidden; + text-overflow: ellipsis; } #select-board-dialog .selectBoardContainer .body .list .item.missing { - opacity: var(--theia-mod-disabled-opacity); + opacity: var(--theia-mod-disabled-opacity); } #select-board-dialog .selectBoardContainer .body .list .item:hover { - background: var(--theia-secondaryButton-hoverBackground); + background: var(--theia-secondaryButton-hoverBackground); } #select-board-dialog .selectBoardContainer .body .list .label { - max-width: 215px; - width: 215px; - white-space: pre; - overflow: hidden; - text-overflow: ellipsis; + max-width: 215px; + width: 215px; + white-space: pre; + overflow: hidden; + text-overflow: ellipsis; } #select-board-dialog .selectBoardContainer .body .list { - max-height: 200px; - min-height: 200px; - overflow-y: auto; + max-height: 200px; + min-height: 200px; + overflow-y: auto; } #select-board-dialog .selectBoardContainer .body .ports.list { - margin: 47px 0px 0px 0px /* 47 is 37 as input height for the `Boards`, plus 10 margin bottom. */ + margin: 47px 0px 0px 0px; /* 47 is 37 as input height for the `Boards`, plus 10 margin bottom. */ } #select-board-dialog .selectBoardContainer .body .search { - margin-bottom: 10px; - display: flex; - align-items: center; - padding-right: 5px; + margin-bottom: 10px; + display: flex; + align-items: center; + padding-right: 5px; } .p-Widget.dialogOverlay .dialogContent.select-board-dialog { - width: 500px; + width: 500px; } .arduino-boards-toolbar-item-container { - margin-left: 3px; + margin-left: 3px; } -.arduino-boards-toolbar-item-container .arduino-boards-toolbar-item .inner-container { - display: flex; - align-items: baseline; - width: 100%; +.arduino-boards-toolbar-item-container + .arduino-boards-toolbar-item + .inner-container { + display: flex; + align-items: baseline; + width: 100%; } -.arduino-boards-toolbar-item-container .arduino-boards-toolbar-item .inner-container .notAttached { - width: 10px; - height: 10px; - color: red; - margin: 0 5px; +.arduino-boards-toolbar-item-container + .arduino-boards-toolbar-item + .inner-container + .notAttached { + width: 10px; + height: 10px; + color: red; + margin: 0 5px; } -.arduino-boards-toolbar-item-container .arduino-boards-toolbar-item .inner-container .guessed { - width: 10px; - height: 10px; - color: var(--theia-warningBackground); - margin: 0 5px; +.arduino-boards-toolbar-item-container + .arduino-boards-toolbar-item + .inner-container + .guessed { + width: 10px; + height: 10px; + color: var(--theia-warningBackground); + margin: 0 5px; } .arduino-boards-toolbar-item-container { - display: flex; - align-items: center; - width: 220px; + display: flex; + align-items: center; + width: 220px; } .arduino-boards-toolbar-item .label { - height: 100%; - display: flex; - align-items: center; - margin: 0 5px; - width: 100%; + height: 100%; + display: flex; + align-items: center; + margin: 0 5px; + width: 100%; } .arduino-boards-toolbar-item .caret { - width: 10px; - margin-right: 5px; + width: 10px; + margin-right: 5px; } .arduino-boards-toolbar-item { - background: var(--theia-tab-unfocusedActiveBackground); - color: var(--theia-foreground); - height: 22px; - display: flex; - width: 100%; - overflow: hidden; - margin: 0px 3px 0px 3px; - border: 1px solid var(--theia-dropdown-border); + background: var(--theia-tab-unfocusedActiveBackground); + color: var(--theia-foreground); + height: 22px; + display: flex; + width: 100%; + overflow: hidden; + margin: 0px 3px 0px 3px; + border: 1px solid var(--theia-dropdown-border); } .arduino-boards-dropdown-list { - border: 3px solid var(--theia-activityBar-background); - margin: -1px; - z-index: 1; - border: 1px solid var(--theia-dropdown-border); + border: 3px solid var(--theia-activityBar-background); + margin: -1px; + z-index: 1; + border: 1px solid var(--theia-dropdown-border); } .arduino-boards-dropdown-item { - font-size: var(--theia-ui-font-size1); - display: flex; - padding: 10px; - cursor: pointer; - color: var(--theia-foreground); - background: var(--theia-tab-unfocusedActiveBackground); - border: 1px solid var(--theia-tab-unfocusedActiveBackground); + font-size: var(--theia-ui-font-size1); + display: flex; + padding: 10px; + cursor: pointer; + color: var(--theia-foreground); + background: var(--theia-tab-unfocusedActiveBackground); + border: 1px solid var(--theia-tab-unfocusedActiveBackground); } .arduino-boards-dropdown-item .fa-check { - color: var(--theia-arduino-branding-primary); - align-self: center; + color: var(--theia-arduino-branding-primary); + align-self: center; } .arduino-boards-dropdown-item.selected, .arduino-boards-dropdown-item:hover { - border: 1px solid var(--theia-focusBorder); + border: 1px solid var(--theia-focusBorder); +} + +.arduino-board-dropdown-footer { + color: var(--theia-arduino-branding-primary); + border-top: 1px solid var(--theia-dropdown-border); } diff --git a/arduino-ide-extension/src/common/protocol/boards-service.ts b/arduino-ide-extension/src/common/protocol/boards-service.ts index 3dec69b6f..714b00374 100644 --- a/arduino-ide-extension/src/common/protocol/boards-service.ts +++ b/arduino-ide-extension/src/common/protocol/boards-service.ts @@ -1,4 +1,3 @@ -import { isWindows, isOSX } from '@theia/core/lib/common/os'; import { naturalCompare } from './../utils'; import { Searchable } from './searchable'; import { Installable } from './installable'; @@ -6,26 +5,18 @@ import { ArduinoComponent } from './arduino-component'; export type AvailablePorts = Record]>; export namespace AvailablePorts { - export function groupByProtocol(availablePorts: AvailablePorts): { - serial: AvailablePorts; - network: AvailablePorts; - unknown: AvailablePorts; - } { - const serial: AvailablePorts = {}; - const network: AvailablePorts = {}; - const unknown: AvailablePorts = {}; - for (const key of Object.keys(availablePorts)) { - const [port, boards] = availablePorts[key]; - const { protocol } = port; - if (protocol === 'serial') { - serial[key] = [port, boards]; - } else if (protocol === 'network') { - network[key] = [port, boards]; - } else { - unknown[key] = [port, boards]; + export function byProtocol(availablePorts: AvailablePorts): Map { + const grouped = new Map(); + for (const address of Object.keys(availablePorts)) { + const [port, boards] = availablePorts[address]; + let ports = grouped.get(port.protocol); + if (!ports) { + ports = {} as AvailablePorts; } + ports[address] = [port, boards]; + grouped.set(port.protocol, ports); } - return { serial, network, unknown }; + return grouped; } } @@ -134,7 +125,7 @@ export const BoardsServicePath = '/services/boards-service'; export const BoardsService = Symbol('BoardsService'); export interface BoardsService extends Installable, - Searchable { + Searchable { /** * Deprecated. `getState` should be used to correctly map a board with a port. * @deprecated @@ -156,26 +147,13 @@ export interface BoardsService export interface Port { readonly address: string; - readonly protocol: Port.Protocol; + readonly protocol: string; /** * Optional label for the protocol. For example: `Serial Port (USB)`. */ readonly label?: string; } export namespace Port { - export type Protocol = 'serial' | 'network' | 'unknown'; - export namespace Protocol { - export function toProtocol(protocol: string | undefined): Protocol { - if (protocol === 'serial') { - return 'serial'; - } else if (protocol === 'network') { - return 'network'; - } else { - return 'unknown'; - } - } - } - export function is(arg: any): arg is Port { return ( !!arg && @@ -197,25 +175,20 @@ export namespace Port { } export function compare(left: Port, right: Port): number { - // Board ports have higher priorities, they come first. - if (isBoardPort(left) && !isBoardPort(right)) { + // Ports must be sorted in this order: + // 1. Serial + // 2. Network + // 3. Other protocols + if (left.protocol === "serial" && right.protocol !== "serial") { return -1; - } - if (!isBoardPort(left) && isBoardPort(right)) { + } else if (left.protocol !== "serial" && right.protocol === "serial") { + return 1; + } else if (left.protocol === "network" && right.protocol !== "network") { + return -1; + } else if (left.protocol !== "network" && right.protocol === "network") { return 1; } - let result = naturalCompare( - left.protocol.toLocaleLowerCase(), - right.protocol.toLocaleLowerCase() - ); - if (result !== 0) { - return result; - } - result = naturalCompare(left.address, right.address); - if (result !== 0) { - return result; - } - return naturalCompare(left.label || '', right.label || ''); + return naturalCompare(left.address!, right.address!); } export function equals( @@ -232,78 +205,14 @@ export namespace Port { return left === right; } - // Based on: https://github.com/arduino/Arduino/blob/93581b03d723e55c60caedb4729ffc6ea808fe78/arduino-core/src/processing/app/SerialPortList.java#L48-L74 - export function isBoardPort(port: Port): boolean { - const address = port.address.toLocaleLowerCase(); - if (isWindows) { - // `COM1` seems to be the default serial port on Windows. - return address !== 'COM1'.toLocaleLowerCase(); - } - // On macOS and Linux, the port should start with `/dev/`. - if (!address.startsWith('/dev/')) { - return false; - } - if (isOSX) { - // Example: `/dev/cu.usbmodem14401` - if (/(tty|cu)\..*/i.test(address.substring('/dev/'.length))) { - return [ - '/dev/cu.MALS', - '/dev/cu.SOC', - '/dev/cu.Bluetooth-Incoming-Port', - ] - .map((a) => a.toLocaleLowerCase()) - .every((a) => a !== address); - } - } - - // Example: `/dev/ttyACM0` - if ( - /(ttyS|ttyUSB|ttyACM|ttyAMA|rfcomm|ttyO)[0-9]{1,3}/i.test( - address.substring('/dev/'.length) - ) - ) { - // Default ports were `/dev/ttyS0` -> `/dev/ttyS31` on Ubuntu 16.04.2. - if (address.startsWith('/dev/ttyS')) { - const index = Number.parseInt( - address.substring('/dev/ttyS'.length), - 10 - ); - if (!Number.isNaN(index) && 0 <= index && 31 >= index) { - return false; - } - } - return true; - } - - return false; - } - export function sameAs( left: Port | undefined, right: Port | string | undefined ) { if (left && right) { - if (left.protocol !== 'serial') { - console.log( - `Unexpected protocol for 'left' port: ${JSON.stringify( - left - )}. Ignoring 'protocol', comparing 'addresses' with ${JSON.stringify( - right - )}.` - ); - } if (typeof right === 'string') { return left.address === right; } - if (right.protocol !== 'serial') { - console.log( - `Unexpected protocol for 'right' port: ${JSON.stringify( - right - )}. Ignoring 'protocol', comparing 'addresses' with ${JSON.stringify( - left - )}.` - ); - } return left.address === right.address; } return false; diff --git a/arduino-ide-extension/src/node/board-discovery.ts b/arduino-ide-extension/src/node/board-discovery.ts index d168aea2e..8a639e07e 100644 --- a/arduino-ide-extension/src/node/board-discovery.ts +++ b/arduino-ide-extension/src/node/board-discovery.ts @@ -95,11 +95,9 @@ export class BoardDiscovery extends CoreClientAware { const newState = deepClone(this._state); const address = (detectedPort as any).getPort().getAddress(); - const protocol = Port.Protocol.toProtocol( - (detectedPort as any).getPort().getProtocol() - ); - // const label = detectedPort.getProtocolLabel(); - const port = { address, protocol }; + const protocol = (detectedPort as any).getPort().getProtocol(); + const label = (detectedPort as any).getPort().getLabel();; + const port = { address, protocol, label }; const boards: Board[] = []; for (const item of detectedPort.getMatchingBoardsList()) { boards.push({ @@ -110,7 +108,7 @@ export class BoardDiscovery extends CoreClientAware { } if (eventType === 'add') { - if (newState[port.address] !== undefined) { + if (newState[port.address]) { const [, knownBoards] = newState[port.address]; console.warn( `Port '${port.address}' was already available. Known boards before override: ${JSON.stringify( @@ -120,7 +118,7 @@ export class BoardDiscovery extends CoreClientAware { } newState[port.address] = [port, boards]; } else if (eventType === 'remove') { - if (newState[port.address] === undefined) { + if (!newState[port.address]) { console.warn(`Port '${port.address}' was not available. Skipping`); return; } @@ -161,7 +159,6 @@ export class BoardDiscovery extends CoreClientAware { getAvailablePorts(state: AvailablePorts = this.state): Port[] { const availablePorts: Port[] = []; for (const address of Object.keys(state)) { - // tslint:disable-next-line: whitespace const [port] = state[address]; availablePorts.push(port); } diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts index b8e1e2cf9..8b39c5085 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.d.ts @@ -735,4 +735,4 @@ export namespace BoardSearchResponse { export type AsObject = { boardsList: Array, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js index d498dc1ce..3753037cb 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/board_pb.js @@ -5474,4 +5474,4 @@ proto.cc.arduino.cli.commands.v1.BoardSearchResponse.prototype.clearBoardsList = }; -goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts index a7b28fc65..9f34ff24f 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.d.ts @@ -12,6 +12,7 @@ import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino import * as cc_arduino_cli_commands_v1_board_pb from "../../../../../cc/arduino/cli/commands/v1/board_pb"; import * as cc_arduino_cli_commands_v1_compile_pb from "../../../../../cc/arduino/cli/commands/v1/compile_pb"; import * as cc_arduino_cli_commands_v1_core_pb from "../../../../../cc/arduino/cli/commands/v1/core_pb"; +import * as cc_arduino_cli_commands_v1_monitor_pb from "../../../../../cc/arduino/cli/commands/v1/monitor_pb"; import * as cc_arduino_cli_commands_v1_upload_pb from "../../../../../cc/arduino/cli/commands/v1/upload_pb"; import * as cc_arduino_cli_commands_v1_lib_pb from "../../../../../cc/arduino/cli/commands/v1/lib_pb"; @@ -25,6 +26,7 @@ interface IArduinoCoreServiceService extends grpc.ServiceDefinition { @@ -136,6 +141,15 @@ interface IArduinoCoreServiceService_IVersion extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface IArduinoCoreServiceService_INewSketch extends grpc.MethodDefinition { + path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/NewSketch"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface IArduinoCoreServiceService_ILoadSketch extends grpc.MethodDefinition { path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/LoadSketch"; requestStream: false; @@ -271,6 +285,15 @@ interface IArduinoCoreServiceService_IUploadUsingProgrammer extends grpc.MethodD responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } +interface IArduinoCoreServiceService_ISupportedUserFields extends grpc.MethodDefinition { + path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/SupportedUserFields"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface IArduinoCoreServiceService_IListProgrammersAvailableForUpload extends grpc.MethodDefinition { path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/ListProgrammersAvailableForUpload"; requestStream: false; @@ -388,6 +411,24 @@ interface IArduinoCoreServiceService_ILibraryList extends grpc.MethodDefinition< responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } +interface IArduinoCoreServiceService_IMonitor extends grpc.MethodDefinition { + path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/Monitor"; + requestStream: true; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreServiceService_IEnumerateMonitorPortSettings extends grpc.MethodDefinition { + path: "/cc.arduino.cli.commands.v1.ArduinoCoreService/EnumerateMonitorPortSettings"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} export const ArduinoCoreServiceService: IArduinoCoreServiceService; @@ -401,6 +442,7 @@ export interface IArduinoCoreServiceServer { outdated: grpc.handleUnaryCall; upgrade: grpc.handleServerStreamingCall; version: grpc.handleUnaryCall; + newSketch: grpc.handleUnaryCall; loadSketch: grpc.handleUnaryCall; archiveSketch: grpc.handleUnaryCall; boardDetails: grpc.handleUnaryCall; @@ -416,6 +458,7 @@ export interface IArduinoCoreServiceServer { platformUpgrade: grpc.handleServerStreamingCall; upload: grpc.handleServerStreamingCall; uploadUsingProgrammer: grpc.handleServerStreamingCall; + supportedUserFields: grpc.handleUnaryCall; listProgrammersAvailableForUpload: grpc.handleUnaryCall; burnBootloader: grpc.handleServerStreamingCall; platformSearch: grpc.handleUnaryCall; @@ -429,6 +472,8 @@ export interface IArduinoCoreServiceServer { libraryResolveDependencies: grpc.handleUnaryCall; librarySearch: grpc.handleUnaryCall; libraryList: grpc.handleUnaryCall; + monitor: grpc.handleBidiStreamingCall; + enumerateMonitorPortSettings: grpc.handleUnaryCall; } export interface IArduinoCoreServiceClient { @@ -454,6 +499,9 @@ export interface IArduinoCoreServiceClient { version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; + newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; + newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; + newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; @@ -491,6 +539,9 @@ export interface IArduinoCoreServiceClient { upload(request: cc_arduino_cli_commands_v1_upload_pb.UploadRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; uploadUsingProgrammer(request: cc_arduino_cli_commands_v1_upload_pb.UploadUsingProgrammerRequest, options?: Partial): grpc.ClientReadableStream; uploadUsingProgrammer(request: cc_arduino_cli_commands_v1_upload_pb.UploadUsingProgrammerRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; + supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; + supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; @@ -523,6 +574,12 @@ export interface IArduinoCoreServiceClient { libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; + monitor(): grpc.ClientDuplexStream; + monitor(options: Partial): grpc.ClientDuplexStream; + monitor(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; + enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; + enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; } export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCoreServiceClient { @@ -549,6 +606,9 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor public version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; public version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; public version(request: cc_arduino_cli_commands_v1_commands_pb.VersionRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.VersionResponse) => void): grpc.ClientUnaryCall; + public newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; + public newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; + public newSketch(request: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse) => void): grpc.ClientUnaryCall; public loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; public loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; public loadSketch(request: cc_arduino_cli_commands_v1_commands_pb.LoadSketchRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse) => void): grpc.ClientUnaryCall; @@ -585,6 +645,9 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor public upload(request: cc_arduino_cli_commands_v1_upload_pb.UploadRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; public uploadUsingProgrammer(request: cc_arduino_cli_commands_v1_upload_pb.UploadUsingProgrammerRequest, options?: Partial): grpc.ClientReadableStream; public uploadUsingProgrammer(request: cc_arduino_cli_commands_v1_upload_pb.UploadUsingProgrammerRequest, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; + public supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; + public supportedUserFields(request: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse) => void): grpc.ClientUnaryCall; public listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; public listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; public listProgrammersAvailableForUpload(request: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_upload_pb.ListProgrammersAvailableForUploadResponse) => void): grpc.ClientUnaryCall; @@ -617,4 +680,9 @@ export class ArduinoCoreServiceClient extends grpc.Client implements IArduinoCor public libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; public libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; public libraryList(request: cc_arduino_cli_commands_v1_lib_pb.LibraryListRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_lib_pb.LibraryListResponse) => void): grpc.ClientUnaryCall; -} \ No newline at end of file + public monitor(options?: Partial): grpc.ClientDuplexStream; + public monitor(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; + public enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; + public enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; + public enumerateMonitorPortSettings(request: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse) => void): grpc.ClientUnaryCall; +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js index 33d095b2c..8358c89e2 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_grpc_pb.js @@ -23,6 +23,7 @@ var cc_arduino_cli_commands_v1_common_pb = require('../../../../../cc/arduino/cl var cc_arduino_cli_commands_v1_board_pb = require('../../../../../cc/arduino/cli/commands/v1/board_pb.js'); var cc_arduino_cli_commands_v1_compile_pb = require('../../../../../cc/arduino/cli/commands/v1/compile_pb.js'); var cc_arduino_cli_commands_v1_core_pb = require('../../../../../cc/arduino/cli/commands/v1/core_pb.js'); +var cc_arduino_cli_commands_v1_monitor_pb = require('../../../../../cc/arduino/cli/commands/v1/monitor_pb.js'); var cc_arduino_cli_commands_v1_upload_pb = require('../../../../../cc/arduino/cli/commands/v1/upload_pb.js'); var cc_arduino_cli_commands_v1_lib_pb = require('../../../../../cc/arduino/cli/commands/v1/lib_pb.js'); @@ -268,6 +269,28 @@ function deserialize_cc_arduino_cli_commands_v1_DestroyResponse(buffer_arg) { return cc_arduino_cli_commands_v1_commands_pb.DestroyResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsRequest(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsRequest(buffer_arg) { + return cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsResponse(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsResponse(buffer_arg) { + return cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_cc_arduino_cli_commands_v1_GitLibraryInstallRequest(arg) { if (!(arg instanceof cc_arduino_cli_commands_v1_lib_pb.GitLibraryInstallRequest)) { throw new Error('Expected argument of type cc.arduino.cli.commands.v1.GitLibraryInstallRequest'); @@ -510,6 +533,50 @@ function deserialize_cc_arduino_cli_commands_v1_LoadSketchResponse(buffer_arg) { return cc_arduino_cli_commands_v1_commands_pb.LoadSketchResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_cc_arduino_cli_commands_v1_MonitorRequest(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_monitor_pb.MonitorRequest)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.MonitorRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_MonitorRequest(buffer_arg) { + return cc_arduino_cli_commands_v1_monitor_pb.MonitorRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_MonitorResponse(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_monitor_pb.MonitorResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.MonitorResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_MonitorResponse(buffer_arg) { + return cc_arduino_cli_commands_v1_monitor_pb.MonitorResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_NewSketchRequest(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.NewSketchRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_NewSketchRequest(buffer_arg) { + return cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_NewSketchResponse(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.NewSketchResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_NewSketchResponse(buffer_arg) { + return cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_cc_arduino_cli_commands_v1_OutdatedRequest(arg) { if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.OutdatedRequest)) { throw new Error('Expected argument of type cc.arduino.cli.commands.v1.OutdatedRequest'); @@ -664,6 +731,28 @@ function deserialize_cc_arduino_cli_commands_v1_PlatformUpgradeResponse(buffer_a return cc_arduino_cli_commands_v1_core_pb.PlatformUpgradeResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_cc_arduino_cli_commands_v1_SupportedUserFieldsRequest(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SupportedUserFieldsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_SupportedUserFieldsRequest(buffer_arg) { + return cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cc_arduino_cli_commands_v1_SupportedUserFieldsResponse(arg) { + if (!(arg instanceof cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse)) { + throw new Error('Expected argument of type cc.arduino.cli.commands.v1.SupportedUserFieldsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cc_arduino_cli_commands_v1_SupportedUserFieldsResponse(buffer_arg) { + return cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_cc_arduino_cli_commands_v1_UpdateCoreLibrariesIndexRequest(arg) { if (!(arg instanceof cc_arduino_cli_commands_v1_commands_pb.UpdateCoreLibrariesIndexRequest)) { throw new Error('Expected argument of type cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexRequest'); @@ -952,6 +1041,18 @@ version: { responseSerialize: serialize_cc_arduino_cli_commands_v1_VersionResponse, responseDeserialize: deserialize_cc_arduino_cli_commands_v1_VersionResponse, }, + // Create a new Sketch +newSketch: { + path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/NewSketch', + requestStream: false, + responseStream: false, + requestType: cc_arduino_cli_commands_v1_commands_pb.NewSketchRequest, + responseType: cc_arduino_cli_commands_v1_commands_pb.NewSketchResponse, + requestSerialize: serialize_cc_arduino_cli_commands_v1_NewSketchRequest, + requestDeserialize: deserialize_cc_arduino_cli_commands_v1_NewSketchRequest, + responseSerialize: serialize_cc_arduino_cli_commands_v1_NewSketchResponse, + responseDeserialize: deserialize_cc_arduino_cli_commands_v1_NewSketchResponse, + }, // Returns all files composing a Sketch loadSketch: { path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/LoadSketch', @@ -1138,6 +1239,19 @@ uploadUsingProgrammer: { responseSerialize: serialize_cc_arduino_cli_commands_v1_UploadUsingProgrammerResponse, responseDeserialize: deserialize_cc_arduino_cli_commands_v1_UploadUsingProgrammerResponse, }, + // Returns the list of users fields necessary to upload to that board +// using the specified protocol. +supportedUserFields: { + path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/SupportedUserFields', + requestStream: false, + responseStream: false, + requestType: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsRequest, + responseType: cc_arduino_cli_commands_v1_upload_pb.SupportedUserFieldsResponse, + requestSerialize: serialize_cc_arduino_cli_commands_v1_SupportedUserFieldsRequest, + requestDeserialize: deserialize_cc_arduino_cli_commands_v1_SupportedUserFieldsRequest, + responseSerialize: serialize_cc_arduino_cli_commands_v1_SupportedUserFieldsResponse, + responseDeserialize: deserialize_cc_arduino_cli_commands_v1_SupportedUserFieldsResponse, + }, // List programmers available for a board. listProgrammersAvailableForUpload: { path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/ListProgrammersAvailableForUpload', @@ -1296,7 +1410,31 @@ libraryList: { responseSerialize: serialize_cc_arduino_cli_commands_v1_LibraryListResponse, responseDeserialize: deserialize_cc_arduino_cli_commands_v1_LibraryListResponse, }, + // Open a monitor connection to a board port +monitor: { + path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/Monitor', + requestStream: true, + responseStream: true, + requestType: cc_arduino_cli_commands_v1_monitor_pb.MonitorRequest, + responseType: cc_arduino_cli_commands_v1_monitor_pb.MonitorResponse, + requestSerialize: serialize_cc_arduino_cli_commands_v1_MonitorRequest, + requestDeserialize: deserialize_cc_arduino_cli_commands_v1_MonitorRequest, + responseSerialize: serialize_cc_arduino_cli_commands_v1_MonitorResponse, + responseDeserialize: deserialize_cc_arduino_cli_commands_v1_MonitorResponse, + }, + // Returns the parameters that can be set in the MonitorRequest calls +enumerateMonitorPortSettings: { + path: '/cc.arduino.cli.commands.v1.ArduinoCoreService/EnumerateMonitorPortSettings', + requestStream: false, + responseStream: false, + requestType: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsRequest, + responseType: cc_arduino_cli_commands_v1_monitor_pb.EnumerateMonitorPortSettingsResponse, + requestSerialize: serialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsRequest, + requestDeserialize: deserialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsRequest, + responseSerialize: serialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsResponse, + responseDeserialize: deserialize_cc_arduino_cli_commands_v1_EnumerateMonitorPortSettingsResponse, + }, }; // BOOTSTRAP COMMANDS -// ------------------- \ No newline at end of file +// ------------------- diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts index f04366943..94ceab14f 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.d.ts @@ -10,6 +10,7 @@ import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino import * as cc_arduino_cli_commands_v1_board_pb from "../../../../../cc/arduino/cli/commands/v1/board_pb"; import * as cc_arduino_cli_commands_v1_compile_pb from "../../../../../cc/arduino/cli/commands/v1/compile_pb"; import * as cc_arduino_cli_commands_v1_core_pb from "../../../../../cc/arduino/cli/commands/v1/core_pb"; +import * as cc_arduino_cli_commands_v1_monitor_pb from "../../../../../cc/arduino/cli/commands/v1/monitor_pb"; import * as cc_arduino_cli_commands_v1_upload_pb from "../../../../../cc/arduino/cli/commands/v1/upload_pb"; import * as cc_arduino_cli_commands_v1_lib_pb from "../../../../../cc/arduino/cli/commands/v1/lib_pb"; @@ -489,6 +490,59 @@ export namespace VersionResponse { } } +export class NewSketchRequest extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined; + setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): NewSketchRequest; + + getSketchName(): string; + setSketchName(value: string): NewSketchRequest; + + getSketchDir(): string; + setSketchDir(value: string): NewSketchRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewSketchRequest.AsObject; + static toObject(includeInstance: boolean, msg: NewSketchRequest): NewSketchRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NewSketchRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewSketchRequest; + static deserializeBinaryFromReader(message: NewSketchRequest, reader: jspb.BinaryReader): NewSketchRequest; +} + +export namespace NewSketchRequest { + export type AsObject = { + instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject, + sketchName: string, + sketchDir: string, + } +} + +export class NewSketchResponse extends jspb.Message { + getMainFile(): string; + setMainFile(value: string): NewSketchResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewSketchResponse.AsObject; + static toObject(includeInstance: boolean, msg: NewSketchResponse): NewSketchResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NewSketchResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewSketchResponse; + static deserializeBinaryFromReader(message: NewSketchResponse, reader: jspb.BinaryReader): NewSketchResponse; +} + +export namespace NewSketchResponse { + export type AsObject = { + mainFile: string, + } +} + export class LoadSketchRequest extends jspb.Message { hasInstance(): boolean; @@ -604,4 +658,4 @@ export class ArchiveSketchResponse extends jspb.Message { export namespace ArchiveSketchResponse { export type AsObject = { } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js index 627897fda..1937aa229 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/commands_pb.js @@ -25,6 +25,8 @@ var cc_arduino_cli_commands_v1_compile_pb = require('../../../../../cc/arduino/c goog.object.extend(proto, cc_arduino_cli_commands_v1_compile_pb); var cc_arduino_cli_commands_v1_core_pb = require('../../../../../cc/arduino/cli/commands/v1/core_pb.js'); goog.object.extend(proto, cc_arduino_cli_commands_v1_core_pb); +var cc_arduino_cli_commands_v1_monitor_pb = require('../../../../../cc/arduino/cli/commands/v1/monitor_pb.js'); +goog.object.extend(proto, cc_arduino_cli_commands_v1_monitor_pb); var cc_arduino_cli_commands_v1_upload_pb = require('../../../../../cc/arduino/cli/commands/v1/upload_pb.js'); goog.object.extend(proto, cc_arduino_cli_commands_v1_upload_pb); var cc_arduino_cli_commands_v1_lib_pb = require('../../../../../cc/arduino/cli/commands/v1/lib_pb.js'); @@ -41,6 +43,8 @@ goog.exportSymbol('proto.cc.arduino.cli.commands.v1.InitResponse.MessageCase', n goog.exportSymbol('proto.cc.arduino.cli.commands.v1.InitResponse.Progress', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.v1.LoadSketchRequest', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.v1.LoadSketchResponse', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.NewSketchRequest', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.NewSketchResponse', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.v1.OutdatedRequest', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.v1.OutdatedResponse', null, global); goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UpdateCoreLibrariesIndexRequest', null, global); @@ -452,6 +456,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.cc.arduino.cli.commands.v1.VersionResponse.displayName = 'proto.cc.arduino.cli.commands.v1.VersionResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.NewSketchRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.NewSketchRequest.displayName = 'proto.cc.arduino.cli.commands.v1.NewSketchRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.NewSketchResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.NewSketchResponse.displayName = 'proto.cc.arduino.cli.commands.v1.NewSketchResponse'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -3508,6 +3554,347 @@ proto.cc.arduino.cli.commands.v1.VersionResponse.prototype.setVersion = function +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.NewSketchRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f), + sketchName: jspb.Message.getFieldWithDefault(msg, 2, ""), + sketchDir: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.NewSketchRequest; + return proto.cc.arduino.cli.commands.v1.NewSketchRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cc_arduino_cli_commands_v1_common_pb.Instance; + reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSketchName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSketchDir(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.NewSketchRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getSketchName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSketchDir(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.v1.Instance} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ ( + jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string sketch_name = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.getSketchName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.setSketchName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sketch_dir = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.getSketchDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.NewSketchRequest.prototype.setSketchDir = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.NewSketchResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.v1.NewSketchResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mainFile: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchResponse} + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.NewSketchResponse; + return proto.cc.arduino.cli.commands.v1.NewSketchResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.v1.NewSketchResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchResponse} + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMainFile(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.NewSketchResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.v1.NewSketchResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMainFile(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string main_file = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.prototype.getMainFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.NewSketchResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.NewSketchResponse.prototype.setMainFile = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -4291,4 +4678,4 @@ proto.cc.arduino.cli.commands.v1.ArchiveSketchResponse.serializeBinaryToWriter = }; -goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts index 77c274051..cec05ce33 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.d.ts @@ -386,4 +386,4 @@ export namespace PlatformListResponse { export type AsObject = { installedPlatformsList: Array, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js index b783b0521..6db0ad1b4 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/core_pb.js @@ -2816,4 +2816,4 @@ proto.cc.arduino.cli.commands.v1.PlatformListResponse.prototype.clearInstalledPl }; -goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.d.ts new file mode 100644 index 000000000..f19526ab3 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.d.ts @@ -0,0 +1,232 @@ +// package: cc.arduino.cli.commands.v1 +// file: cc/arduino/cli/commands/v1/monitor.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as cc_arduino_cli_commands_v1_common_pb from "../../../../../cc/arduino/cli/commands/v1/common_pb"; +import * as cc_arduino_cli_commands_v1_port_pb from "../../../../../cc/arduino/cli/commands/v1/port_pb"; + +export class MonitorRequest extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined; + setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): MonitorRequest; + + + hasPort(): boolean; + clearPort(): void; + getPort(): cc_arduino_cli_commands_v1_port_pb.Port | undefined; + setPort(value?: cc_arduino_cli_commands_v1_port_pb.Port): MonitorRequest; + + getFqbn(): string; + setFqbn(value: string): MonitorRequest; + + getTxData(): Uint8Array | string; + getTxData_asU8(): Uint8Array; + getTxData_asB64(): string; + setTxData(value: Uint8Array | string): MonitorRequest; + + + hasPortConfiguration(): boolean; + clearPortConfiguration(): void; + getPortConfiguration(): MonitorPortConfiguration | undefined; + setPortConfiguration(value?: MonitorPortConfiguration): MonitorRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MonitorRequest.AsObject; + static toObject(includeInstance: boolean, msg: MonitorRequest): MonitorRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MonitorRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MonitorRequest; + static deserializeBinaryFromReader(message: MonitorRequest, reader: jspb.BinaryReader): MonitorRequest; +} + +export namespace MonitorRequest { + export type AsObject = { + instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject, + port?: cc_arduino_cli_commands_v1_port_pb.Port.AsObject, + fqbn: string, + txData: Uint8Array | string, + portConfiguration?: MonitorPortConfiguration.AsObject, + } +} + +export class MonitorPortConfiguration extends jspb.Message { + clearSettingsList(): void; + getSettingsList(): Array; + setSettingsList(value: Array): MonitorPortConfiguration; + addSettings(value?: MonitorPortSetting, index?: number): MonitorPortSetting; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MonitorPortConfiguration.AsObject; + static toObject(includeInstance: boolean, msg: MonitorPortConfiguration): MonitorPortConfiguration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MonitorPortConfiguration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MonitorPortConfiguration; + static deserializeBinaryFromReader(message: MonitorPortConfiguration, reader: jspb.BinaryReader): MonitorPortConfiguration; +} + +export namespace MonitorPortConfiguration { + export type AsObject = { + settingsList: Array, + } +} + +export class MonitorResponse extends jspb.Message { + getError(): string; + setError(value: string): MonitorResponse; + + getRxData(): Uint8Array | string; + getRxData_asU8(): Uint8Array; + getRxData_asB64(): string; + setRxData(value: Uint8Array | string): MonitorResponse; + + clearAppliedSettingsList(): void; + getAppliedSettingsList(): Array; + setAppliedSettingsList(value: Array): MonitorResponse; + addAppliedSettings(value?: MonitorPortSetting, index?: number): MonitorPortSetting; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MonitorResponse.AsObject; + static toObject(includeInstance: boolean, msg: MonitorResponse): MonitorResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MonitorResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MonitorResponse; + static deserializeBinaryFromReader(message: MonitorResponse, reader: jspb.BinaryReader): MonitorResponse; +} + +export namespace MonitorResponse { + export type AsObject = { + error: string, + rxData: Uint8Array | string, + appliedSettingsList: Array, + } +} + +export class MonitorPortSetting extends jspb.Message { + getSettingId(): string; + setSettingId(value: string): MonitorPortSetting; + + getValue(): string; + setValue(value: string): MonitorPortSetting; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MonitorPortSetting.AsObject; + static toObject(includeInstance: boolean, msg: MonitorPortSetting): MonitorPortSetting.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MonitorPortSetting, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MonitorPortSetting; + static deserializeBinaryFromReader(message: MonitorPortSetting, reader: jspb.BinaryReader): MonitorPortSetting; +} + +export namespace MonitorPortSetting { + export type AsObject = { + settingId: string, + value: string, + } +} + +export class EnumerateMonitorPortSettingsRequest extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined; + setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): EnumerateMonitorPortSettingsRequest; + + getPortProtocol(): string; + setPortProtocol(value: string): EnumerateMonitorPortSettingsRequest; + + getFqbn(): string; + setFqbn(value: string): EnumerateMonitorPortSettingsRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumerateMonitorPortSettingsRequest.AsObject; + static toObject(includeInstance: boolean, msg: EnumerateMonitorPortSettingsRequest): EnumerateMonitorPortSettingsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumerateMonitorPortSettingsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumerateMonitorPortSettingsRequest; + static deserializeBinaryFromReader(message: EnumerateMonitorPortSettingsRequest, reader: jspb.BinaryReader): EnumerateMonitorPortSettingsRequest; +} + +export namespace EnumerateMonitorPortSettingsRequest { + export type AsObject = { + instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject, + portProtocol: string, + fqbn: string, + } +} + +export class EnumerateMonitorPortSettingsResponse extends jspb.Message { + clearSettingsList(): void; + getSettingsList(): Array; + setSettingsList(value: Array): EnumerateMonitorPortSettingsResponse; + addSettings(value?: MonitorPortSettingDescriptor, index?: number): MonitorPortSettingDescriptor; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumerateMonitorPortSettingsResponse.AsObject; + static toObject(includeInstance: boolean, msg: EnumerateMonitorPortSettingsResponse): EnumerateMonitorPortSettingsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumerateMonitorPortSettingsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumerateMonitorPortSettingsResponse; + static deserializeBinaryFromReader(message: EnumerateMonitorPortSettingsResponse, reader: jspb.BinaryReader): EnumerateMonitorPortSettingsResponse; +} + +export namespace EnumerateMonitorPortSettingsResponse { + export type AsObject = { + settingsList: Array, + } +} + +export class MonitorPortSettingDescriptor extends jspb.Message { + getSettingId(): string; + setSettingId(value: string): MonitorPortSettingDescriptor; + + getLabel(): string; + setLabel(value: string): MonitorPortSettingDescriptor; + + getType(): string; + setType(value: string): MonitorPortSettingDescriptor; + + clearEnumValuesList(): void; + getEnumValuesList(): Array; + setEnumValuesList(value: Array): MonitorPortSettingDescriptor; + addEnumValues(value: string, index?: number): string; + + getValue(): string; + setValue(value: string): MonitorPortSettingDescriptor; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MonitorPortSettingDescriptor.AsObject; + static toObject(includeInstance: boolean, msg: MonitorPortSettingDescriptor): MonitorPortSettingDescriptor.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MonitorPortSettingDescriptor, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MonitorPortSettingDescriptor; + static deserializeBinaryFromReader(message: MonitorPortSettingDescriptor, reader: jspb.BinaryReader): MonitorPortSettingDescriptor; +} + +export namespace MonitorPortSettingDescriptor { + export type AsObject = { + settingId: string, + label: string, + type: string, + enumValuesList: Array, + value: string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.js new file mode 100644 index 000000000..8583f3388 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/monitor_pb.js @@ -0,0 +1,1724 @@ +// source: cc/arduino/cli/commands/v1/monitor.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cc_arduino_cli_commands_v1_common_pb = require('../../../../../cc/arduino/cli/commands/v1/common_pb.js'); +goog.object.extend(proto, cc_arduino_cli_commands_v1_common_pb); +var cc_arduino_cli_commands_v1_port_pb = require('../../../../../cc/arduino/cli/commands/v1/port_pb.js'); +goog.object.extend(proto, cc_arduino_cli_commands_v1_port_pb); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortSetting', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorRequest', null, global); +goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.MonitorRequest.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.MonitorResponse.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.MonitorResponse.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSetting = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorPortSetting, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.MonitorPortSetting.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortSetting'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.displayName = 'proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.displayName = 'proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.MonitorRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.v1.MonitorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f), + port: (f = msg.getPort()) && cc_arduino_cli_commands_v1_port_pb.Port.toObject(includeInstance, f), + fqbn: jspb.Message.getFieldWithDefault(msg, 3, ""), + txData: msg.getTxData_asB64(), + portConfiguration: (f = msg.getPortConfiguration()) && proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.MonitorRequest; + return proto.cc.arduino.cli.commands.v1.MonitorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.v1.MonitorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cc_arduino_cli_commands_v1_common_pb.Instance; + reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = new cc_arduino_cli_commands_v1_port_pb.Port; + reader.readMessage(value,cc_arduino_cli_commands_v1_port_pb.Port.deserializeBinaryFromReader); + msg.setPort(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFqbn(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxData(value); + break; + case 5: + var value = new proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration; + reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinaryFromReader); + msg.setPortConfiguration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.MonitorRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.v1.MonitorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getPort(); + if (f != null) { + writer.writeMessage( + 2, + f, + cc_arduino_cli_commands_v1_port_pb.Port.serializeBinaryToWriter + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getTxData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getPortConfiguration(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.v1.Instance} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ ( + jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Port port = 2; + * @return {?proto.cc.arduino.cli.commands.v1.Port} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getPort = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.Port} */ ( + jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_port_pb.Port, 2)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.Port|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.setPort = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.clearPort = function() { + return this.setPort(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.hasPort = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string fqbn = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bytes tx_data = 4; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getTxData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes tx_data = 4; + * This is a type-conversion wrapper around `getTxData()` + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getTxData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxData())); +}; + + +/** + * optional bytes tx_data = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxData()` + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getTxData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.setTxData = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional MonitorPortConfiguration port_configuration = 5; + * @return {?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getPortConfiguration = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} */ ( + jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration, 5)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.setPortConfiguration = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.clearPortConfiguration = function() { + return this.setPortConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.hasPortConfiguration = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject = function(includeInstance, msg) { + var f, obj = { + settingsList: jspb.Message.toObjectList(msg.getSettingsList(), + proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration; + return proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.v1.MonitorPortSetting; + reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinaryFromReader); + msg.addSettings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSettingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated MonitorPortSetting settings = 1; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.getSettingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} returns this +*/ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.setSettingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.addSettings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.clearSettingsList = function() { + return this.setSettingsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.MonitorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.v1.MonitorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + error: jspb.Message.getFieldWithDefault(msg, 1, ""), + rxData: msg.getRxData_asB64(), + appliedSettingsList: jspb.Message.toObjectList(msg.getAppliedSettingsList(), + proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.MonitorResponse; + return proto.cc.arduino.cli.commands.v1.MonitorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.v1.MonitorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setError(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRxData(value); + break; + case 3: + var value = new proto.cc.arduino.cli.commands.v1.MonitorPortSetting; + reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinaryFromReader); + msg.addAppliedSettings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.MonitorResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.v1.MonitorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRxData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getAppliedSettingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string error = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes rx_data = 2; + * @return {!(string|Uint8Array)} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getRxData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes rx_data = 2; + * This is a type-conversion wrapper around `getRxData()` + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getRxData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRxData())); +}; + + +/** + * optional bytes rx_data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRxData()` + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getRxData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRxData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.setRxData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated MonitorPortSetting applied_settings = 3; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getAppliedSettingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this +*/ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.setAppliedSettingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.addAppliedSettings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.clearAppliedSettingsList = function() { + return this.setAppliedSettingsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject = function(includeInstance, msg) { + var f, obj = { + settingId: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.MonitorPortSetting; + return proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSettingId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSettingId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string setting_id = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.getSettingId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.setSettingId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string value = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f), + portProtocol: jspb.Message.getFieldWithDefault(msg, 2, ""), + fqbn: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest; + return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cc_arduino_cli_commands_v1_common_pb.Instance; + reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPortProtocol(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFqbn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getPortProtocol(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.cc.arduino.cli.commands.v1.Instance} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.getInstance = function() { + return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ ( + jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1)); +}; + + +/** + * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} returns this +*/ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.setInstance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.clearInstance = function() { + return this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string port_protocol = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.getPortProtocol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.setPortProtocol = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string fqbn = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest} returns this + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.setFqbn = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + settingsList: jspb.Message.toObjectList(msg.getSettingsList(), + proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse; + return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor; + reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.deserializeBinaryFromReader); + msg.addSettings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSettingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated MonitorPortSettingDescriptor settings = 1; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.prototype.getSettingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse} returns this +*/ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.prototype.setSettingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.prototype.addSettings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse} returns this + */ +proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.prototype.clearSettingsList = function() { + return this.setSettingsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + settingId: jspb.Message.getFieldWithDefault(msg, 1, ""), + label: jspb.Message.getFieldWithDefault(msg, 2, ""), + type: jspb.Message.getFieldWithDefault(msg, 3, ""), + enumValuesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, + value: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor; + return proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSettingId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addEnumValues(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSettingId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEnumValuesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string setting_id = 1; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getSettingId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.setSettingId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string label = 2; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string type = 3; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated string enum_values = 4; + * @return {!Array} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getEnumValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.setEnumValuesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.addEnumValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.clearEnumValuesList = function() { + return this.setEnumValuesList([]); +}; + + +/** + * optional string value = 5; + * @return {string} + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this + */ +proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.d.ts index ee504921f..233f0d59f 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.d.ts @@ -43,4 +43,4 @@ export namespace Port { propertiesMap: Array<[string, string]>, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.js index 1178f61b0..6b8eacaee 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/port_pb.js @@ -290,4 +290,4 @@ proto.cc.arduino.cli.commands.v1.Port.prototype.clearPropertiesMap = function() return this;}; -goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.d.ts index 73c5bf59e..4427473a6 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.d.ts @@ -444,4 +444,4 @@ export namespace SupportedUserFieldsResponse { export type AsObject = { userFieldsList: Array, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.js index 9bc9637ee..8841575ad 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/commands/v1/upload_pb.js @@ -3275,4 +3275,4 @@ proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.prototype.clearUser }; -goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.commands.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts index 965b7c9b1..ad1daba69 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.d.ts @@ -57,4 +57,4 @@ export class DebugServiceClient extends grpc.Client implements IDebugServiceClie public getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; public getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; public getDebugConfig(request: cc_arduino_cli_debug_v1_debug_pb.DebugConfigRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: cc_arduino_cli_debug_v1_debug_pb.GetDebugConfigResponse) => void): grpc.ClientUnaryCall; -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js index 2f628af5c..829ca77d3 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_grpc_pb.js @@ -92,3 +92,4 @@ debug: { responseDeserialize: deserialize_cc_arduino_cli_debug_v1_GetDebugConfigResponse, }, }; + diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.d.ts index 32b7c9b4d..7f353d557 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.d.ts @@ -171,4 +171,4 @@ export namespace GetDebugConfigResponse { serverConfigurationMap: Array<[string, string]>, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js index cb8136d54..12b38a6a5 100644 --- a/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/cc/arduino/cli/debug/v1/debug_pb.js @@ -1224,4 +1224,4 @@ proto.cc.arduino.cli.debug.v1.GetDebugConfigResponse.prototype.clearServerConfig return this;}; -goog.object.extend(exports, proto.cc.arduino.cli.debug.v1); \ No newline at end of file +goog.object.extend(exports, proto.cc.arduino.cli.debug.v1); diff --git a/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.d.ts index 884f59ac8..91afcb7d5 100644 --- a/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.d.ts +++ b/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.d.ts @@ -36,4 +36,4 @@ export namespace Status { message: string, detailsList: Array, } -} \ No newline at end of file +} diff --git a/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.js b/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.js index 304b718a4..d96766756 100644 --- a/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.js +++ b/arduino-ide-extension/src/node/cli-protocol/google/rpc/status_pb.js @@ -259,4 +259,4 @@ proto.google.rpc.Status.prototype.clearDetailsList = function() { }; -goog.object.extend(exports, proto.google.rpc); \ No newline at end of file +goog.object.extend(exports, proto.google.rpc); diff --git a/i18n/en.json b/i18n/en.json index 706d7b1be..0e3c12b68 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -120,6 +120,8 @@ "noneSelected": "No boards selected.", "noPortsSelected": "No ports selected for board: '{0}'.", "noFQBN": "The FQBN is not available for the selected board \"{0}\". Do you have the corresponding core installed?", + "openBoardsConfig": "Select other board and port…", + "boardListItem": "{0} at {1}", "selectBoardForInfo": "Please select a board to obtain board info.", "platformMissing": "The platform for the selected '{0}' board is not installed.", "selectPortForInfo": "Please select a port to obtain board info.",