6#include <grpcpp/channel.h>
8#include <viam/api/component/sensor/v1/sensor.grpc.pb.h>
12#include <viam/sdk/config/resource.hpp>
26 AttributeMap
do_command(
const AttributeMap& command)
override;
27 std::vector<GeometryConfig>
get_geometries(
const AttributeMap& extra)
override;
33 using StubType = viam::component::sensor::v1::SensorService::StubInterface;
34 std::unique_ptr<StubType> stub_;
35 std::shared_ptr<grpc::Channel> channel_;
virtual std::string name() const
Return the resource's name.
AttributeMap get_readings()
Returns the measurements/data specific to this sensor.
Definition sensor.hpp:46
std::vector< GeometryConfig > get_geometries()
Returns GeometryConfigs associated with the calling sensor.
Definition sensor.hpp:35
gRPC client implementation of a Sensor component.
Definition sensor_client.hpp:21
std::vector< GeometryConfig > get_geometries(const AttributeMap &extra) override
Returns GeometryConfigs associated with the calling 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.
Defines a Sensor component.
Implements a gRPC server for the Sensor component.