Version: 1.0.0
A HdmiCecSource plugin for Thunder framework.
The HdmiCecSource plugin provides an interface for HdmiCecSource.
The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [Thunder].
The table below lists configuration options of the plugin.
| Name | Type | Description |
|---|---|---|
| callsign | string | Plugin instance name (default: org.rdk.HdmiCecSource) |
| classname | string | Class name: HdmiCecSource |
| locator | string | Library name: libWPEFrameworkHdmiCecSource.so |
| autostart | boolean | Determines if the plugin shall be started automatically along with the framework |
The following methods are provided by the HdmiCecSource plugin:
HdmiCecSource interface methods:
| Method | Description |
|---|---|
| getActiveSourceStatus | Gets the status if the device is the current active source |
| getDeviceList | Gets the list of devices connected to the HDMI CEC source |
| getEnabled | Gets the status of the HDMI CEC source |
| getOSDName | Gets the OSD name of the HDMI CEC source |
| getOTPEnabled | Gets the OTP enabled status of the HDMI CEC source |
| getVendorId | Gets the vendor ID of the HDMI CEC source |
| performOTPAction | Performs the OTP action |
| sendKeyPressEvent | Sends a key press event to the HDMI CEC device. |
| sendStandbyMessage | Sends a standby message to another CEC device |
| setEnabled | Sets the status of the HDMI CEC source |
| setOSDName | Sets the OSD name of the HDMI CEC source |
| setOTPEnabled | Sets the OTP enabled status of the HDMI CEC source |
| setVendorId | Sets the vendor ID of the HDMI CEC source |
Gets the status if the device is the current active source
Event details will be updated soon.
This method takes no parameters.
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.status | bool | Is the active source active or not |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 0,
"method": "org.rdk.HdmiCecSource.getActiveSourceStatus"
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "method": "org.rdk.HdmiCecSource.getActiveSourceStatus"}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 0,
"result": {
"status": true,
"success": true
}
}Gets the list of devices connected to the HDMI CEC source
Event details will be updated soon.
This method takes no parameters.
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.numberofdevices | integer | Number of devices connected to the HDMI CEC source |
| result.deviceList | IHdmiCecSourceDeviceListIterator | List of devices connected to the HDMI CEC source |
| result.deviceList[#].logicalAddress | integer | |
| result.deviceList[#].vendorID | string | |
| result.deviceList[#].osdName | string | |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 1,
"method": "org.rdk.HdmiCecSource.getDeviceList"
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 1, "method": "org.rdk.HdmiCecSource.getDeviceList"}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 1,
"result": {
"numberofdevices": 0,
"deviceList": [
{
"logicalAddress": 0,
"vendorID": "",
"osdName": ""
}
],
"success": true
}
}Gets the status of the HDMI CEC source
Event details will be updated soon.
This method takes no parameters.
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.enabled | bool | Is the HDMI CEC source enabled or not |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 2,
"method": "org.rdk.HdmiCecSource.getEnabled"
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 2, "method": "org.rdk.HdmiCecSource.getEnabled"}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 2,
"result": {
"enabled": true,
"success": true
}
}Gets the OSD name of the HDMI CEC source
Event details will be updated soon.
This method takes no parameters.
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.name | string | OSD name of the HDMI CEC source |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 3,
"method": "org.rdk.HdmiCecSource.getOSDName"
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 3, "method": "org.rdk.HdmiCecSource.getOSDName"}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 3,
"result": {
"name": "",
"success": true
}
}Gets the OTP enabled status of the HDMI CEC source
Event details will be updated soon.
This method takes no parameters.
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.enabled | bool | Is the HDMI CEC source enabled or not |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 4,
"method": "org.rdk.HdmiCecSource.getOTPEnabled"
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 4, "method": "org.rdk.HdmiCecSource.getOTPEnabled"}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 4,
"result": {
"enabled": true,
"success": true
}
}Gets the vendor ID of the HDMI CEC source
Event details will be updated soon.
This method takes no parameters.
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.vendorid | string | |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 5,
"method": "org.rdk.HdmiCecSource.getVendorId"
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 5, "method": "org.rdk.HdmiCecSource.getVendorId"}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 5,
"result": {
"vendorid": "",
"success": true
}
}Performs the OTP action
Event details will be updated soon.
This method takes no parameters.
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 6,
"method": "org.rdk.HdmiCecSource.performOTPAction"
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 6, "method": "org.rdk.HdmiCecSource.performOTPAction"}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 6,
"result": {
"success": true
}
}Sends a key press event to the HDMI CEC device.
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.logicalAddress | integer | Logical address of the device |
| params.keyCode | integer | Key code of the key press event |
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 7,
"method": "org.rdk.HdmiCecSource.sendKeyPressEvent",
"params": {
"logicalAddress": 0,
"keyCode": 0
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 7, "method": "org.rdk.HdmiCecSource.sendKeyPressEvent", "params": {"logicalAddress": 0, "keyCode": 0}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 7,
"result": {
"success": true
}
}Sends a standby message to another CEC device
Event details will be updated soon.
This method takes no parameters.
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 8,
"method": "org.rdk.HdmiCecSource.sendStandbyMessage"
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 8, "method": "org.rdk.HdmiCecSource.sendStandbyMessage"}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 8,
"result": {
"success": true
}
}Sets the status of the HDMI CEC source
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.enabled | bool | Is the HDMI CEC source enabled or not |
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 9,
"method": "org.rdk.HdmiCecSource.setEnabled",
"params": {
"enabled": true
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 9, "method": "org.rdk.HdmiCecSource.setEnabled", "params": {"enabled": true}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 9,
"result": {
"success": true
}
}Sets the OSD name of the HDMI CEC source
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.name | string | OSD name of the HDMI CEC source |
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 10,
"method": "org.rdk.HdmiCecSource.setOSDName",
"params": {
"name": ""
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 10, "method": "org.rdk.HdmiCecSource.setOSDName", "params": {"name": ""}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 10,
"result": {
"success": true
}
}Sets the OTP enabled status of the HDMI CEC source
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.enabled | bool | Is the HDMI CEC source enabled or not |
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 11,
"method": "org.rdk.HdmiCecSource.setOTPEnabled",
"params": {
"enabled": true
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 11, "method": "org.rdk.HdmiCecSource.setOTPEnabled", "params": {"enabled": true}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 11,
"result": {
"success": true
}
}Sets the vendor ID of the HDMI CEC source
Event details will be updated soon.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.vendorid | string |
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.success | bool | Is the operation successful or not |
{
"jsonrpc": 2.0,
"id": 12,
"method": "org.rdk.HdmiCecSource.setVendorId",
"params": {
"vendorid": ""
}
}curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 12, "method": "org.rdk.HdmiCecSource.setVendorId", "params": {"vendorid": ""}}' http://127.0.0.1:9998/jsonrpc
{
"jsonrpc": 2.0,
"id": 12,
"result": {
"success": true
}
}Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.
The following events are provided by the HdmiCecSource plugin:
HdmiCecSource interface events:
| Event | Description |
|---|---|
| onActiveSourceStatusUpdated | Notifies when the active source status is updated |
| onDeviceAdded | Notifies when CEC device added to CEC network |
| onDeviceInfoUpdated | Notifies when CEC device info updated |
| onDeviceRemoved | Notifies when CEC device removed from CEC network |
| onKeyPressEvent | Notifies when a key press CEC message is received from other CEC device |
| onKeyReleaseEvent | Notifies when a key release CEC message is received from other CEC device |
| standbyMessageReceived | Notifies when CEC standby message received from the other CEC device |
Notifies when the active source status is updated
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.status | bool | Is the active source active or not |
{
"jsonrpc": 2.0,
"id": 13,
"method": "org.rdk.HdmiCecSource.onActiveSourceStatusUpdated",
"params": {
"status": true
}
}Notifies when CEC device added to CEC network
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.logicalAddress | int | Logical address of the added device |
{
"jsonrpc": 2.0,
"id": 14,
"method": "org.rdk.HdmiCecSource.onDeviceAdded",
"params": {
"logicalAddress": 0
}
}Notifies when CEC device info updated
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.logicalAddress | int | Logical address of the added device |
{
"jsonrpc": 2.0,
"id": 15,
"method": "org.rdk.HdmiCecSource.onDeviceInfoUpdated",
"params": {
"logicalAddress": 0
}
}Notifies when CEC device removed from CEC network
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.logicalAddress | int | Logical address of the added device |
{
"jsonrpc": 2.0,
"id": 16,
"method": "org.rdk.HdmiCecSource.onDeviceRemoved",
"params": {
"logicalAddress": 0
}
}Notifies when a key press CEC message is received from other CEC device
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.logicalAddress | int | Logical address of the added device |
| params.keyCode | int | Key code of the key press event |
{
"jsonrpc": 2.0,
"id": 17,
"method": "org.rdk.HdmiCecSource.onKeyPressEvent",
"params": {
"logicalAddress": 0,
"keyCode": 0
}
}Notifies when a key release CEC message is received from other CEC device
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.logicalAddress | int | Logical address of the added device |
{
"jsonrpc": 2.0,
"id": 18,
"method": "org.rdk.HdmiCecSource.onKeyReleaseEvent",
"params": {
"logicalAddress": 0
}
}Notifies when CEC standby message received from the other CEC device
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.logicalAddress | int | Logical address of the added device |
{
"jsonrpc": 2.0,
"id": 19,
"method": "org.rdk.HdmiCecSource.standbyMessageReceived",
"params": {
"logicalAddress": 0
}
}