blob: 6b79c36fc740f0df98f744b67fd350ec5fa8de81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package openxc;
option java_package = "com.openxc";
option java_outer_classname = "BinaryMessages";
message VehicleMessage {
enum Type { RAW = 1; TRANSLATED = 2; }
optional Type type = 1;
optional RawMessage raw_message = 2;
optional TranslatedMessage translated_message = 3;
}
message RawMessage {
optional int32 bus = 1;
optional uint32 message_id = 2;
optional uint64 data = 3;
}
message TranslatedMessage {
enum Type { STRING = 1; NUM = 2; BOOL = 3;
EVENTED_STRING = 4; EVENTED_NUM = 5; EVENTED_BOOL = 6;}
optional Type type = 1;
optional string name = 2;
optional string string_value = 3;
optional double numeric_value = 4;
optional bool boolean_value = 5;
optional string string_event = 6;
optional double numeric_event = 7;
optional bool boolean_event = 8;
}
// TODO we should also consider having an enum type, having each specific
// message defined as a protobuf
|