A gRPC-web client for the Button component.
Readonly
The name of the resource.
Send/Receive arbitrary commands to the resource.
The command to execute. Accepts either a Struct or a plain object, which will be converted automatically.
// Plain object (recommended)const result = await resource.doCommand({ myCommand: { key: 'value' },});// Struct (still supported)import { Struct } from '@viamrobotics/sdk';const result = await resource.doCommand( Struct.fromJson({ myCommand: { key: 'value' } })); Copy
// Plain object (recommended)const result = await resource.doCommand({ myCommand: { key: 'value' },});// Struct (still supported)import { Struct } from '@viamrobotics/sdk';const result = await resource.doCommand( Struct.fromJson({ myCommand: { key: 'value' } }));
Push the button.
const button = new VIAM.ButtonClient(machine, 'my_button');// Push the buttonawait button.push(); Copy
const button = new VIAM.ButtonClient(machine, 'my_button');// Push the buttonawait button.push();
For more information, see Button API.
A gRPC-web client for the Button component.