Viam C++ SDK current
|
#include "components/power_sensor.hpp"
Classes | |
struct | current |
struct | voltage |
Public Member Functions | |
API | api () const override |
Returns the API associated with a particular resource. | |
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. | |
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. | |
virtual ProtoStruct | do_command (const ProtoStruct &command)=0 |
Send/receive arbitrary commands to the 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) | |
virtual std::string | name () const |
Return the resource's name. | |
Protected Member Functions | |
PowerSensor (std::string name) | |
Protected Member Functions inherited from viam::sdk::Component | |
Component (std::string name) | |
Protected Member Functions inherited from viam::sdk::Resource | |
Name | get_resource_name (const std::string &type) const |
This acts as an abstract base class to be inherited from by any drivers representing specific powersensor 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::PowerSensorClient.
|
inline |
Returns the current reading of this sensor.
|
pure virtual |
Returns the current reading of this sensor.
extra | Any additional arguments to this method. |
Implemented in viam::sdk::impl::PowerSensorClient, and viam::sdk::impl::PowerSensorClient.
|
inline |
Returns the power reading of this sensor.
|
pure virtual |
Returns the power reading of this sensor.
extra | Any additional arguments to this method. |
Implemented in viam::sdk::impl::PowerSensorClient, and viam::sdk::impl::PowerSensorClient.
|
inline |
Returns the measurements/data specific to this sensor.
|
pure virtual |
Returns the measurements/data specific to this sensor.
extra | Any additional arguments to the method. |
Implemented in viam::sdk::impl::PowerSensorClient, and viam::sdk::impl::PowerSensorClient.
|
inline |
Returns the voltage reading of this sensor.
|
pure virtual |
Returns the voltage reading of this sensor.
extra | Any additional arguments to this method. |
Implemented in viam::sdk::impl::PowerSensorClient, and viam::sdk::impl::PowerSensorClient.