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

Initial upload of proto definition files.

parent f0cce5b7
No related branches found
No related tags found
No related merge requests found
syntax = "proto3";
package ModeliChart.Files;
// Settings of a ModeliChart channel.
message ProtoChannel {
string name = 1;
string fmu_instance_name = 2;
uint32 value_ref = 3;
bool enabled = 4;
}
REM It is assumed that protoc.exe is in PATH or the current directory
REM The output directory must exis before generating the code
mkdir CSharp
mkdir Cpp
REM Each file needs to be compiled seperately
.\protoc Channel.proto --csharp_out=CSharp --cpp_out=Cpp
.\protoc SimulationSettings.proto --csharp_out=CSharp --cpp_out=Cpp
.\protoc UiSettings.proto --csharp_out=CSharp --cpp_out=Cpp
pause
\ No newline at end of file
syntax = "proto3";
package ModeliChart.Files;
import "Channel.proto";
// Linking the values of one channel to another channel with linear calculation
message ProtoChannelLink {
ProtoChannel master_channel = 1;
ProtoChannel slave_channel = 2;
double factor = 3;
double offset = 4;
bool enabled = 5;
}
// Instance of a fmu model. In the frontend a DataSource represents a FmuInstance.
message ProtoFmuInstance {
string instance_name = 1; // Name of one concrete instance (from fmi2Instantiate)
string model_guid = 2; // The guid of the model (from modelDescription.xml)
repeated ProtoChannel channels = 3;
}
// Settings for a possible remote simulation
message ProtoRemoteSettings {
string target_uri = 1; // The remote address & port in Uri format
bool connected = 2;
}
// SAVE THIS! Configuration of a ModeliChart simulation.
message ProtoSimulationSettings {
repeated ProtoChannelLink channel_links = 1;
repeated ProtoFmuInstance fmu_instances = 2;
ProtoRemoteSettings remote_settings = 3;
int64 step_size_nanoseconds = 4; // High precision, max ~ 100000 days ;)
}
syntax = "proto3";
package ModeliChart.Files;
import "Channel.proto";
// Configuration for a ModeliChart instrument
message ProtoInstrument {
double interval_sec = 1;
enum ProtoInstrumentType {
ONE_CHANNEL = 0;
MULTI_CHANNEL = 1;
TWO_CHANNEL = 2;
}
ProtoInstrumentType instrument_type = 2;
bool sweep_mode = 3;
repeated ProtoChannel channels = 4;
}
// Instrument area constists of multiple instruments
message ProtoInstrumentArea {
string name = 1;
repeated ProtoInstrument instruments = 2;
}
// SAVE THIS! ModeliChart can have multiple instruments.
message ProtoUiSettings {
repeated ProtoInstrumentArea instrument_areas = 1;
double refresh_rate_Hz = 2;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment