Skip to content

Commit 802741a

Browse files
committed
register discovery
1 parent b7fd9f2 commit 802741a

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

src/viam/api/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ if (VIAMCPPSDK_USE_DYNAMIC_PROTOS)
213213
${PROTO_GEN_DIR}/robot/v1/robot.grpc.pb.h
214214
${PROTO_GEN_DIR}/robot/v1/robot.pb.cc
215215
${PROTO_GEN_DIR}/robot/v1/robot.pb.h
216+
${PROTO_GEN_DIR}/service/discovery/v1/discovery.grpc.pb.cc
217+
${PROTO_GEN_DIR}/service/discovery/v1/discovery.grpc.pb.h
218+
${PROTO_GEN_DIR}/service/discovery/v1/discovery.pb.cc
219+
${PROTO_GEN_DIR}/service/discovery/v1/discovery.pb.h
216220
${PROTO_GEN_DIR}/service/generic/v1/generic.grpc.pb.cc
217221
${PROTO_GEN_DIR}/service/generic/v1/generic.grpc.pb.h
218222
${PROTO_GEN_DIR}/service/generic/v1/generic.pb.cc
@@ -302,6 +306,8 @@ target_sources(viamapi
302306
${PROTO_GEN_DIR}/component/encoder/v1/encoder.pb.cc
303307
${PROTO_GEN_DIR}/component/gantry/v1/gantry.grpc.pb.cc
304308
${PROTO_GEN_DIR}/component/gantry/v1/gantry.pb.cc
309+
${PROTO_GEN_DIR}/component/discovery/v1/discovery.grpc.pb.cc
310+
${PROTO_GEN_DIR}/component/discovery/v1/discovery.pb.cc
305311
${PROTO_GEN_DIR}/component/generic/v1/generic.grpc.pb.cc
306312
${PROTO_GEN_DIR}/component/generic/v1/generic.pb.cc
307313
${PROTO_GEN_DIR}/component/gripper/v1/gripper.grpc.pb.cc
@@ -360,6 +366,8 @@ target_sources(viamapi
360366
${PROTO_GEN_DIR}/../../viam/api/component/encoder/v1/encoder.pb.h
361367
${PROTO_GEN_DIR}/../../viam/api/component/gantry/v1/gantry.grpc.pb.h
362368
${PROTO_GEN_DIR}/../../viam/api/component/gantry/v1/gantry.pb.h
369+
${PROTO_GEN_DIR}/../../viam/api/component/discovery/v1/discovery.grpc.pb.h
370+
${PROTO_GEN_DIR}/../../viam/api/component/discovery/v1/discovery.pb.h
363371
${PROTO_GEN_DIR}/../../viam/api/component/generic/v1/generic.grpc.pb.h
364372
${PROTO_GEN_DIR}/../../viam/api/component/generic/v1/generic.pb.h
365373
${PROTO_GEN_DIR}/../../viam/api/component/gripper/v1/gripper.grpc.pb.h

src/viam/sdk/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,13 @@ target_sources(viamsdk
118118
rpc/dial.cpp
119119
rpc/server.cpp
120120
rpc/private/viam_grpc_channel.cpp
121+
services/discovery.cpp
121122
services/generic.cpp
122123
services/mlmodel.cpp
123124
services/motion.cpp
124125
services/navigation.cpp
126+
services/private/discovery_client.cpp
127+
services/private/discovery_server.cpp
125128
services/private/generic_client.cpp
126129
services/private/generic_server.cpp
127130
services/private/mlmodel.cpp
@@ -181,6 +184,7 @@ target_sources(viamsdk
181184
../../viam/sdk/rpc/dial.hpp
182185
../../viam/sdk/rpc/message_sizes.hpp
183186
../../viam/sdk/rpc/server.hpp
187+
../../viam/sdk/services/discovery.hpp
184188
../../viam/sdk/services/generic.hpp
185189
../../viam/sdk/services/mlmodel.hpp
186190
../../viam/sdk/services/motion.hpp

src/viam/sdk/registry/registry.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
#include <viam/sdk/components/private/servo_server.hpp>
4343
#include <viam/sdk/resource/resource.hpp>
4444
#include <viam/sdk/resource/resource_api.hpp>
45+
#include <viam/sdk/services/private/discovery_client.hpp>
46+
#include <viam/sdk/services/private/discovery_service.hpp>
4547
#include <viam/sdk/services/private/generic_client.hpp>
4648
#include <viam/sdk/services/private/generic_server.hpp>
4749
#include <viam/sdk/services/private/mlmodel_client.hpp>
@@ -202,6 +204,7 @@ void register_resources() {
202204
Registry::register_resource<impl::ServoClient, impl::ServoServer>();
203205

204206
// Register all services
207+
Registry::register_resource<impl::DiscoveryClient, impl::DiscoveryServer>();
205208
Registry::register_resource<impl::GenericServiceClient, impl::GenericServiceServer>();
206209
Registry::register_resource<impl::MLModelServiceClient, impl::MLModelServiceServer>();
207210
Registry::register_resource<impl::MotionClient, impl::MotionServer>();

0 commit comments

Comments
 (0)