2017-10-27 19:16:09 +02:00
|
|
|
/// Protobuf schema based on msg_format.h
|
|
|
|
///
|
|
|
|
/// @file
|
2025-01-14 14:42:39 +00:00
|
|
|
/// 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
|
2017-10-27 19:16:09 +02:00
|
|
|
|
2018-02-17 11:18:10 +01:00
|
|
|
syntax = "proto2";
|
|
|
|
|
2017-10-27 19:16:09 +02:00
|
|
|
package villas.node;
|
|
|
|
|
|
|
|
message Message {
|
2025-01-14 14:42:39 +00:00
|
|
|
repeated Sample samples = 1;
|
2017-10-27 19:16:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message Sample {
|
2025-01-14 14:42:39 +00:00
|
|
|
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 for consecutive samples.
|
|
|
|
optional Timestamp ts_origin = 3;
|
|
|
|
optional Timestamp ts_received = 4;
|
|
|
|
optional bool new_frame = 5;
|
|
|
|
repeated Value values = 100;
|
2017-10-27 19:16:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message Timestamp {
|
2025-01-14 14:42:39 +00:00
|
|
|
required uint32 sec = 1; // Seconds since 1970-01-01 00:00:00
|
|
|
|
required uint32 nsec = 2; // Nanoseconds of the current second.
|
2017-10-27 19:16:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message Value {
|
2025-01-14 14:42:39 +00:00
|
|
|
oneof value {
|
|
|
|
double f = 1; // Floating point values.
|
|
|
|
int64 i = 2; // Integer values.
|
|
|
|
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 {
|
2025-01-14 14:42:39 +00:00
|
|
|
required float real = 1; // Real component
|
|
|
|
required float imag = 2; // Imaginary component
|
2018-08-20 18:30:24 +02:00
|
|
|
}
|