Skip to content
Snippets Groups Projects
Commit f07e8379 authored by Tim Übelhör's avatar Tim Übelhör
Browse files

Updated for easier parsing.

parent 60a8b0eb
No related branches found
No related tags found
No related merge requests found
...@@ -40,36 +40,6 @@ service ModeliBackend { ...@@ -40,36 +40,6 @@ service ModeliBackend {
rpc Log (LogRequest) returns (stream LogResponse); rpc Log (LogRequest) returns (stream LogResponse);
} }
// From Fmi2Standard
enum Fmi2Status {
FMI2_OK = 0;
FMI2_WARNING = 1;
FMI2_DISCARD = 2;
FMI2_ERROR = 3;
FMI2_FATAL = 4;
FMI2_PENDING = 5;
}
// Contains values from and for the fmu
message IntValue {
uint32 value_ref = 1;
int32 value = 2;
}
message RealValue {
uint32 value_ref = 1;
double value = 2;
}
message BoolValue {
uint32 value_ref = 1;
int32 value = 2; // Fmi2 standard encodes bools as int (1: true, 0: false)
}
message StringValue {
uint32 value_ref = 1;
string value = 2;
}
// The metadata of a ChannelLink // The metadata of a ChannelLink
message ChannelLink { message ChannelLink {
string master_instance_name = 1; string master_instance_name = 1;
...@@ -84,7 +54,7 @@ message ChannelLink { ...@@ -84,7 +54,7 @@ message ChannelLink {
message PlayRequest {} message PlayRequest {}
message PlayResponse { message PlayResponse {
Fmi2Status status = 1; int32 status = 1;
} }
message PlayFastRequest { message PlayFastRequest {
...@@ -92,7 +62,7 @@ message PlayFastRequest { ...@@ -92,7 +62,7 @@ message PlayFastRequest {
} }
message PlayFastResponse { message PlayFastResponse {
Fmi2Status status = 1; int32 status = 1;
} }
message PauseRequest {} message PauseRequest {}
...@@ -102,7 +72,7 @@ message PauseResponse {} ...@@ -102,7 +72,7 @@ message PauseResponse {}
message StopRequest {} message StopRequest {}
message StopResponse { message StopResponse {
Fmi2Status status = 1; int32 status = 1;
} }
message AddFmuRequest { message AddFmuRequest {
...@@ -138,50 +108,70 @@ message RemoveChannelLinkResponse { ...@@ -138,50 +108,70 @@ message RemoveChannelLinkResponse {
bool success = 1; bool success = 1;
} }
message IntValues {
repeated uint32 vrs = 1;
repeated int32 values = 2;
}
message SetIntRequest { message SetIntRequest {
string instance_name = 1; string instance_name = 1;
repeated IntValue int_value = 2; IntValues values = 2;
} }
message SetIntResponse { message SetIntResponse {
Fmi2Status status = 1; int32 status = 1;
}
message RealValues {
repeated uint32 vrs = 1;
repeated double values = 2;
} }
message SetRealRequest { message SetRealRequest {
string instance_name = 1; string instance_name = 1;
repeated RealValue real_value = 2; RealValues values = 2;
} }
message SetRealResponse { message SetRealResponse {
Fmi2Status status = 1; int32 status = 1;
}
message BoolValues {
repeated uint32 vrs = 1;
repeated int32 values = 2;
} }
message SetBoolRequest { message SetBoolRequest {
string instance_name = 1; string instance_name = 1;
repeated BoolValue bool_value = 2; BoolValues values = 2;
} }
message SetBoolResponse { message SetBoolResponse {
Fmi2Status status = 1; int32 status = 1;
}
message StringValues {
repeated uint32 vrs = 1;
repeated string values = 2;
} }
message SetStringRequest { message SetStringRequest {
string instance_name = 1; string instance_name = 1;
repeated StringValue string_value = 2; StringValues values = 2;
} }
message SetStringResponse { message SetStringResponse {
Fmi2Status status = 1; int32 status = 1;
} }
message NewValuesRequest {} message NewValuesRequest {}
message NewValuesResponse { message NewValuesResponse {
double timestamp = 1; double timestamp = 1;
repeated IntValue int_value = 2; IntValues int_values = 2;
repeated RealValue real_value = 3; RealValues real_values = 3;
repeated BoolValue bool_value = 4; BoolValues bool_values = 4;
repeated StringValue string_value = 5; StringValues string_values = 5;
string instance_name = 6; string instance_name = 6;
} }
...@@ -189,6 +179,6 @@ message LogRequest {} ...@@ -189,6 +179,6 @@ message LogRequest {}
message LogResponse { message LogResponse {
string instance_name = 1; string instance_name = 1;
Fmi2Status status = 2; int32 status = 2;
string message = 3; string message = 3;
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment