6#include <grpcpp/channel.h>
8#include <viam/sdk/common/utils.hpp>
9#include <viam/sdk/config/resource.hpp>
12#include <viam/sdk/services/service.hpp>
14#include "summation.grpc.pb.h"
15#include "summation.pb.h"
17using namespace viam::sdk;
18using namespace viam::service::summation::v1;
26 virtual double sum(std::vector<double> numbers) = 0;
46 double sum(std::vector<double> numbers)
override;
49 using StubType = SummationService::StubInterface;
50 std::unique_ptr<StubType> stub_;
51 std::shared_ptr<grpc::Channel> channel_;
59 using service_type = SummationService;
62 grpc::Status Sum(grpc::ServerContext* context,
63 const SumRequest* request,
64 SumResponse* response)
override;
API api() const override
Returns the API associated with a particular resource.
Extends APIType to additionally define a resource's subtype (e.g., camera).
Definition resource_api.hpp:33
Definition resource_server_base.hpp:8
virtual std::string name() const
Return the resource's name.
Definition service.hpp:10
Defines the resource registry and associated types.
Defines a general-purpose resource manager.
Definition resource_api.hpp:50