1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
VILLASnode/lib/formats/villas.proto
Steffen Vogel 626e77557a Apply suggestions from Philipps code review
Co-authored-by: Philipp Jungkamp <56401138+PJungkamp@users.noreply.github.com>
Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
2023-09-07 11:16:04 +02:00

46 lines
1.2 KiB
Protocol Buffer

/// Protobuf schema based on msg_format.h
///
/// @file
/// Author: Steffen Vogel <post@steffenvogel.de>
/// SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
/// SPDX-License-Identifier: Apache-2.0
syntax = "proto2";
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 uint64 sequence = 2; // The sequence number is incremented by one for consecutive messages.
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 {
double f = 1; // Floating point values.
int64 i = 2; // Integer values.
bool b = 3; // Boolean values.
Complex z = 4; // Complex values.
}
}
message Complex {
required float real = 1; // Real component
required float imag = 2; // Imaginary component
}