Button API
The button API allows you to get button presses from your button components.
The button component supports the following methods:
| Method Name | Description | viam-micro-server Support |
|---|---|---|
Push | Push the button. | |
Reconfigure | Reconfigure this resource. | |
DoCommand | Execute model-specific commands that are not otherwise defined by the component API. | |
GetResourceName | Get the ResourceName for this button. | |
Close | Safely shut down the resource and prevent further use. |
API
Push
Push the button.
Supported by viam-micro-server.
Reconfigure
Reconfigure this resource. Reconfigure must reconfigure the resource atomically and in place.
DoCommand
Execute model-specific commands that are not otherwise defined by the component API.
Most models do not implement DoCommand.
Any available model-specific commands should be covered in the model’s documentation.
If you are implementing your own button and want to add features that have no corresponding built-in API method, you can implement them with DoCommand.
Supported by viam-micro-server.
GetResourceName
Get the ResourceName for this button.
Close
Safely shut down the resource and prevent further use.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!