grpc_client/generated/cmvr/api/camera_service_pb2_grpc.py

528 lines
23 KiB
Python
Raw Permalink Normal View History

2025-11-13 03:01:00 +08:00
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
2026-03-16 09:23:56 +08:00
import warnings
2025-11-13 03:01:00 +08:00
from cmvr.api import camera_command_pb2 as cmvr_dot_api_dot_camera__command__pb2
2026-03-16 09:23:56 +08:00
GRPC_GENERATED_VERSION = '1.76.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ ' but the generated code in cmvr/api/camera_service_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
2025-11-13 03:01:00 +08:00
class CameraServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetStatus = channel.unary_unary(
'/cmvr.api.CameraService/GetStatus',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.StartCamera = channel.unary_unary(
'/cmvr.api.CameraService/StartCamera',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.StopCamera = channel.unary_unary(
'/cmvr.api.CameraService/StopCamera',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.GetRGBImage = channel.unary_unary(
'/cmvr.api.CameraService/GetRGBImage',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.GetDepthImage = channel.unary_unary(
'/cmvr.api.CameraService/GetDepthImage',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.GetRGBDImages = channel.unary_unary(
'/cmvr.api.CameraService/GetRGBDImages',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.StartRecording = channel.unary_unary(
'/cmvr.api.CameraService/StartRecording',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.StopRecording = channel.unary_unary(
'/cmvr.api.CameraService/StopRecording',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.GetRGBImageStream = channel.stream_stream(
'/cmvr.api.CameraService/GetRGBImageStream',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.GetDepthImageStream = channel.stream_stream(
'/cmvr.api.CameraService/GetDepthImageStream',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.GetRGBDImagesStream = channel.stream_stream(
'/cmvr.api.CameraService/GetRGBDImagesStream',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
class CameraServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def GetStatus(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def StartCamera(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def StopCamera(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRGBImage(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetDepthImage(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRGBDImages(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def StartRecording(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def StopRecording(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRGBImageStream(self, request_iterator, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetDepthImageStream(self, request_iterator, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRGBDImagesStream(self, request_iterator, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_CameraServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetStatus': grpc.unary_unary_rpc_method_handler(
servicer.GetStatus,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Feedback.SerializeToString,
),
'StartCamera': grpc.unary_unary_rpc_method_handler(
servicer.StartCamera,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Feedback.SerializeToString,
),
'StopCamera': grpc.unary_unary_rpc_method_handler(
servicer.StopCamera,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Feedback.SerializeToString,
),
'GetRGBImage': grpc.unary_unary_rpc_method_handler(
servicer.GetRGBImage,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Feedback.SerializeToString,
),
'GetDepthImage': grpc.unary_unary_rpc_method_handler(
servicer.GetDepthImage,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Feedback.SerializeToString,
),
'GetRGBDImages': grpc.unary_unary_rpc_method_handler(
servicer.GetRGBDImages,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Feedback.SerializeToString,
),
'StartRecording': grpc.unary_unary_rpc_method_handler(
servicer.StartRecording,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Feedback.SerializeToString,
),
'StopRecording': grpc.unary_unary_rpc_method_handler(
servicer.StopRecording,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Feedback.SerializeToString,
),
'GetRGBImageStream': grpc.stream_stream_rpc_method_handler(
servicer.GetRGBImageStream,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Feedback.SerializeToString,
),
'GetDepthImageStream': grpc.stream_stream_rpc_method_handler(
servicer.GetDepthImageStream,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Feedback.SerializeToString,
),
'GetRGBDImagesStream': grpc.stream_stream_rpc_method_handler(
servicer.GetRGBDImagesStream,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Feedback.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'cmvr.api.CameraService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
2026-03-16 09:23:56 +08:00
server.add_registered_method_handlers('cmvr.api.CameraService', rpc_method_handlers)
2025-11-13 03:01:00 +08:00
# This class is part of an EXPERIMENTAL API.
class CameraService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def GetStatus(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.CameraService/GetStatus',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def StartCamera(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.CameraService/StartCamera',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def StopCamera(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.CameraService/StopCamera',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def GetRGBImage(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.CameraService/GetRGBImage',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def GetDepthImage(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.CameraService/GetDepthImage',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def GetRGBDImages(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.CameraService/GetRGBDImages',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def StartRecording(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.CameraService/StartRecording',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def StopRecording(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.CameraService/StopRecording',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def GetRGBImageStream(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.stream_stream(
request_iterator,
target,
'/cmvr.api.CameraService/GetRGBImageStream',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def GetDepthImageStream(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.stream_stream(
request_iterator,
target,
'/cmvr.api.CameraService/GetDepthImageStream',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def GetRGBDImagesStream(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.stream_stream(
request_iterator,
target,
'/cmvr.api.CameraService/GetRGBDImagesStream',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)