From cfd3d61e1fc285f1f2c3f25112af674185b8a86f Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 22 Aug 2024 17:50:44 +0200 Subject: [PATCH] feat: added DataType & removed unneeded types --- external/action.proto | 7 ++----- external/definitions.proto | 22 +++++++++------------- external/transfer.proto | 16 +++++++--------- 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/external/action.proto b/external/action.proto index 6393650..0549402 100644 --- a/external/action.proto +++ b/external/action.proto @@ -16,11 +16,8 @@ message ActionLogoffRequest { message ActionLogoffResponse {} message ActionTransferRequest { - repeated Runtime2RuntimeFunctionDefinition runtime2runtimeFunctionDefinition = 1; - repeated RuntimeFunctionDefinition runtimeFunctionDefinition = 2; - repeated RuntimeParameterDefinition runtimeParameterDefinition = 3; - repeated FunctionDefinition functionDefinition = 4; - repeated ParameterDefinition parameterDefinition = 5; + repeated RuntimeFunctionDefinition function_definition = 2; + repeated RuntimeParameterDefinition parameter_definition = 3; } message ActionTransferResponse { diff --git a/external/definitions.proto b/external/definitions.proto index 664fae6..bb1e1ba 100644 --- a/external/definitions.proto +++ b/external/definitions.proto @@ -2,12 +2,6 @@ syntax = "proto3"; package external; -message Runtime2RuntimeFunctionDefinition { - int32 id = 1; - int32 runtime_id = 2; - int32 runtime_function_id = 3; -} - message RuntimeFunctionDefinition { int32 id = 1; int32 return_type = 2; @@ -20,15 +14,17 @@ message RuntimeParameterDefinition { string name = 4; } -message FunctionDefinition { +message DataType { int32 id = 1; - int32 runtime_function_id = 2; + EDataType type = 2; int32 return_type = 3; + int32 parent = 4; } -message ParameterDefinition { - int32 id = 1; - int32 function_id = 2; - int32 type = 3; - string name = 4; +enum EDataType { + PRIMITIVE = 0; + TYPE = 1; + OBJECT = 2; + DATATYPE = 3; + FUNCTION = 4; } \ No newline at end of file diff --git a/external/transfer.proto b/external/transfer.proto index 8c91650..941d5bd 100644 --- a/external/transfer.proto +++ b/external/transfer.proto @@ -4,18 +4,16 @@ import "definitions.proto"; package external; -message Information { +message InformationRequest { string identifier = 1; + repeated RuntimeFunctionDefinition function_definition = 2; + repeated RuntimeParameterDefinition parameter_definition = 3; +} - oneof message_type { - Runtime2RuntimeFunctionDefinition runtime2RuntimeFunctionDefinition = 2; - RuntimeFunctionDefinition runtimeFunctionDefinition = 3; - RuntimeParameterDefinition runtimeParameterDefinition = 4; - FunctionDefinition functionDefinition = 5; - ParameterDefinition parameterDefinition = 6; - } +message InformationResponse { + bool success = 1; } service ActionTransferService { - rpc TransferInformation(stream Information) returns (stream Information); + rpc Transfer (stream InformationRequest) returns (InformationRequest); } \ No newline at end of file