forked from rdkcentral/rdkservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHDMICec_2.json
364 lines (364 loc) · 13.1 KB
/
HDMICec_2.json
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
{
"$schema": "https://raw.githubusercontent.com/rdkcentral/rdkservices/main/Tools/json_generator/schemas/interface.schema.json",
"jsonrpc": "2.0",
"info": {
"title": "HdmiCec_2 API",
"class": "HdmiCec_2",
"description": "The `HdmiCec_2` plugin allows you to configure HDMI Consumer Electronics Control (CEC) on a set-top device. The HdmiCec_2 plugin is meant to be used on the source devices where an application relies on the Thunder plugin to handle protocol related messaging. The plugin also provides API's and events to implement the CEC use cases."
},
"common": {
"$ref": "../common/common.json"
},
"definitions": {
"vendorid": {
"summary": "The vendor ID. The default value is `0019FB` if no value is set. If the device is connected to an LG TV, then `00E091` is used as the vendor ID.",
"type": "string",
"example": "0x0019FB"
},
"name": {
"summary": "The OSD name. The default value is `TV Box` if no value is set.",
"type": "string",
"example": "Sky TV"
},
"enabled": {
"summary": "Indicates whether HDMI-CEC is enabled (`true`) or disabled (`false`). The default value is `true` if the parameter has not been set before.",
"type":"boolean",
"example": false
},
"enabled_otp": {
"summary": "Indicates whether HDMI-CEC OTP is enabled (`true`) or disabled (`false`). The default value is `true` if the parameter has not been set before.",
"type":"boolean",
"example": false
},
"logicalAddress":{
"summary": "Logical address of the device",
"type":"integer",
"example": 0
},
"osdName":{
"summary": "OSD name of the device",
"type":"string",
"example": "TV Box"
},
"vendorID":{
"summary": "Vendor ID of the device",
"type":"string",
"example": "019fb"
},
"status":{
"summary": "`true` if the device is active source otherwise, `false`",
"type": "boolean",
"example": "true"
}
},
"methods": {
"getActiveSourceStatus":{
"summary": "Gets the active source status of the device.",
"params": {
"type":"object",
"properties": {
"status": {
"$ref": "#/definitions/status"
}
},
"required": [
"status"
]
},
"result": {
"$ref": "#/common/result"
}
},
"getDeviceList":{
"summary": "Gets the list of CEC enabled devices connected and system information for each device. The information includes logicalAddress,OSD name and vendor ID.",
"result": {
"type": "object",
"properties": {
"numberofdevices": {
"summary": "number of devices in the `deviceList` array",
"type": "integer",
"example": 1
},
"deviceList":{
"summary": "Object [] of information about each device",
"type":"array",
"items": {
"type": "object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
},
"osdName":{
"$ref": "#/definitions/osdName"
},
"vendorID":{
"$ref": "#/definitions/vendorID"
}
},
"required": [
"logicalAddress",
"osdName",
"vendorID"
]
}
},
"success": {
"$ref": "#/common/success"
}
},
"required": [
"numberofdevices",
"deviceList",
"success"
]
}
},
"getEnabled": {
"summary": "Returns HDMI-CEC driver enabled status.",
"result": {
"type": "object",
"properties": {
"enabled": {
"$ref": "#/definitions/enabled"
},
"success": {
"$ref": "#/common/success"
}
},
"required": [
"enabled",
"success"
]
}
},
"getOSDName":{
"summary": "Returns the OSD name set by the application.",
"result": {
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/name"
},
"success": {
"$ref": "#/common/success"
}
},
"required": [
"name",
"success"
]
}
},
"getOTPEnabled":{
"summary": "Returns HDMI-CEC OTP option enabled status.",
"result": {
"type": "object",
"properties": {
"enabled": {
"$ref": "#/definitions/enabled_otp"
},
"success": {
"$ref": "#/common/success"
}
},
"required": [
"enabled",
"success"
]
}
},
"getVendorId":{
"summary": "Returns the vendor ID set by the application.",
"result": {
"type": "object",
"properties": {
"vendorid": {
"$ref": "#/definitions/vendorid"
},
"success": {
"$ref": "#/common/success"
}
},
"required": [
"vendorid",
"success"
]
}
},
"performOTPAction":{
"summary": "Turns on the TV and takes back the input to the device.",
"result": {
"$ref": "#/common/result"
}
},
"sendKeyPressEvent": {
"summary": "Sends the CEC \\<User Control Pressed\\> and \\<User Control Release\\> message when TV remote key is pressed.\n \n### Event \n\n No Events",
"params": {
"type":"object",
"properties": {
"logicalAddress":{
"$ref": "#/definitions/logicalAddress"
},
"keyCode":{
"summary":"The key code for the pressed key. Possible values : `0x41` (VOLUME_UP), `0x42` (VOLUME_DOWN), `0x43` (MUTE), `0x01` (UP), `0x02` (DOWN), `0x03` (LEFT), `0x04` (RIGHT), `0x00` (SELECT), `0x09` (HOME), `0x0D` (BACK), `0x20` (NUMBER_0), `0x21` (NUMBER_1), `0x22` (NUMBER_2), `0x23` (NUMBER_3), `0x24` (NUMBER_4), `0x25` (NUMBER_5), `0x26` (NUMBER_6), `0x27` (NUMBER_7), `0x28` (NUMBER_8), `0x29` (NUMBER_9)",
"type": "integer",
"example": 65
}
},
"required": [
"logicalAddress",
"keyCode"
]
},
"result": {
"$ref": "#/common/result"
}
},
"sendStandbyMessage": {
"summary": "Sends a CEC \\<Standby\\> message to the logical address of the device.",
"result": {
"$ref": "#/common/result"
}
},
"setEnabled":{
"summary": "Enables or disables HDMI-CEC driver.",
"params": {
"type":"object",
"properties": {
"enabled":{
"$ref": "#/definitions/enabled"
}
},
"required": [
"enabled"
]
},
"result": {
"$ref": "#/common/result"
}
},
"setOSDName":{
"summary": "Sets the OSD name of the application.",
"params": {
"type":"object",
"properties": {
"name": {
"$ref": "#/definitions/name"
}
},
"required": [
"name"
]
},
"result": {
"$ref": "#/common/result"
}
},
"setOTPEnabled":{
"summary": "Enables or disables HDMI-CEC OTP option.",
"params": {
"type":"object",
"properties": {
"enabled": {
"$ref": "#/definitions/enabled_otp"
}
},
"required": [
"enabled"
]
},
"result": {
"$ref": "#/common/result"
}
},
"setVendorId":{
"summary": "Sets the vendor ID of the application.",
"params": {
"type":"object",
"properties": {
"vendorid": {
"$ref": "#/definitions/vendorid"
}
},
"required": [
"vendorid"
]
},
"result": {
"$ref": "#/common/result"
}
}
},
"events": {
"onActiveSourceStatusUpdated":{
"summary": "Triggered when the device active source status changes",
"params": {
"type":"object",
"properties": {
"status": {
"$ref": "#/definitions/status"
}
},
"required": [
"status"
]
}
},
"onDeviceAdded": {
"summary": "Triggered when an HDMI cable is physically connected to the HDMI port on a TV, or the power cable is connected to the source device. After a new device is hotplugged to the port, various information such as OSD name and vendor ID is collected. The `onDeviceAdded` event is sent as soon as any of these details are available. However, the connected device sends the information asynchronously; therefore, the information may not be collected immediately.",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
}
},
"required": [
"logicalAddress"
]
}
},
"onDeviceInfoUpdated": {
"summary": "Triggered when device system information is updated (vendorID, osdName)",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
}
},
"required": [
"logicalAddress"
]
}
},
"onDeviceRemoved": {
"summary": "Triggered when HDMI cable is physically removed from the HDMI port on a TV or the power cable is removed from the source device. The device is considered removed when no ACK messages are received after pinging the device.",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
}
},
"required": [
"logicalAddress"
]
}
},
"standbyMessageReceived":{
"summary": "Triggered when the source device changes status to `STANDBY`",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
}
},
"required": [
"logicalAddress"
]
}
}
}
}