Viam C++ SDK current
Loading...
Searching...
No Matches
mlmodel_server.hpp
1// Copyright 2023 Viam Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <viam/api/service/mlmodel/v1/mlmodel.grpc.pb.h>
18
20#include <viam/sdk/resource/resource_server_base.hpp>
21#include <viam/sdk/services/mlmodel.hpp>
22
23namespace viam {
24namespace sdk {
25namespace impl {
26
32 public ::viam::service::mlmodel::v1::MLModelService::Service {
33 public:
35 using service_type = service::mlmodel::v1::MLModelService;
36 explicit MLModelServiceServer(std::shared_ptr<ResourceManager> manager);
37
38 ::grpc::Status Infer(::grpc::ServerContext* context,
39 const ::viam::service::mlmodel::v1::InferRequest* request,
40 ::viam::service::mlmodel::v1::InferResponse* response) noexcept override;
41
42 ::grpc::Status Metadata(
43 ::grpc::ServerContext* context,
44 const ::viam::service::mlmodel::v1::MetadataRequest* request,
45 ::viam::service::mlmodel::v1::MetadataResponse* response) noexcept override;
46};
47
48} // namespace impl
49} // namespace sdk
50} // namespace viam
Represents a machine trained learning model instance.
Definition mlmodel.hpp:35
Definition resource_server_base.hpp:8
Definition mlmodel_server.hpp:32
Defines a general-purpose resource manager.