61 lines
1.0 KiB
Protocol Buffer
61 lines
1.0 KiB
Protocol Buffer
|
|
syntax = "proto3";
|
|
package core;
|
|
|
|
enum TelemetryDataType {
|
|
Float32 = 0;
|
|
Float64 = 1;
|
|
Boolean = 2;
|
|
}
|
|
|
|
message TelemetryValue {
|
|
oneof value {
|
|
float float_32 = 1;
|
|
double float_64 = 2;
|
|
bool boolean = 3;
|
|
}
|
|
}
|
|
|
|
message UUID {
|
|
string value = 1;
|
|
}
|
|
|
|
// UTC since UNIX
|
|
message Timestamp {
|
|
sfixed64 secs = 1;
|
|
sfixed32 nanos = 2;
|
|
}
|
|
|
|
message CommandParameterDefinition {
|
|
string name = 1;
|
|
TelemetryDataType data_type = 2;
|
|
}
|
|
|
|
message CommandDefinitionRequest {
|
|
string name = 1;
|
|
repeated CommandParameterDefinition parameters = 2;
|
|
}
|
|
|
|
message Command {
|
|
UUID uuid = 1;
|
|
Timestamp timestamp = 2;
|
|
map<string, TelemetryValue> parameters = 3;
|
|
}
|
|
|
|
message CommandResponse {
|
|
UUID uuid = 1;
|
|
bool success = 2;
|
|
string response = 3;
|
|
}
|
|
|
|
message ClientSideCommand {
|
|
oneof inner {
|
|
CommandDefinitionRequest request = 1;
|
|
CommandResponse response = 2;
|
|
}
|
|
}
|
|
|
|
service CommandService {
|
|
rpc NewCommand (stream ClientSideCommand) returns (stream Command);
|
|
}
|