-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproto.proto
53 lines (40 loc) · 959 Bytes
/
proto.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
syntax="proto3";
// https://docs.google.com/spreadsheets/d/1Oy4ajVCVjq2NHR3dN3VcLXvMPwSczzRvMgC31JjsDRA/edit?usp=sharing
import "motion.proto";
import "gps.proto";
import "video.proto";
import "error.proto";
package rocproto;
message Packet {
uint32 magic = 1;
uint32 header = 2;
uint32 ID = 3;
Mv mv = 4;
Cam cam = 5;
Coord coord = 6;
Processing procs = 7;
Connection conn = 8;
Error err = 16;
enum Magic {
Nil = 0;
MAGIC_Number = 0xAF;
}
enum Type {
option allow_alias = true;
UNKOWN = 0;
COMMAND = 1;
DATA = 2;
ERROR = 3;
MASK_TYPE = 3; //11
SHIFT_TYPE = 6;
}
enum Section {
UNKNOWN = 0;
VIDEO_CLIENT = 1;
VIDEO_SERVER = 2;
CONTROL_SERVER = 4;
MASK_DEST = 7; //00 000111
SHIFT_SEND = 3;
MASK_SEND = 56; //00 111000
}
}