-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignal.proto
48 lines (44 loc) · 1.11 KB
/
signal.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
syntax = "proto3";
package lebai.signal;
import "google/protobuf/empty.proto";
import "cmp.proto";
message SetSignalRequest {
// 取值范围0~255
uint32 key = 1;
int32 value = 2;
}
message SetSignalsRequest {
// 取值范围0~255
uint32 key = 1;
repeated int32 values = 2;
}
message WaitSignalRequest {
// 取值范围0~255
uint32 key = 1;
int32 value = 2;
cmp.Relation relation = 3;
}
message GetSignalRequest {
// 取值范围0~255
uint32 key = 1;
}
message GetSignalResponse {
int32 value = 1;
}
message GetSignalsRequest {
// 取值范围0~255
uint32 key = 1;
uint32 len = 2;
}
message GetSignalsResponse {
repeated int32 values = 1;
}
// 信号量相关服务
service SignalService {
rpc SetSignal(SetSignalRequest) returns (google.protobuf.Empty);
rpc SetSignals(SetSignalsRequest) returns (google.protobuf.Empty);
rpc GetSignal(GetSignalRequest) returns (GetSignalResponse);
rpc GetSignals(GetSignalsRequest) returns (GetSignalsResponse);
rpc WaitSignal(WaitSignalRequest) returns (google.protobuf.Empty);
rpc AddSignal(SetSignalRequest) returns (google.protobuf.Empty);
}