Viam C++ SDK current
|
A Button
represents a physical or virtual button.
More...
#include "components/button.hpp"
Public Member Functions | |
void | push () |
Push the button. | |
virtual void | push (const ProtoStruct &extra)=0 |
Push the button. | |
virtual ProtoStruct | do_command (const ProtoStruct &command)=0 |
Send/receive arbitrary commands to the resource. | |
API | api () const override |
Returns the API associated with a particular resource. | |
![]() | |
Name | get_resource_name () const override |
Returns the Name for a particular resource. | |
![]() | |
Resource (std::string name) | |
virtual std::string | name () const |
Return the resource's name. | |
Protected Member Functions | |
Button (std::string name) | |
![]() | |
Component (std::string name) | |
![]() | |
Name | get_resource_name (const std::string &type) const |
A Button
represents a physical or virtual button.
This acts as an abstract parent class to be inherited from by any drivers representing specific button implementations. This class cannot be used on its own.
|
overridevirtual |
Returns the API
associated with a particular resource.
Implements viam::sdk::Resource.
|
pure virtual |
Send/receive arbitrary commands to the resource.
Command | the command to execute. |
Implemented in viam::sdk::impl::ButtonClient.
|
pure virtual |
Push the button.
extra | Any additional arguments to the method. |
Implemented in viam::sdk::impl::ButtonClient, and viam::sdk::impl::ButtonClient.