2017-10-27 19:16:09 +02:00
|
|
|
/// Protobuf schema based on msg_format.h
|
|
|
|
///
|
|
|
|
/// @file
|
|
|
|
/// @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
2020-01-20 17:17:00 +01:00
|
|
|
/// @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC
|
2017-10-27 19:16:09 +02:00
|
|
|
/// @license GNU General Public License (version 3)
|
|
|
|
///
|
|
|
|
/// VILLASnode
|
|
|
|
///
|
|
|
|
/// This program is free software: you can redistribute it and/or modify
|
|
|
|
/// it under the terms of the GNU General Public License as published by
|
|
|
|
/// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
/// any later version.
|
|
|
|
///
|
|
|
|
/// This program is distributed in the hope that it will be useful,
|
|
|
|
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
/// GNU General Public License for more details.
|
|
|
|
///
|
|
|
|
/// You should have received a copy of the GNU General Public License
|
|
|
|
/// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-02-17 11:18:10 +01:00
|
|
|
syntax = "proto2";
|
|
|
|
|
2017-10-27 19:16:09 +02:00
|
|
|
package villas.node;
|
|
|
|
|
|
|
|
message Message {
|
|
|
|
repeated Sample samples = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Sample {
|
|
|
|
enum Type {
|
|
|
|
DATA = 1; // Message contains float / integer data values
|
|
|
|
START = 2; // Message marks the beginning of a new simulation case
|
|
|
|
STOP = 3; // Message marks the end of a simulation case
|
|
|
|
};
|
|
|
|
|
|
|
|
required Type type = 1 [default = DATA];
|
2018-08-20 18:30:24 +02:00
|
|
|
optional uint64 sequence = 2; // The sequence number is incremented by one for consecutive messages.
|
2017-10-27 19:16:09 +02:00
|
|
|
optional Timestamp timestamp = 4;
|
|
|
|
repeated Value values = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Timestamp {
|
|
|
|
required uint32 sec = 1; // Seconds since 1970-01-01 00:00:00
|
|
|
|
required uint32 nsec = 2; // Nanoseconds of the current second.
|
|
|
|
}
|
|
|
|
|
|
|
|
message Value {
|
|
|
|
oneof value {
|
2018-08-20 18:30:24 +02:00
|
|
|
double f = 1; // Floating point values.
|
2018-11-22 09:23:37 +02:00
|
|
|
int64 i = 2; // Integer values.
|
2018-08-20 18:30:24 +02:00
|
|
|
bool b = 3; // Boolean values.
|
|
|
|
Complex z = 4; // Complex values.
|
2017-10-27 19:16:09 +02:00
|
|
|
}
|
|
|
|
}
|
2018-08-20 18:30:24 +02:00
|
|
|
|
|
|
|
message Complex {
|
|
|
|
required float real = 1; // Real component
|
|
|
|
required float imag = 2; // Imaginary component
|
|
|
|
}
|