6#include <grpcpp/channel.h>
8#include <viam/api/component/powersensor/v1/powersensor.grpc.pb.h>
12#include <viam/sdk/config/resource.hpp>
28 double get_power(
const ProtoStruct& extra)
override;
30 ProtoStruct
do_command(
const ProtoStruct& command)
override;
38 using StubType = viam::component::powersensor::v1::PowerSensorService::StubInterface;
39 std::unique_ptr<StubType> stub_;
40 std::shared_ptr<grpc::Channel> channel_;
Definition power_sensor.hpp:22
current get_current()
Returns the current reading of this sensor.
Definition power_sensor.hpp:55
double get_power()
Returns the power reading of this sensor.
Definition power_sensor.hpp:66
ProtoStruct get_readings()
Returns the measurements/data specific to this sensor.
Definition power_sensor.hpp:77
voltage get_voltage()
Returns the voltage reading of this sensor.
Definition power_sensor.hpp:44
virtual std::string name() const
Return the resource's name.
gRPC client implementation of a PowerSensor component.
Definition power_sensor_client.hpp:22
double get_power(const ProtoStruct &extra) override
Returns the power reading of this sensor.
voltage get_voltage(const ProtoStruct &extra) override
Returns the voltage reading of this sensor.
ProtoStruct do_command(const ProtoStruct &command) override
Send/receive arbitrary commands to the resource.
ProtoStruct get_readings(const ProtoStruct &extra) override
Returns the measurements/data specific to this sensor.
current get_current(const ProtoStruct &extra) override
Returns the current reading of this sensor.
gRPC client implementation for a robot.
Defines a PowerSensor component.
Implements a gRPC server for the PowerSensor component.
Definition power_sensor.hpp:33
Definition power_sensor.hpp:25