Viam C++ SDK current
Loading...
Searching...
No Matches
servo_server.hpp
Go to the documentation of this file.
1
4#pragma once
5
6#include <viam/api/common/v1/common.pb.h>
7#include <viam/api/component/servo/v1/servo.grpc.pb.h>
8
11#include <viam/sdk/resource/resource_server_base.hpp>
12
13namespace viam {
14namespace sdk {
15namespace impl {
16
21 public viam::component::servo::v1::ServoService::Service {
22 public:
23 using interface_type = Servo;
24 using service_type = component::servo::v1::ServoService;
25 explicit ServoServer(std::shared_ptr<ResourceManager> manager);
26
27 ::grpc::Status Move(::grpc::ServerContext* context,
28 const ::viam::component::servo::v1::MoveRequest* request,
29 ::viam::component::servo::v1::MoveResponse* response) noexcept override;
30
31 ::grpc::Status GetPosition(
32 ::grpc::ServerContext* context,
33 const ::viam::component::servo::v1::GetPositionRequest* request,
34 ::viam::component::servo::v1::GetPositionResponse* response) noexcept override;
35
36 ::grpc::Status Stop(::grpc::ServerContext* context,
37 const ::viam::component::servo::v1::StopRequest* request,
38 ::viam::component::servo::v1::StopResponse* response) noexcept override;
39
40 ::grpc::Status IsMoving(
41 ::grpc::ServerContext* context,
42 const ::viam::component::servo::v1::IsMovingRequest* request,
43 ::viam::component::servo::v1::IsMovingResponse* response) noexcept override;
44
45 ::grpc::Status GetGeometries(
46 ::grpc::ServerContext* context,
47 const ::viam::common::v1::GetGeometriesRequest* request,
48 ::viam::common::v1::GetGeometriesResponse* response) noexcept override;
49
50 ::grpc::Status DoCommand(grpc::ServerContext* context,
51 const viam::common::v1::DoCommandRequest* request,
52 viam::common::v1::DoCommandResponse* response) noexcept override;
53};
54
55} // namespace impl
56} // namespace sdk
57} // namespace viam
Definition resource_server_base.hpp:8
Definition servo.hpp:21
gRPC server implementation of a Servo component.
Definition servo_server.hpp:21
Defines a general-purpose resource manager.
Defines a Servo component.