|
Viam C++ SDK current
|
gRPC client implementation of a Switch component.
More...
#include <switch_client.hpp>
Inheritance diagram for viam::sdk::impl::SwitchClient:Public Types | |
| using | interface_type = Switch |
Public Member Functions | |
| SwitchClient (std::string name, const ViamChannel &channel) | |
| const ViamChannel & | channel () const |
| void | set_position (uint32_t position, const ProtoStruct &extra) override |
| Set the position of the switch. | |
| uint32_t | get_position (const ProtoStruct &extra) override |
| Get the current position of the switch. | |
| Switch::position_info | get_number_of_positions (const ProtoStruct &extra) override |
| Get the position_info supported by this switch. | |
| ProtoStruct | do_command (const ProtoStruct &command) override |
| Send/receive arbitrary commands to the resource. | |
| ProtoStruct | get_status () override |
| Get the status of the switch. | |
| position_info | get_number_of_positions () |
| Get the position_info supported by this switch. | |
| virtual position_info | get_number_of_positions (const ProtoStruct &extra)=0 |
| Get the position_info supported by this switch. | |
| uint32_t | get_position () |
| Get the current position of the switch. | |
| virtual uint32_t | get_position (const ProtoStruct &extra)=0 |
| Get the current position of the switch. | |
| void | set_position (uint32_t position) |
| Set the position of the switch. | |
| virtual void | set_position (uint32_t position, const ProtoStruct &extra)=0 |
| Set the position of the switch. | |
Public Member Functions inherited from viam::sdk::Switch | |
| void | set_position (uint32_t position) |
| Set the position of the switch. | |
| uint32_t | get_position () |
| Get the current position of the switch. | |
| position_info | get_number_of_positions () |
| Get the position_info supported by this switch. | |
| API | api () const override |
Returns the API associated with a particular resource. | |
Public Member Functions inherited from viam::sdk::Component | |
| Name | get_resource_name () const override |
Returns the Name for a particular resource. | |
Public Member Functions inherited from viam::sdk::Resource | |
| Resource (std::string name) | |
| Resource (const ResourceConfig &cfg) | |
| Construct from a resource config. Use this overload to ensure Viam App log filtering works immediately during object construction. | |
| virtual std::string | name () const |
| Return the resource's name. | |
| void | set_log_level (log_level) const |
| Set the log level for log messages originating from this Resource. | |
Additional Inherited Members | |
Protected Member Functions inherited from viam::sdk::Switch | |
| Switch (std::string name) | |
| Switch (const ResourceConfig &cfg) | |
Protected Member Functions inherited from viam::sdk::Component | |
| Component (std::string name) | |
| Component (const ResourceConfig &cfg) | |
Protected Member Functions inherited from viam::sdk::Resource | |
| Name | get_resource_name (const std::string &type) const |
Protected Attributes inherited from viam::sdk::Resource | |
| LogSource | logger_ |
gRPC client implementation of a Switch component.
|
overridevirtual |
Send/receive arbitrary commands to the resource.
| command | The command to execute. |
Implements viam::sdk::Switch.
|
inline |
Get the position_info supported by this switch.
|
overridevirtual |
Get the position_info supported by this switch.
| extra | Any additional arguments to the method. |
Implements viam::sdk::Switch.
|
virtual |
Get the position_info supported by this switch.
| extra | Any additional arguments to the method. |
Implements viam::sdk::Switch.
|
inline |
Get the current position of the switch.
|
overridevirtual |
Get the current position of the switch.
| extra | Any additional arguments to the method. |
Implements viam::sdk::Switch.
|
virtual |
Get the current position of the switch.
| extra | Any additional arguments to the method. |
Implements viam::sdk::Switch.
|
overridevirtual |
Get the status of the switch.
ProtoStruct containing the status of the switch. Implements viam::sdk::Switch.
|
inline |
Set the position of the switch.
| position | The position to set the switch to. |
|
overridevirtual |
Set the position of the switch.
| position | The position to set the switch to. |
| extra | Any additional arguments to the method. |
Implements viam::sdk::Switch.
|
virtual |
Set the position of the switch.
| position | The position to set the switch to. |
| extra | Any additional arguments to the method. |
Implements viam::sdk::Switch.