Use a stream for the steering as well.

This commit is contained in:
Piv
2019-11-24 13:12:55 +10:30
parent 070a87f285
commit d1695772b3
3 changed files with 7 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import MotorControl.motorService_pb2 as motorService__pb2
import motorService_pb2 as motorService__pb2
class CarControlStub(object):
@@ -19,7 +19,7 @@ class CarControlStub(object):
request_serializer=motorService__pb2.ThrottleRequest.SerializeToString,
response_deserializer=motorService__pb2.ThrottleResponse.FromString,
)
self.SetSteering = channel.unary_unary(
self.SetSteering = channel.stream_unary(
'/MotorControl.CarControl/SetSteering',
request_serializer=motorService__pb2.SteeringRequest.SerializeToString,
response_deserializer=motorService__pb2.SteeringResponse.FromString,
@@ -37,7 +37,7 @@ class CarControlServicer(object):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetSteering(self, request, context):
def SetSteering(self, request_iterator, context):
# missing associated documentation comment in .proto file
pass
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@@ -52,7 +52,7 @@ def add_CarControlServicer_to_server(servicer, server):
request_deserializer=motorService__pb2.ThrottleRequest.FromString,
response_serializer=motorService__pb2.ThrottleResponse.SerializeToString,
),
'SetSteering': grpc.unary_unary_rpc_method_handler(
'SetSteering': grpc.stream_unary_rpc_method_handler(
servicer.SetSteering,
request_deserializer=motorService__pb2.SteeringRequest.FromString,
response_serializer=motorService__pb2.SteeringResponse.SerializeToString,