JFJochReceiver: Transfer all radial integration profiles in one ProtoBuf

This commit is contained in:
2023-05-09 22:17:50 +02:00
parent 5b49971dd7
commit e5739f5408
17 changed files with 324 additions and 79 deletions

View File

@@ -199,6 +199,17 @@ async def get_settings(request: Request):
raise HTTPException(status_code=400, detail=e.details())
@app.post("/data_processing/rad_int_profiles")
async def get_settings():
try:
stub = jfjoch_pb2_grpc.gRPC_JFJochBrokerStub(channel)
return MessageToDict(
stub.GetRadialIntegrationProfiles(jfjoch_pb2.Empty()), including_default_value_fields=True
)
except grpc.RpcError as e:
raise HTTPException(status_code=400, detail=e.details())
@app.get("/detector/measurement_statistics")
async def get_meas_stats():
try:

File diff suppressed because one or more lines are too long

View File

@@ -49,6 +49,11 @@ class gRPC_JFJochReceiverStub(object):
request_serializer=jfjoch__pb2.PlotRequest.SerializeToString,
response_deserializer=jfjoch__pb2.Plot.FromString,
)
self.GetRadialIntegrationProfiles = channel.unary_unary(
'/JFJochProtoBuf.gRPC_JFJochReceiver/GetRadialIntegrationProfiles',
request_serializer=jfjoch__pb2.Empty.SerializeToString,
response_deserializer=jfjoch__pb2.RadialIntegrationProfiles.FromString,
)
self.GetPreviewFrame = channel.unary_unary(
'/JFJochProtoBuf.gRPC_JFJochReceiver/GetPreviewFrame',
request_serializer=jfjoch__pb2.Empty.SerializeToString,
@@ -106,6 +111,12 @@ class gRPC_JFJochReceiverServicer(object):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRadialIntegrationProfiles(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 GetPreviewFrame(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@@ -156,6 +167,11 @@ def add_gRPC_JFJochReceiverServicer_to_server(servicer, server):
request_deserializer=jfjoch__pb2.PlotRequest.FromString,
response_serializer=jfjoch__pb2.Plot.SerializeToString,
),
'GetRadialIntegrationProfiles': grpc.unary_unary_rpc_method_handler(
servicer.GetRadialIntegrationProfiles,
request_deserializer=jfjoch__pb2.Empty.FromString,
response_serializer=jfjoch__pb2.RadialIntegrationProfiles.SerializeToString,
),
'GetPreviewFrame': grpc.unary_unary_rpc_method_handler(
servicer.GetPreviewFrame,
request_deserializer=jfjoch__pb2.Empty.FromString,
@@ -295,6 +311,23 @@ class gRPC_JFJochReceiver(object):
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetRadialIntegrationProfiles(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/JFJochProtoBuf.gRPC_JFJochReceiver/GetRadialIntegrationProfiles',
jfjoch__pb2.Empty.SerializeToString,
jfjoch__pb2.RadialIntegrationProfiles.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetPreviewFrame(request,
target,
@@ -767,6 +800,11 @@ class gRPC_JFJochBrokerStub(object):
request_serializer=jfjoch__pb2.PlotRequest.SerializeToString,
response_deserializer=jfjoch__pb2.Plot.FromString,
)
self.GetRadialIntegrationProfiles = channel.unary_unary(
'/JFJochProtoBuf.gRPC_JFJochBroker/GetRadialIntegrationProfiles',
request_serializer=jfjoch__pb2.Empty.SerializeToString,
response_deserializer=jfjoch__pb2.RadialIntegrationProfiles.FromString,
)
self.GetPreview = channel.unary_unary(
'/JFJochProtoBuf.gRPC_JFJochBroker/GetPreview',
request_serializer=jfjoch__pb2.Empty.SerializeToString,
@@ -897,6 +935,12 @@ class gRPC_JFJochBrokerServicer(object):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRadialIntegrationProfiles(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 GetPreview(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@@ -1017,6 +1061,11 @@ def add_gRPC_JFJochBrokerServicer_to_server(servicer, server):
request_deserializer=jfjoch__pb2.PlotRequest.FromString,
response_serializer=jfjoch__pb2.Plot.SerializeToString,
),
'GetRadialIntegrationProfiles': grpc.unary_unary_rpc_method_handler(
servicer.GetRadialIntegrationProfiles,
request_deserializer=jfjoch__pb2.Empty.FromString,
response_serializer=jfjoch__pb2.RadialIntegrationProfiles.SerializeToString,
),
'GetPreview': grpc.unary_unary_rpc_method_handler(
servicer.GetPreview,
request_deserializer=jfjoch__pb2.Empty.FromString,
@@ -1317,6 +1366,23 @@ class gRPC_JFJochBroker(object):
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetRadialIntegrationProfiles(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/JFJochProtoBuf.gRPC_JFJochBroker/GetRadialIntegrationProfiles',
jfjoch__pb2.Empty.SerializeToString,
jfjoch__pb2.RadialIntegrationProfiles.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetPreview(request,
target,