-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrigger.proto
57 lines (53 loc) · 1.35 KB
/
trigger.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
syntax = "proto3";
package lebai.trigger;
import "google/protobuf/empty.proto";
import "io.proto";
message Condition {
// 当一系列按键被同时按下时
repeated io.ButtonIndex pressed = 1;
// 当指定按键处于某状态时
io.ButtonIndex button = 11;
io.ButtonStatus status = 12;
}
enum Function {
// 无
NONE = 0;
// 进入示教模式
START_TEACH_MODE = 1;
// 退出示教模式
END_TEACH_MODE = 2;
// 设置关节零位
SET_ZERO = 3;
// 改变手臂启停状态
CHANGE_POWER = 4;
// 运行快捷任务1对应的场景
SHORT_TASK1 = 11;
// 运行快捷任务2对应的场景
SHORT_TASK2 = 12;
// 运行快捷任务3对应的场景
SHORT_TASK3 = 13;
// 运行快捷任务4对应的场景
SHORT_TASK4 = 14;
// 运行快捷任务5对应的场景
SHORT_TASK5 = 15;
// 运行快捷任务6对应的场景
SHORT_TASK6 = 16;
// 运行快捷任务7对应的场景
SHORT_TASK7 = 17;
// 运行快捷任务8对应的场景
SHORT_TASK8 = 18;
// 运行快捷任务9对应的场景
SHORT_TASK9 = 19;
}
message Trigger {
Condition condition = 1;
Function function = 11;
}
message Triggers {
repeated Trigger triggers = 1;
}
// 条件任务触发器相关服务
service TriggerService {
rpc SetTrigger(Trigger) returns (google.protobuf.Empty);
rpc GetTriggers(google.protobuf.Empty) returns (Triggers);
}