Viam C++ SDK current
Loading...
Searching...
No Matches
movement_sensor_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/movementsensor/v1/movementsensor.grpc.pb.h>
8
11#include <viam/sdk/resource/resource_server_base.hpp>
12
13namespace viam {
14namespace sdk {
15namespace impl {
16
21 : public ResourceServer,
22 public viam::component::movementsensor::v1::MovementSensorService::Service {
23 public:
25 using service_type = component::movementsensor::v1::MovementSensorService;
26 explicit MovementSensorServer(std::shared_ptr<ResourceManager> manager);
27
28 ::grpc::Status GetLinearVelocity(
29 ::grpc::ServerContext* context,
30 const ::viam::component::movementsensor::v1::GetLinearVelocityRequest* request,
31 ::viam::component::movementsensor::v1::GetLinearVelocityResponse* response) noexcept
32 override;
33
34 ::grpc::Status GetAngularVelocity(
35 ::grpc::ServerContext* context,
36 const ::viam::component::movementsensor::v1::GetAngularVelocityRequest* request,
37 ::viam::component::movementsensor::v1::GetAngularVelocityResponse* response) noexcept
38 override;
39
40 ::grpc::Status GetCompassHeading(
41 ::grpc::ServerContext* context,
42 const ::viam::component::movementsensor::v1::GetCompassHeadingRequest* request,
43 ::viam::component::movementsensor::v1::GetCompassHeadingResponse* response) noexcept
44 override;
45
46 ::grpc::Status GetOrientation(
47 ::grpc::ServerContext* context,
48 const ::viam::component::movementsensor::v1::GetOrientationRequest* request,
49 ::viam::component::movementsensor::v1::GetOrientationResponse* response) noexcept override;
50
51 ::grpc::Status GetPosition(
52 ::grpc::ServerContext* context,
53 const ::viam::component::movementsensor::v1::GetPositionRequest* request,
54 ::viam::component::movementsensor::v1::GetPositionResponse* response) noexcept override;
55
56 ::grpc::Status GetProperties(
57 ::grpc::ServerContext* context,
58 const ::viam::component::movementsensor::v1::GetPropertiesRequest* request,
59 ::viam::component::movementsensor::v1::GetPropertiesResponse* response) noexcept override;
60
61 ::grpc::Status GetAccuracy(
62 ::grpc::ServerContext* context,
63 const ::viam::component::movementsensor::v1::GetAccuracyRequest* request,
64 ::viam::component::movementsensor::v1::GetAccuracyResponse* response) noexcept override;
65
66 ::grpc::Status GetLinearAcceleration(
67 ::grpc::ServerContext* context,
68 const ::viam::component::movementsensor::v1::GetLinearAccelerationRequest* request,
69 ::viam::component::movementsensor::v1::GetLinearAccelerationResponse* response) noexcept
70 override;
71
72 ::grpc::Status DoCommand(::grpc::ServerContext* context,
73 const viam::common::v1::DoCommandRequest* request,
74 viam::common::v1::DoCommandResponse* response) noexcept override;
75
76 ::grpc::Status GetGeometries(
77 ::grpc::ServerContext* context,
78 const ::viam::common::v1::GetGeometriesRequest* request,
79 ::viam::common::v1::GetGeometriesResponse* response) noexcept override;
80};
81
82} // namespace impl
83} // namespace sdk
84} // namespace viam
Definition movement_sensor.hpp:24
Definition resource_server_base.hpp:8
gRPC server implementation of a MovementSensor component.
Definition movement_sensor_server.hpp:22
Defines a MovementSensor component.
Defines a general-purpose resource manager.