1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-16 00:00:02 +01:00
VILLASnode/lib/io/villas.proto

54 lines
1.8 KiB
Protocol Buffer

/// Protobuf schema based on msg_format.h
///
/// @file
/// @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
/// @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
/// @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/>.
////////////////////////////////////////////////////////////////////////////////////
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];
optional uint32 sequence = 2; // The sequence number is incremented by one for consecutive messages.
optional uint32 id = 3; // An id which identifies the source of this sample.
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 {
float f = 1; // Floating point values.
int32 i = 2; // Integer values.
}
}