Viam C++ SDK current
Loading...
Searching...
No Matches
generic_server.hpp
Go to the documentation of this file.
1
4#pragma once
5
6#include <viam/api/common/v1/common.grpc.pb.h>
7#include <viam/api/component/generic/v1/generic.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::generic::v1::GenericService::Service {
22 public:
24 using service_type = component::generic::v1::GenericService;
25 explicit GenericComponentServer(std::shared_ptr<ResourceManager> manager);
26
27 ::grpc::Status DoCommand(::grpc::ServerContext* context,
28 const ::viam::common::v1::DoCommandRequest* request,
29 ::viam::common::v1::DoCommandResponse* response) noexcept override;
30 ::grpc::Status GetGeometries(
31 ::grpc::ServerContext* context,
32 const ::viam::common::v1::GetGeometriesRequest* request,
33 ::viam::common::v1::GetGeometriesResponse* response) noexcept override;
34};
35
36} // namespace impl
37} // namespace sdk
38} // namespace viam
A GenericComponent represents any component that can execute arbitrary commands.
Definition generic.hpp:20
Definition resource_server_base.hpp:8
gRPC server implementation of a GenericComponent.
Definition generic_server.hpp:21
Defines GenericComponent subtype and component class capable of executing arbitrary commands.
Defines a general-purpose resource manager.