8#include <viam/sdk/common/proto_value.hpp>
9#include <viam/sdk/common/utils.hpp>
10#include <viam/sdk/config/resource.hpp>
75 virtual double get_power(
const ProtoStruct& extra) = 0;
91 virtual ProtoStruct
do_command(
const ProtoStruct& command) = 0;
Definition resource_api.hpp:21
Definition component.hpp:10
Definition power_sensor.hpp:22
current get_current()
Returns the current reading of this sensor.
Definition power_sensor.hpp:57
virtual ProtoStruct get_status()=0
Get the status of the power sensor.
API api() const override
Returns the API associated with a particular resource.
virtual current get_current(const ProtoStruct &extra)=0
Returns the current reading of this sensor.
virtual double get_power(const ProtoStruct &extra)=0
Returns the power reading of this sensor.
virtual voltage get_voltage(const ProtoStruct &extra)=0
Returns the voltage reading of this sensor.
double get_power()
Returns the power reading of this sensor.
Definition power_sensor.hpp:68
ProtoStruct get_readings()
Returns the measurements/data specific to this sensor.
Definition power_sensor.hpp:79
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.
Definition power_sensor.hpp:46
virtual ProtoStruct do_command(const ProtoStruct &command)=0
Send/receive arbitrary commands to the resource.
Definition resource.hpp:42
virtual std::string name() const
Return the resource's name.
Definition resource_api.hpp:46
Definition power_sensor.hpp:34
double amperes
Current in amperes.
Definition power_sensor.hpp:36
bool is_ac
Whether the current is DC or AC.
Definition power_sensor.hpp:38
Definition power_sensor.hpp:25
double volts
Voltage in volts.
Definition power_sensor.hpp:27
bool is_ac
Whether the voltage is DC or AC.
Definition power_sensor.hpp:29