Viam C++ SDK current
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
viam::sdk::impl::PowerSensorClient Class Reference

gRPC client implementation of a PowerSensor component. More...

#include <power_sensor_client.hpp>

+ Inheritance diagram for viam::sdk::impl::PowerSensorClient:

Public Types

using interface_type = PowerSensor
 

Public Member Functions

 PowerSensorClient (std::string name, std::shared_ptr< grpc::Channel > channel)
 
voltage get_voltage (const AttributeMap &extra) override
 Returns the voltage reading of this sensor.
 
current get_current (const AttributeMap &extra) override
 Returns the current reading of this sensor.
 
double get_power (const AttributeMap &extra) override
 Returns the power reading of this sensor.
 
AttributeMap get_readings (const AttributeMap &extra) override
 Returns the measurements/data specific to this sensor.
 
AttributeMap do_command (const AttributeMap &command) override
 Send/receive arbitrary commands to the resource.
 
current get_current ()
 Returns the current reading of this sensor.
 
virtual current get_current (const AttributeMap &extra)=0
 Returns the current reading of this sensor.
 
double get_power ()
 Returns the power reading of this sensor.
 
virtual double get_power (const AttributeMap &extra)=0
 Returns the power reading of this sensor.
 
AttributeMap get_readings ()
 Returns the measurements/data specific to this sensor.
 
virtual AttributeMap get_readings (const AttributeMap &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 AttributeMap &extra)=0
 Returns the voltage reading of this sensor.
 
- Public Member Functions inherited from viam::sdk::PowerSensor
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.
 
AttributeMap get_readings ()
 Returns the measurements/data specific to this sensor.
 
- Public Member Functions inherited from viam::sdk::Component
viam::common::v1::ResourceName get_resource_name (std::string name) const override
 Returns a ResourceName for a particular resource name.
 
- Public Member Functions inherited from viam::sdk::Resource
 Resource (std::string name)
 
virtual std::string name () const
 Return the resource's name.
 

Additional Inherited Members

- Static Public Member Functions inherited from viam::sdk::PowerSensor
static voltage from_proto (const GetVoltageResponse &proto)
 Creates a voltage struct from its proto representation.
 
static current from_proto (const GetCurrentResponse &proto)
 Creates a current struct from its proto representation.
 
static GetVoltageResponse to_proto (const voltage &v)
 Converts a voltage struct to its proto representation.
 
static GetCurrentResponse to_proto (const current &c)
 Converts a current struct to its proto representation.
 
- Protected Member Functions inherited from viam::sdk::PowerSensor
 PowerSensor (std::string name)
 
- Protected Member Functions inherited from viam::sdk::Component
 Component (std::string name)
 

Detailed Description

gRPC client implementation of a PowerSensor component.

Member Function Documentation

◆ do_command()

AttributeMap viam::sdk::impl::PowerSensorClient::do_command ( const AttributeMap & command)
overridevirtual

Send/receive arbitrary commands to the resource.

Parameters
Commandthe 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 AttributeMap & extra)
overridevirtual

Returns the current reading of this sensor.

Parameters
extraAny 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 AttributeMap & extra)
virtual

Returns the current reading of this sensor.

Parameters
extraAny 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 AttributeMap & extra)
overridevirtual

Returns the power reading of this sensor.

Parameters
extraAny 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 AttributeMap & extra)
virtual

Returns the power reading of this sensor.

Parameters
extraAny additional arguments to this method.
Returns
The power reading of this sensor.

Implements viam::sdk::PowerSensor.

◆ get_readings() [1/3]

AttributeMap 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]

AttributeMap viam::sdk::impl::PowerSensorClient::get_readings ( const AttributeMap & extra)
overridevirtual

Returns the measurements/data specific to this sensor.

Parameters
extraAny additional arguments to the method.
Returns
The requested measurements/data specific to this sensor.

Implements viam::sdk::PowerSensor.

◆ get_readings() [3/3]

virtual AttributeMap viam::sdk::PowerSensor::get_readings ( const AttributeMap & extra)
virtual

Returns the measurements/data specific to this sensor.

Parameters
extraAny 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 AttributeMap & extra)
overridevirtual

Returns the voltage reading of this sensor.

Parameters
extraAny 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 AttributeMap & extra)
virtual

Returns the voltage reading of this sensor.

Parameters
extraAny 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: