gRPC client implementation of a PowerSensor
component.
More...
#include <power_sensor_client.hpp>
|
| PowerSensorClient (std::string name, std::shared_ptr< grpc::Channel > channel) |
|
voltage | get_voltage (const ProtoStruct &extra) override |
| Returns the voltage reading of this sensor.
|
|
current | get_current (const ProtoStruct &extra) override |
| Returns the current reading of this sensor.
|
|
double | get_power (const ProtoStruct &extra) override |
| Returns the power reading of this sensor.
|
|
ProtoStruct | get_readings (const ProtoStruct &extra) override |
| Returns the measurements/data specific to this sensor.
|
|
ProtoStruct | do_command (const ProtoStruct &command) override |
| Send/receive arbitrary commands to the resource.
|
|
current | get_current () |
| Returns the current reading of this sensor.
|
|
virtual current | get_current (const ProtoStruct &extra)=0 |
| Returns the current reading of this sensor.
|
|
double | get_power () |
| Returns the power reading of this sensor.
|
|
virtual double | get_power (const ProtoStruct &extra)=0 |
| Returns the power reading of this sensor.
|
|
ProtoStruct | get_readings () |
| Returns the measurements/data specific to this sensor.
|
|
virtual ProtoStruct | get_readings (const ProtoStruct &extra)=0 |
| Returns the measurements/data specific to this sensor.
|
|
voltage | get_voltage () |
| Returns the voltage reading of this sensor.
|
|
virtual voltage | get_voltage (const ProtoStruct &extra)=0 |
| Returns the voltage reading of this sensor.
|
|
API | api () const override |
| Returns the API associated with a particular resource.
|
|
voltage | get_voltage () |
| Returns the voltage reading of this sensor.
|
|
current | get_current () |
| Returns the current reading of this sensor.
|
|
double | get_power () |
| Returns the power reading of this sensor.
|
|
ProtoStruct | get_readings () |
| Returns the measurements/data specific to this sensor.
|
|
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.
|
|
|
| PowerSensor (std::string name) |
|
| Component (std::string name) |
|
Name | get_resource_name (const std::string &type) const |
|
gRPC client implementation of a PowerSensor
component.
◆ do_command()
ProtoStruct viam::sdk::impl::PowerSensorClient::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::PowerSensor.
◆ get_current() [1/3]
current viam::sdk::PowerSensor::get_current |
( |
| ) |
|
|
inline |
Returns the current reading of this sensor.
- Returns
- The current reading of this sensor.
◆ get_current() [2/3]
current viam::sdk::impl::PowerSensorClient::get_current |
( |
const ProtoStruct & | extra | ) |
|
|
overridevirtual |
Returns the current reading of this sensor.
- Parameters
-
extra | Any additional arguments to this method. |
- Returns
- The current reading of this sensor.
Implements viam::sdk::PowerSensor.
◆ get_current() [3/3]
virtual current viam::sdk::PowerSensor::get_current |
( |
const ProtoStruct & | extra | ) |
|
|
virtual |
Returns the current reading of this sensor.
- Parameters
-
extra | Any additional arguments to this method. |
- Returns
- The current reading of this sensor.
Implements viam::sdk::PowerSensor.
◆ get_power() [1/3]
double viam::sdk::PowerSensor::get_power |
( |
| ) |
|
|
inline |
Returns the power reading of this sensor.
- Returns
- The power reading of this sensor.
◆ get_power() [2/3]
double viam::sdk::impl::PowerSensorClient::get_power |
( |
const ProtoStruct & | extra | ) |
|
|
overridevirtual |
Returns the power reading of this sensor.
- Parameters
-
extra | Any additional arguments to this method. |
- Returns
- The power reading of this sensor.
Implements viam::sdk::PowerSensor.
◆ get_power() [3/3]
virtual double viam::sdk::PowerSensor::get_power |
( |
const ProtoStruct & | extra | ) |
|
|
virtual |
Returns the power reading of this sensor.
- Parameters
-
extra | Any additional arguments to this method. |
- Returns
- The power reading of this sensor.
Implements viam::sdk::PowerSensor.
◆ get_readings() [1/3]
ProtoStruct viam::sdk::PowerSensor::get_readings |
( |
| ) |
|
|
inline |
Returns the measurements/data specific to this sensor.
- Returns
- The requested measurements/data specific to this sensor.
◆ get_readings() [2/3]
ProtoStruct viam::sdk::impl::PowerSensorClient::get_readings |
( |
const ProtoStruct & | extra | ) |
|
|
overridevirtual |
Returns the measurements/data specific to this sensor.
- Parameters
-
extra | Any additional arguments to the method. |
- Returns
- The requested measurements/data specific to this sensor.
Implements viam::sdk::PowerSensor.
◆ get_readings() [3/3]
virtual ProtoStruct viam::sdk::PowerSensor::get_readings |
( |
const ProtoStruct & | extra | ) |
|
|
virtual |
Returns the measurements/data specific to this sensor.
- Parameters
-
extra | Any additional arguments to the method. |
- Returns
- The requested measurements/data specific to this sensor.
Implements viam::sdk::PowerSensor.
◆ get_voltage() [1/3]
voltage viam::sdk::PowerSensor::get_voltage |
( |
| ) |
|
|
inline |
Returns the voltage reading of this sensor.
- Returns
- The voltage reading of this sensor.
◆ get_voltage() [2/3]
voltage viam::sdk::impl::PowerSensorClient::get_voltage |
( |
const ProtoStruct & | extra | ) |
|
|
overridevirtual |
Returns the voltage reading of this sensor.
- Parameters
-
extra | Any additional arguments to this method. |
- Returns
- The voltage reading of this sensor.
Implements viam::sdk::PowerSensor.
◆ get_voltage() [3/3]
virtual voltage viam::sdk::PowerSensor::get_voltage |
( |
const ProtoStruct & | extra | ) |
|
|
virtual |
Returns the voltage reading of this sensor.
- Parameters
-
extra | Any additional arguments to this method. |
- Returns
- The voltage reading of this sensor.
Implements viam::sdk::PowerSensor.
The documentation for this class was generated from the following file: