Viam C++ SDK current
Loading...
Searching...
No Matches
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/sensor/v1/sensor.grpc.pb.h>
8
11#include <viam/sdk/resource/resource_server_base.hpp>
12
13using namespace viam::common::v1;
14
15namespace viam {
16namespace sdk {
17namespace impl {
18
23 public viam::component::sensor::v1::SensorService::Service {
24 public:
25 using interface_type = Sensor;
26 using service_type = component::sensor::v1::SensorService;
27 explicit SensorServer(std::shared_ptr<ResourceManager> manager);
28
29 ::grpc::Status GetReadings(::grpc::ServerContext* context,
30 const GetReadingsRequest* request,
31 GetReadingsResponse* response) noexcept override;
32
33 ::grpc::Status DoCommand(::grpc::ServerContext* context,
34 const DoCommandRequest* request,
35 DoCommandResponse* response) noexcept override;
36
37 ::grpc::Status GetGeometries(::grpc::ServerContext* context,
38 const GetGeometriesRequest* request,
39 GetGeometriesResponse* response) noexcept override;
40};
41
42} // namespace impl
43} // namespace sdk
44} // namespace viam
Definition resource_server_base.hpp:8
Definition sensor.hpp:22
gRPC server implementation of a Sensor component.
Definition sensor_server.hpp:23
Defines a general-purpose resource manager.
Defines a Sensor component.