forked from jeroni7100/zwift-packet-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zwiftMessages.proto
197 lines (176 loc) · 3.92 KB
/
zwiftMessages.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
syntax="proto3";
message PlayerState {
int32 id = 1;
int64 worldTime = 2;
int32 distance = 3;
int32 roadTime = 4;
int32 laps = 5;
int32 speed = 6;
int32 roadPosition = 8;
int32 cadenceUHz = 9;
int32 heartrate = 11;
int32 power = 12;
int64 heading = 13;
int32 lean = 14;
int32 climbing = 15;
int32 time = 16;
int32 f19 = 19;
int32 f20 = 20;
int32 progress = 21;
int64 customisationId = 22;
int32 justWatching = 23;
int32 calories = 24;
float x = 25;
float altitude = 26;
float y = 27;
int32 watchingRiderId = 28;
int32 groupId = 29;
int64 sport = 31;
float f34 = 34; // actual distance moved included lateral movement
}
message ClientToServer {
int32 connected = 1;
int32 rider_id = 2;
int64 world_time = 3;
PlayerState state = 7;
int32 seqno = 4;
int64 tag8 = 8;
int64 tag9 = 9;
int64 last_update = 10;
int64 tag11 = 11;
int64 last_player_update = 12;
}
message UnknownMessage1 {
// string firstName=7;
// string lastName=8;
// string timestamp=17;
}
message UnknownMessage {
// int64 tag1=1;
// UnknownMessage1 tag4=4;
}
message PlayerUpdate {
int64 tag1 = 1;
int32 tag2 = 2;
int32 tag3 = 3;
bytes payload = 4;
int64 tag5 = 5;
int64 tag6 = 6;
int64 tag7 = 7;
int64 tag8 = 8;
int64 tag9 = 9;
int64 tag11 = 11;
int64 tag12 = 12;
int64 tag14 = 14;
int64 tag15 = 15;
}
message Payload105 { // player entered world ?
int64 f1 = 1;
int32 f2 = 2;
int32 f3 = 3;
int64 f4 = 4; // int32?
int64 f5 = 5;
int64 f6 = 6; // int32?
string firstName = 7;
string lastName = 8;
int64 f9 = 9;
int64 f11 = 11;
int32 f12 = 12;
int32 f13 = 13;
int32 f14 = 14;
int32 f15 = 15;
int32 f16 = 16;
string f7date = 17;
int32 f19 = 19;
}
message Payload5 { // chat message
int32 rider_id = 1;
int32 to_rider_id = 2; // 0 if public message
int32 f3 = 3; // always value 1 ?
string firstName = 4;
string lastName = 5;
string message = 6;
string avatar = 7;
int32 countryCode = 8;
int32 eventSubgroup = 11;
}
message Payload4 { // ride on
int32 rider_id = 1;
int32 to_rider_id = 2;
string firstName = 3;
string lastName = 4;
int32 countryCode = 5;
}
message Payload2 {
int32 f1 = 1;
int64 f2 = 2;
}
message Payload3 {
int32 f1 = 1;
int64 f2 = 2; // worldtime ?
int32 f3 = 3;
}
message Payload110 {
// format to be determined
}
message Payload109 {
// format to be determined
}
message EventPositions {
int32 position = 1;
message EventRiderPosition {
int32 rider_id = 1;
// ?? float distance_covered = 2;
}
repeated EventRiderPosition eventRiderPosition = 4;
int32 num_riders = 116;
}
message ServerToClient {
int32 tag1 = 1;
int32 rider_id = 2;
int64 world_time = 3;
int32 seqno = 4;
repeated PlayerState player_states = 8;
repeated PlayerUpdate player_updates = 9;
int64 tag11 = 11;
int64 tag17 = 17;
int32 num_msgs = 18;
int32 msgnum = 19;
EventPositions event_positions = 23;
}
message WorldAttributes {
int32 world_id = 1;
string name = 2;
int64 tag3 = 3;
int64 tag5 = 4;
int64 world_time = 6;
int64 clock_time = 7;
}
message WorldAttribute {
int64 world_time = 2;
}
message EventSubgroupProtobuf {
int32 id = 1;
string name = 2;
int32 rules = 8;
int32 route = 22;
int32 laps = 25;
int32 startLocation = 29;
int32 label = 30;
int32 paceType = 31;
int32 jerseyHash = 36;
}
message RiderAttributes {
int32 f2 = 2;
int32 f3 = 3;
message AttributeMessage {
int32 myId = 1;
int32 theirId = 2;
string firstName = 3;
string lastName = 4;
int32 countryCode = 5;
}
AttributeMessage attributeMessage = 4;
int32 theirId = 10;
int32 f13 = 13;
}