blob: c7ee16f7131fdec0dbcc72db378abd204b6ee122 (
plain)
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
198
199
200
201
202
203
204
205
|
syntax = "proto3";
package automotivegradelinux;
service Radio {
rpc GetFrequency(GetFrequencyRequest) returns (GetFrequencyResponse) {}
rpc SetFrequency(SetFrequencyRequest) returns (SetFrequencyResponse) {}
rpc GetBand(GetBandRequest) returns (GetBandResponse) {}
rpc SetBand(SetBandRequest) returns (SetBandResponse) {}
rpc GetBandSupported(GetBandSupportedRequest) returns (GetBandSupportedResponse) {}
rpc GetBandParameters(GetBandParametersRequest) returns (GetBandParametersResponse) {}
rpc GetStereoMode(GetStereoModeRequest) returns (GetStereoModeResponse) {}
rpc SetStereoMode(SetStereoModeRequest) returns (SetStereoModeResponse) {}
rpc Start(StartRequest) returns (StartResponse) {}
rpc Stop(StopRequest) returns (StopResponse) {}
rpc ScanStart(ScanStartRequest) returns (ScanStartResponse) {}
rpc ScanStop(ScanStopRequest) returns (ScanStopResponse) {}
rpc GetRDS(GetRDSRequest) returns (GetRDSResponse) {}
rpc GetQuality(GetQualityRequest) returns (GetQualityResponse) {}
rpc SetAlternativeFrequency(SetAlternativeFrequencyRequest) returns (SetAlternativeFrequencyResponse) {}
rpc GetStatusEvents(StatusRequest) returns (stream StatusResponse) {}
}
message GetFrequencyRequest {
}
message GetFrequencyResponse {
uint32 frequency = 1;
}
message SetFrequencyRequest {
uint32 frequency = 1;
}
message SetFrequencyResponse {
uint32 frequency = 1;
}
message GetBandRequest {
}
enum Band {
BAND_UNSPECIFIED = 0;
BAND_AM = 1;
BAND_FM = 2;
BAND_DBS = 3;
}
message GetBandResponse {
Band band = 1;
}
message SetBandRequest {
Band band = 1;
}
message SetBandResponse {
Band band = 1;
}
message GetBandSupportedRequest {
Band band = 1;
}
message GetBandSupportedResponse {
bool supported = 1;
}
message GetBandParametersRequest {
Band band = 1;
}
message GetBandParametersResponse {
uint32 min = 1;
uint32 max = 2;
uint32 step = 3;
}
enum StereoMode {
STEREO_MODE_UNSPECIFIED = 0;
STEREO_MODE_MONO = 1;
STEREO_MODE_STEREO = 2;
}
message GetStereoModeRequest {
}
message GetStereoModeResponse {
StereoMode mode = 1;
}
message SetStereoModeRequest {
StereoMode mode = 1;
}
message SetStereoModeResponse {
StereoMode mode = 1;
}
message StartRequest {
}
message StartResponse {
}
message StopRequest {
}
message StopResponse {
}
enum ScanDirection {
SCAN_DIRECTION_UNSPECIFIED = 0;
SCAN_DIRECTION_FORWARD = 1;
SCAN_DIRECTION_BACKWARD = 2;
}
message ScanStartRequest {
ScanDirection direction = 1;
}
message ScanStartResponse {
}
message ScanStopRequest {
}
message ScanStopResponse {
}
message GetRDSRequest {
}
// NOTE: This is a placeholder and will be revised!
message GetRDSResponse {
string name = 1;
string radio_text = 2;
string alternatives = 3;
string minute = 4;
string hour = 5;
string day = 6;
string month = 7;
string year = 8;
string pi = 9;
string pty = 10;
string ta = 11;
string tp = 12;
string ms = 13;
}
message GetQualityRequest {
}
message GetQualityResponse {
}
message SetAlternativeFrequencyRequest {
uint32 frequency = 1;
}
message SetAlternativeFrequencyResponse {
uint32 frequency = 1;
}
message StatusRequest {
}
message BandStatus {
Band band = 1;
}
message FrequencyStatus {
uint32 frequency = 1;
}
message PlayStatus {
bool playing = 1;
}
message ScanStatus {
bool station_found = 1;
}
message StereoStatus {
StereoMode mode = 1;
}
message StatusResponse {
oneof status {
BandStatus band = 1;
FrequencyStatus frequency = 2;
PlayStatus play = 3;
StereoStatus stereo = 4;
ScanStatus scan = 5;
}
}
|