-
Notifications
You must be signed in to change notification settings - Fork 0
/
tesla.proto
87 lines (69 loc) · 1.35 KB
/
tesla.proto
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
syntax = "proto3";
option go_package = "internal/powerwall";
package tedapi;
// ***** Parent *****
message ParentMessage {
MessageEnvelope message = 1;
Tail tail = 2;
}
message MessageEnvelope {
int32 deliveryChannel = 1;
Participant sender = 2;
Participant recipient = 3;
optional ConfigType config = 15;
optional QueryType payload = 16;
}
message Participant {
oneof id {
string din = 1;
int32 teslaService = 2;
int32 local = 3;
int32 authorizedClient = 4;
}
}
message Tail {
int32 value = 1;
}
enum Format {
None = 0;
Raw = 1;
Json = 2;
}
// ***** Query = 16 *****
message QueryType { // 16
optional PayloadQuerySend send = 1;
optional PayloadString recv = 2;
}
message PayloadQuerySend { // 1
Format requestFormat = 1;
optional PayloadString payload = 2;
optional bytes signature = 3;
optional StringValue body = 4;
}
// ***** Config = 15 *****
message ConfigType { // 15
oneof config {
PayloadConfigSend send = 1;
PayloadConfigRecv recv = 2;
}
}
message PayloadConfigSend { // 1
int32 num = 1;
string file = 2;
}
message PayloadConfigRecv { // 2
ConfigString file = 1;
bytes code = 2;
}
message ConfigString {
string name = 1;
string text = 100;
}
// ***** General *****
message PayloadString {
int32 value = 1;
string text = 2;
}
message StringValue {
string value = 1;
}