gRPC client implementation of a Switch component.
More...
#include <switch_client.hpp>
|
|
| SwitchClient (std::string name, std::shared_ptr< grpc::Channel > channel) |
| |
| 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.
|
| |
| uint32_t | get_number_of_positions (const ProtoStruct &extra) override |
| | Get the number of positions that the switch supports.
|
| |
| ProtoStruct | do_command (const ProtoStruct &command) override |
| | Send/receive arbitrary commands to the resource.
|
| |
| uint32_t | get_number_of_positions () |
| | Get the number of positions that the switch supports.
|
| |
| virtual uint32_t | get_number_of_positions (const ProtoStruct &extra)=0 |
| | Get the number of positions that the switch supports.
|
| |
| 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.
|
| |
| void | set_position (uint32_t position) |
| | Set the position of the switch.
|
| |
| uint32_t | get_position () |
| | Get the current position of the switch.
|
| |
| uint32_t | get_number_of_positions () |
| | Get the number of positions that the switch supports.
|
| |
| 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.
|
| |
|
void | set_log_level (log_level) const |
| | Set the log level for log messages originating from this Resource.
|
| |
|
|
| Switch (std::string name) |
| |
|
| Component (std::string name) |
| |
|
Name | get_resource_name (const std::string &type) const |
| |
|
LogSource | logger_ |
| |
gRPC client implementation of a Switch component.
◆ do_command()
| ProtoStruct viam::sdk::impl::SwitchClient::do_command |
( |
const ProtoStruct & | command | ) |
|
|
overridevirtual |
Send/receive arbitrary commands to the resource.
- Parameters
-
| command | The command to execute. |
- Returns
- The result of the executed command.
Implements viam::sdk::Switch.
◆ get_number_of_positions() [1/3]
| uint32_t viam::sdk::Switch::get_number_of_positions |
( |
| ) |
|
|
inline |
Get the number of positions that the switch supports.
- Returns
- The number of positions that the switch supports.
◆ get_number_of_positions() [2/3]
| uint32_t viam::sdk::impl::SwitchClient::get_number_of_positions |
( |
const ProtoStruct & | extra | ) |
|
|
overridevirtual |
Get the number of positions that the switch supports.
- Parameters
-
| extra | Any additional arguments to the method. |
- Returns
- The number of positions that the switch supports.
Implements viam::sdk::Switch.
◆ get_number_of_positions() [3/3]
| virtual uint32_t viam::sdk::Switch::get_number_of_positions |
( |
const ProtoStruct & | extra | ) |
|
|
virtual |
Get the number of positions that the switch supports.
- Parameters
-
| extra | Any additional arguments to the method. |
- Returns
- The number of positions that the switch supports.
Implements viam::sdk::Switch.
◆ get_position() [1/3]
| uint32_t viam::sdk::Switch::get_position |
( |
| ) |
|
|
inline |
Get the current position of the switch.
- Returns
- The current position of the switch.
◆ get_position() [2/3]
| uint32_t viam::sdk::impl::SwitchClient::get_position |
( |
const ProtoStruct & | extra | ) |
|
|
overridevirtual |
Get the current position of the switch.
- Parameters
-
| extra | Any additional arguments to the method. |
- Returns
- The current position of the switch.
Implements viam::sdk::Switch.
◆ get_position() [3/3]
| virtual uint32_t viam::sdk::Switch::get_position |
( |
const ProtoStruct & | extra | ) |
|
|
virtual |
Get the current position of the switch.
- Parameters
-
| extra | Any additional arguments to the method. |
- Returns
- The current position of the switch.
Implements viam::sdk::Switch.
◆ set_position() [1/3]
| void viam::sdk::Switch::set_position |
( |
uint32_t | position | ) |
|
|
inline |
Set the position of the switch.
- Parameters
-
| position | The position to set the switch to. |
◆ set_position() [2/3]
| void viam::sdk::impl::SwitchClient::set_position |
( |
uint32_t | position, |
|
|
const ProtoStruct & | extra ) |
|
overridevirtual |
Set the position of the switch.
- Parameters
-
| position | The position to set the switch to. |
| extra | Any additional arguments to the method. |
Implements viam::sdk::Switch.
◆ set_position() [3/3]
| virtual void viam::sdk::Switch::set_position |
( |
uint32_t | position, |
|
|
const ProtoStruct & | extra ) |
|
virtual |
Set the position of the switch.
- Parameters
-
| position | The position to set the switch to. |
| extra | Any additional arguments to the method. |
Implements viam::sdk::Switch.
The documentation for this class was generated from the following file: