blob: 39130831966dca48e9ff910a170dca2794b99984 (
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
|
package openxc;
message VehicleMessage {
enum Type { RAW = 1; STRING = 2; NUM = 3; BOOL = 4; }
optional Type type = 1;
optional RawMessage raw_message = 2;
optional TranslatedStringMessage string_message = 3;
optional TranslatedNumericMessage numerical_message = 4;
optional TranslatedBooleanMessage boolean_message = 5;
}
message RawMessage {
optional int32 bus = 1;
optional uint32 message_id = 2;
optional sint64 data = 3;
}
message TranslatedStringMessage {
optional string name = 1;
optional string value = 2;
}
message TranslatedNumericMessage {
optional string name = 1;
optional double value = 2;
}
message TranslatedBooleanMessage {
optional string name = 1;
optional bool value = 2;
}
// TODO we should also consider having an enum type, h aving each specific
// message defined as a protobuf
|