Add a script to generate required protobuf files

This commit is contained in:
Piv
2020-03-05 22:08:30 +10:30
parent 82a214c209
commit 18ec653962
7 changed files with 101 additions and 97 deletions

View File

@@ -1,7 +1,7 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from . import SlamController_pb2 as SlamController__pb2
from slam import SlamController_pb2 as slam_dot_SlamController__pb2
class SlamControlStub(object):
@@ -16,13 +16,13 @@ class SlamControlStub(object):
"""
self.start_map_streaming = channel.unary_unary(
'/SlamControl/start_map_streaming',
request_serializer=SlamController__pb2.SlamDetails.SerializeToString,
response_deserializer=SlamController__pb2.Empty.FromString,
request_serializer=slam_dot_SlamController__pb2.SlamDetails.SerializeToString,
response_deserializer=slam_dot_SlamController__pb2.Empty.FromString,
)
self.stop_streaming = channel.unary_unary(
'/SlamControl/stop_streaming',
request_serializer=SlamController__pb2.Empty.SerializeToString,
response_deserializer=SlamController__pb2.Empty.FromString,
request_serializer=slam_dot_SlamController__pb2.Empty.SerializeToString,
response_deserializer=slam_dot_SlamController__pb2.Empty.FromString,
)
@@ -49,13 +49,13 @@ def add_SlamControlServicer_to_server(servicer, server):
rpc_method_handlers = {
'start_map_streaming': grpc.unary_unary_rpc_method_handler(
servicer.start_map_streaming,
request_deserializer=SlamController__pb2.SlamDetails.FromString,
response_serializer=SlamController__pb2.Empty.SerializeToString,
request_deserializer=slam_dot_SlamController__pb2.SlamDetails.FromString,
response_serializer=slam_dot_SlamController__pb2.Empty.SerializeToString,
),
'stop_streaming': grpc.unary_unary_rpc_method_handler(
servicer.stop_streaming,
request_deserializer=SlamController__pb2.Empty.FromString,
response_serializer=SlamController__pb2.Empty.SerializeToString,
request_deserializer=slam_dot_SlamController__pb2.Empty.FromString,
response_serializer=slam_dot_SlamController__pb2.Empty.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(