6#include <grpcpp/channel.h>
8#include <viam/api/component/encoder/v1/encoder.grpc.pb.h>
11#include <viam/sdk/config/resource.hpp>
27 std::vector<GeometryConfig>
get_geometries(
const ProtoStruct& extra)
override;
28 ProtoStruct
do_command(
const ProtoStruct& command)
override;
45 using StubType = viam::component::encoder::v1::EncoderService::StubInterface;
46 std::unique_ptr<StubType> stub_;
47 std::shared_ptr<grpc::Channel> channel_;
An encoder is a device that is hooked up to motors to report a position.
Definition encoder.hpp:21
properties get_properties()
Returns a list of all the position_types that are supported by the encoder.
Definition encoder.hpp:75
position get_position(position_type position_type=position_type::unspecified)
Returns position of the encoder which can either be ticks since last zeroing for an incremental encod...
Definition encoder.hpp:52
void reset_position()
Reset the value of the position.
Definition encoder.hpp:66
std::vector< GeometryConfig > get_geometries()
Returns GeometryConfigs associated with the calling encoder.
Definition encoder.hpp:90
virtual std::string name() const
Return the resource's name.
gRPC client implementation of a Encoder component.
Definition encoder_client.hpp:20
ProtoStruct do_command(const ProtoStruct &command) override
Send/receive arbitrary commands to the resource.
std::vector< GeometryConfig > get_geometries(const ProtoStruct &extra) override
Returns GeometryConfigs associated with the calling encoder.
properties get_properties(const ProtoStruct &extra) override
Returns a list of all the position_types that are supported by the encoder.
position get_position(const ProtoStruct &extra, position_type position_type) override
Returns position of the encoder which can either be ticks since last zeroing for an incremental encod...
void reset_position(const ProtoStruct &extra) override
Reset the value of the position.
Defines a Encoder component.
reported position.
Definition encoder.hpp:35
Encodes the supported modes of this encoder.
Definition encoder.hpp:42