diff --git a/docs/apis/AnalyticsPlugin.md b/docs/apis/AnalyticsPlugin.md index e0f75ed7..26eb33af 100644 --- a/docs/apis/AnalyticsPlugin.md +++ b/docs/apis/AnalyticsPlugin.md @@ -1,92 +1,78 @@ - -# Analytics Plugin + +# IAnalytics Plugin -**Version: [1.0.0]()** +**Version: [1.0.0](https://github.com/rdkcentral/rdkservices/blob/main/IAnalytics/CHANGELOG.md)** -A org.rdk.Analytics plugin for Thunder framework. +A IAnalytics plugin for Thunder framework. ### Table of Contents -- [Abbreviation, Acronyms and Terms](#Abbreviation,_Acronyms_and_Terms) -- [Description](#Description) -- [Configuration](#Configuration) -- [Methods](#Methods) +- [Abbreviation, Acronyms and Terms](#head.Abbreviation,_Acronyms_and_Terms) +- [Description](#head.Description) +- [Configuration](#head.Configuration) +- [Methods](#head.Methods) - + # Abbreviation, Acronyms and Terms -[[Refer to this link](overview/aat.md)] +[[Refer to this link](userguide/aat.md)] - + # Description -The `Analytics` plugin allows to send analytics events to dedicated backends. +The `IAnalytics` plugin provides an interface for IAnalytics. -The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#Thunder)]. +The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#ref.Thunder)]. - + # Configuration The table below lists configuration options of the plugin. | Name | Type | Description | | :-------- | :-------- | :-------- | -| callsign | string | Plugin instance name (default: *org.rdk.Analytics*) | -| classname | string | Class name: *org.rdk.Analytics* | -| locator | string | Library name: *libWPEFrameworkAnalytics.so* | +| callsign | string | Plugin instance name (default: *IAnalytics*) | +| classname | string | Class name: *IAnalytics* | +| locator | string | Library name: *libWPEFrameworkIAnalytics.so* | | autostart | boolean | Determines if the plugin shall be started automatically along with the framework | -| configuration | object | | -| configuration.loggername | string | Logger name used by backend | -| configuration.loggerversion | string | Logger version used by backend | -| configuration?.eventsmap | string | *(optional)* Optional path to json file with array of mapped events name | -| configuration.backendlib | string | Name of backend library | - + # Methods -The following methods are provided by the org.rdk.Analytics plugin: +The following methods are provided by the IAnalytics plugin: -Analytics interface methods: +IAnalytics interface methods: | Method | Description | | :-------- | :-------- | -| [sendEvent](#sendEvent) | Enqueue an event to be sent to the SIFT analytics backend | +| [SendEvent](#method.SendEvent) | Send an event to the analytics server | + +## *SendEvent [method](#head.Methods)* - -## *sendEvent* - -Enqueue an event to be sent to the SIFT analytics backend. +Send an event to the analytics server ### Events - -No Events - +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | | params.eventName | string | Name of the event | -| params?.eventVersion | string | *(optional)* Version number of event schema | -| params.eventSource | string | Name of the component that originates the event (Durable App ID if an App) | -| params.eventSourceVersion | string | Version number for the component that originates the event | -| params.cetList | array | An array of Capability Exclusion Tags to be included on the report. Each CET will exclude the event from being processed for the specified process, any may result in the event being dropped. May be an array of length zero | +| params.eventVersion | string | Version of the event | +| params.eventSource | string | Source of the event | +| params.eventSourceVersion | string | Version of the event source | +| params.cetList | IStringIterator | List of CETs | | params.cetList[#] | string | | -| params?.epochTimestamp | integer | *(optional)* Timestamp for the START of this event, epoch time, in ms UTC | -| params?.uptimeTimestamp | integer | *(optional)* Timestamp for the START of this event, uptime of the device, in ms. ONLY to be used when Time quality is not good | -| params?.appId | string | *(optional)* Durable App ID string | -| params.eventPayload | object | Custom payload of the event in JSON format. User defined colection of objects and keys. May be an empty object | -| params.eventPayload.keyOrObject | string | User defined custom key or object | +| params.epochTimestamp | uint64_t | Epoch timestamp of the event | +| params.uptimeTimestamp | uint64_t | Uptime timestamp of the event | +| params.appId | string | Durable App Id string | +| params.eventPayload | string | Payload of the event | +### Results +This method returns no results. -### Result - -| Name | Type | Description | -| :-------- | :-------- | :-------- | -| result | string | On success null will be returned | +### Examples -### Example #### Request @@ -94,21 +80,19 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.Analytics.sendEvent", + "method": "org.rdk.IAnalytics.SendEvent", "params": { - "eventName": "app_summary", - "eventVersion": "1.0.0", - "eventSource": "epg", - "eventSourceVersion": "1.0.0", + "eventName": "", + "eventVersion": "", + "eventSource": "", + "eventSourceVersion": "", "cetList": [ - "cet1" + "" ], - "epochTimestamp": 1721906631000, - "uptimeTimestamp": 35000, - "appId": "app-id-app1", - "eventPayload": { - "keyOrObject": "value1" - } + "epochTimestamp": "0", + "uptimeTimestamp": "0", + "appId": "", + "eventPayload": "" } } ``` diff --git a/docs/apis/DeviceInfoPlugin.md b/docs/apis/DeviceInfoPlugin.md index d492dd46..1c5b869f 100644 --- a/docs/apis/DeviceInfoPlugin.md +++ b/docs/apis/DeviceInfoPlugin.md @@ -1,91 +1,90 @@ - -# DeviceInfo Plugin + +# IDeviceInfo Plugin -**Version: [1.1.0](https://github.com/rdkcentral/rdkservices/blob/main/DeviceInfo/CHANGELOG.md)** +**Version: [1.0.0](https://github.com/rdkcentral/rdkservices/blob/main/IDeviceInfo/CHANGELOG.md)** -A DeviceInfo plugin for Thunder framework. +A IDeviceInfo plugin for Thunder framework. ### Table of Contents -- [Abbreviation, Acronyms and Terms](#Abbreviation,_Acronyms_and_Terms) -- [Description](#Description) -- [Configuration](#Configuration) -- [Methods](#Methods) -- [Properties](#Properties) +- [Abbreviation, Acronyms and Terms](#head.Abbreviation,_Acronyms_and_Terms) +- [Description](#head.Description) +- [Configuration](#head.Configuration) +- [Methods](#head.Methods) - + # Abbreviation, Acronyms and Terms [[Refer to this link](userguide/aat.md)] - + # Description -The `DeviceInfo` plugin allows retrieving of various device-related information. +The `IDeviceInfo` plugin provides an interface for IDeviceInfo. -The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#Thunder)]. +The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#ref.Thunder)]. - + # Configuration The table below lists configuration options of the plugin. | Name | Type | Description | | :-------- | :-------- | :-------- | -| callsign | string | Plugin instance name (default: *DeviceInfo*) | -| classname | string | Class name: *DeviceInfo* | -| locator | string | Library name: *libWPEFrameworkDeviceInfo.so* | +| callsign | string | Plugin instance name (default: *IDeviceInfo*) | +| classname | string | Class name: *IDeviceInfo* | +| locator | string | Library name: *libWPEFrameworkIDeviceInfo.so* | | autostart | boolean | Determines if the plugin shall be started automatically along with the framework | - + # Methods -The following methods are provided by the DeviceInfo plugin: +The following methods are provided by the IDeviceInfo plugin: -DeviceInfo interface methods: +IDeviceInfo interface methods: | Method | Description | | :-------- | :-------- | -| [supportedresolutions](#supportedresolutions) | Supported resolutions on the selected video display port | -| [defaultresolution](#defaultresolution) | Default resolution on the selected video display port | -| [supportedhdcp](#supportedhdcp) | Supported hdcp version on the selected video display port | -| [audiocapabilities](#audiocapabilities) | Audio capabilities for the specified audio port | -| [ms12capabilities](#ms12capabilities) | MS12 audio capabilities for the specified audio port | -| [supportedms12audioprofiles](#supportedms12audioprofiles) | Supported MS12 audio profiles for the specified audio port | +| [AudioCapabilities](#method.AudioCapabilities) | | +| [Brand](#method.Brand) | | +| [ChipSet](#method.ChipSet) | | +| [DefaultResolution](#method.DefaultResolution) | | +| [DeviceType](#method.DeviceType) | | +| [DistributorId](#method.DistributorId) | | +| [HostEDID](#method.HostEDID) | | +| [MS12Capabilities](#method.MS12Capabilities) | | +| [Make](#method.Make) | | +| [Model](#method.Model) | | +| [ReleaseVersion](#method.ReleaseVersion) | | +| [SerialNumber](#method.SerialNumber) | | +| [Sku](#method.Sku) | | +| [SocName](#method.SocName) | | +| [SupportedAudioPorts](#method.SupportedAudioPorts) | | +| [SupportedHdcp](#method.SupportedHdcp) | | +| [SupportedMS12AudioProfiles](#method.SupportedMS12AudioProfiles) | | +| [SupportedResolutions](#method.SupportedResolutions) | | +| [SupportedVideoDisplays](#method.SupportedVideoDisplays) | | + + +## *AudioCapabilities [method](#head.Methods)* - -## *supportedresolutions* - -Supported resolutions on the selected video display port. ### Events - -No Events - +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.videoDisplay | string | Video display port name | - -### Result - +| params.audioPort | string | | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.supportedResolutions | array | | -| result.supportedResolutions[#] | string | Resolution supported by the device (must be one of the following: *unknown*, *480i*, *480p*, *576i*, *576p*, *576p50*, *720p*, *720p50*, *1080i*, *1080i25*, *1080i50*, *1080p*, *1080p24*, *1080p25*, *1080p30*, *1080p50*, *1080p60*, *2160p30*, *2160p50*, *2160p60*, *4320p30*, *4320p60*) | - -### Errors +| result.audioCapabilities | IAudioCapabilityIterator | | +| result.audioCapabilities[#] | string | | -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | +### Examples -### Example #### Request @@ -93,9 +92,9 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.supportedresolutions", + "method": "org.rdk.IDeviceInfo.AudioCapabilities", "params": { - "videoDisplay": "HDMI0" + "audioPort": "" } } ``` @@ -107,43 +106,28 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "supportedResolutions": [ - "1080p" + "audioCapabilities": [ + "AUDIOCAPABILITY_NONE" ] } } ``` + +## *Brand [method](#head.Methods)* - -## *defaultresolution* -Default resolution on the selected video display port. ### Events - -No Events - +No events are associated with this method. ### Parameters - +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.videoDisplay | string | Video display port name | +| result.brand | string | | -### Result - -| Name | Type | Description | -| :-------- | :-------- | :-------- | -| result | object | | -| result.defaultResolution | string | Resolution supported by the device (must be one of the following: *unknown*, *480i*, *480p*, *576i*, *576p*, *576p50*, *720p*, *720p50*, *1080i*, *1080i25*, *1080i50*, *1080p*, *1080p24*, *1080p25*, *1080p30*, *1080p50*, *1080p60*, *2160p30*, *2160p50*, *2160p60*, *4320p30*, *4320p60*) | - -### Errors - -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | +### Examples -### Example #### Request @@ -151,10 +135,7 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.defaultresolution", - "params": { - "videoDisplay": "HDMI0" - } + "method": "org.rdk.IDeviceInfo.Brand" } ``` @@ -165,41 +146,26 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "defaultResolution": "1080p" + "brand": "" } } ``` + +## *ChipSet [method](#head.Methods)* - -## *supportedhdcp* -Supported hdcp version on the selected video display port. ### Events - -No Events - +No events are associated with this method. ### Parameters - -| Name | Type | Description | -| :-------- | :-------- | :-------- | -| params | object | | -| params.videoDisplay | string | Video display port name | - -### Result - +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.supportedHDCPVersion | string | HDCP support (must be one of the following: *unavailable*, *1.4*, *2.0*, *2.1*, *2.2*) | +| result.chipSet | string | | -### Errors +### Examples -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example #### Request @@ -207,10 +173,7 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.supportedhdcp", - "params": { - "videoDisplay": "HDMI0" - } + "method": "org.rdk.IDeviceInfo.ChipSet" } ``` @@ -221,42 +184,28 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "supportedHDCPVersion": "hdcp_20" + "chipSet": "" } } ``` + +## *DefaultResolution [method](#head.Methods)* - -## *audiocapabilities* -Audio capabilities for the specified audio port. ### Events - -No Events - +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.audioPort | string | Audio port name | - -### Result - +| params.videoDisplay | string | | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.AudioCapabilities | array | An array of audio capabilities | -| result.AudioCapabilities[#] | string | Audio capability (must be one of the following: *none*, *ATMOS*, *DOLBY DIGITAL*, *DOLBY DIGITAL PLUS*, *Dual Audio Decode*, *DAPv2*, *MS12*) | +| result.defaultResolution | string | | -### Errors +### Examples -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example #### Request @@ -264,9 +213,9 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.audiocapabilities", + "method": "org.rdk.IDeviceInfo.DefaultResolution", "params": { - "audioPort": "HDMI0" + "videoDisplay": "" } } ``` @@ -278,44 +227,26 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "AudioCapabilities": [ - "none" - ] + "defaultResolution": "" } } ``` + +## *DeviceType [method](#head.Methods)* - -## *ms12capabilities* -MS12 audio capabilities for the specified audio port. ### Events - -No Events - +No events are associated with this method. ### Parameters - -| Name | Type | Description | -| :-------- | :-------- | :-------- | -| params | object | | -| params.audioPort | string | Audio port name | - -### Result - +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.MS12Capabilities | array | An array of MS12 audio capabilities | -| result.MS12Capabilities[#] | string | MS12 audio capability (must be one of the following: *none*, *Dolby Volume*, *Inteligent Equalizer*, *Dialogue Enhancer*) | - -### Errors +| result.deviceType | string | | -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | +### Examples -### Example #### Request @@ -323,10 +254,7 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.ms12capabilities", - "params": { - "audioPort": "HDMI0" - } + "method": "org.rdk.IDeviceInfo.DeviceType" } ``` @@ -337,44 +265,26 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "MS12Capabilities": [ - "Dolby Volume" - ] + "deviceType": "" } } ``` + +## *DistributorId [method](#head.Methods)* - -## *supportedms12audioprofiles* -Supported MS12 audio profiles for the specified audio port. ### Events - -No Events - +No events are associated with this method. ### Parameters - +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.audioPort | string | Audio port name | +| result.distributorId | string | | -### Result +### Examples -| Name | Type | Description | -| :-------- | :-------- | :-------- | -| result | object | | -| result.supportedMS12AudioProfiles | array | An array of MS12 audio profiles | -| result.supportedMS12AudioProfiles[#] | string | | - -### Errors - -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example #### Request @@ -382,10 +292,7 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.supportedms12audioprofiles", - "params": { - "audioPort": "HDMI0" - } + "method": "org.rdk.IDeviceInfo.DistributorId" } ``` @@ -396,845 +303,536 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "supportedMS12AudioProfiles": [ - "Movie" - ] + "distributorId": "" } } ``` + +## *HostEDID [method](#head.Methods)* - -# Properties - -The following properties are provided by the DeviceInfo plugin: -DeviceInfo interface properties: - -| Property | Description | -| :-------- | :-------- | -| [systeminfo](#systeminfo) RO | System general information | -| [addresses](#addresses) RO | Network interface addresses | -| [socketinfo](#socketinfo) RO | Socket information | -| [firmwareversion](#firmwareversion) RO | Versions maintained in version | -| [serialnumber](#serialnumber) RO | Serial number set by manufacturer | -| [releaseversion](#releaseversion) RO | Release version of Image | -| [chipset](#chipset) RO | Chipset used for this device | -| [modelid](#modelid) RO | Device model number or SKU | -| [make](#make) RO | Device manufacturer | -| [modelname](#modelname) RO | Friendly device model name | -| [devicetype](#devicetype) RO | Device type | -| [socname](#socname) RO | SOC Name | -| [distributorid](#distributorid) RO | Partner ID or distributor ID for device | -| [supportedaudioports](#supportedaudioports) RO | Audio ports supported on the device (all ports that are physically present) | -| [supportedvideodisplays](#supportedvideodisplays) RO | Video ports supported on the device (all ports that are physically present) | -| [hostedid](#hostedid) RO | EDID of the host | - - - -## *systeminfo* - -Provides access to the system general information. - -> This property is **read-only**. ### Events +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.edid | string | | -No Events +### Examples -### Value -| Name | Type | Description | -| :-------- | :-------- | :-------- | -| (property) | object | System general information | -| (property).version | string | Software version (in form *version#hashtag*) | -| (property).uptime | number | System uptime (in seconds) | -| (property).totalram | number | Total installed system RAM memory (in bytes) | -| (property).freeram | number | Free system RAM memory (in bytes) | -| (property).totalswap | number | Total swap space (in bytes) | -| (property).freeswap | number | Swap space still available (in bytes) | -| (property).devicename | string | Host name | -| (property).cpuload | string | Current CPU load (percentage) | -| (property).cpuloadavg | object | CPU load average | -| (property).cpuloadavg.avg1min | number | 1min cpuload average | -| (property).cpuloadavg.avg5min | number | 5min cpuload average | -| (property).cpuloadavg.avg15min | number | 15min cpuload average | -| (property).serialnumber | string | Device serial number | -| (property).time | string | Current system date and time | - -### Example - -#### Get Request +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.systeminfo" + "method": "org.rdk.IDeviceInfo.HostEDID" } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "version": "1.0#14452f612c3747645d54974255d11b8f3b4faa54", - "uptime": 120, - "totalram": 655757312, - "freeram": 563015680, - "totalswap": 789132680, - "freeswap": 789132680, - "devicename": "buildroot", - "cpuload": "2", - "cpuloadavg": { - "avg1min": 789132680, - "avg5min": 789132680, - "avg15min": 789132680 - }, - "serialnumber": "aplhanumerical string", - "time": "Mon, 11 Mar 2019 14:38:18" + "edid": "" } } ``` + +## *MS12Capabilities [method](#head.Methods)* - -## *addresses* -Provides access to the network interface addresses. - -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | array | Network interface addresses | -| (property)[#] | object | | -| (property)[#].name | string | Interface name | -| (property)[#].mac | string | Interface MAC address | -| (property)[#]?.ip | array | *(optional)* | -| (property)[#]?.ip[#] | string | *(optional)* Interface IP address | - -### Example - -#### Get Request - -```json -{ - "jsonrpc": "2.0", - "id": 42, - "method": "DeviceInfo.addresses" -} -``` - -#### Get Response - -```json -{ - "jsonrpc": "2.0", - "id": 42, - "result": [ - { - "name": "lo", - "mac": "00:00:00:00:00", - "ip": [ - "127.0.0.1" - ] - } - ] -} -``` - - -## *socketinfo* - -Provides access to the socket information. - -> This property is **read-only**. - -### Events - -No Events - -### Value - +| params.audioPort | string | | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | Socket information | -| (property)?.total | number | *(optional)* | -| (property)?.open | number | *(optional)* | -| (property)?.link | number | *(optional)* | -| (property)?.exception | number | *(optional)* | -| (property)?.shutdown | number | *(optional)* | -| (property).runs | number | Number of runs | - -### Example +| result.ms12Capabilities | IMS12CapabilityIterator | | +| result.ms12Capabilities[#] | string | | -#### Get Request +### Examples -```json -{ - "jsonrpc": "2.0", - "id": 42, - "method": "DeviceInfo.socketinfo" -} -``` -#### Get Response +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "result": { - "total": 0, - "open": 0, - "link": 0, - "exception": 0, - "shutdown": 0, - "runs": 1 + "method": "org.rdk.IDeviceInfo.MS12Capabilities", + "params": { + "audioPort": "" } } ``` - -## *firmwareversion* - -Provides access to the versions maintained in version.txt. - -> This property is **read-only**. - -### Events - -No Events - -### Value - -| Name | Type | Description | -| :-------- | :-------- | :-------- | -| (property) | object | Versions maintained in version.txt | -| (property).imagename | string | | -| (property)?.sdk | string | *(optional)* | -| (property)?.mediarite | string | *(optional)* | -| (property)?.yocto | string | *(optional)* Yocto version (must be one of the following: *kirkstone*, *dunfell*, *morty*, *daisy*) | - -### Errors - -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example - -#### Get Request - -```json -{ - "jsonrpc": "2.0", - "id": 42, - "method": "DeviceInfo.firmwareversion" -} -``` - -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "imagename": "alphanumerical string", - "sdk": "17.3", - "mediarite": "8.3.53", - "yocto": "dunfell" + "ms12Capabilities": [ + "MS12CAPABILITY_NONE" + ] } } ``` + +## *Make [method](#head.Methods)* - -## *serialnumber* - -Provides access to the serial number set by manufacturer. -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | Serial number set by manufacturer | -| (property).serialnumber | string | | +| result.make | string | | -### Errors +### Examples -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example -#### Get Request +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.serialnumber" + "method": "org.rdk.IDeviceInfo.Make" } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "serialnumber": "alphanumerical string" + "make": "" } } ``` + +## *Model [method](#head.Methods)* - -## *releaseversion* - -Provides access to the release version of Image. If unable to find the Release version default value is 99.99.0.0. -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | Release version of Image. If unable to find the Release version default value is 99.99.0.0 | -| (property).releaseversion | string | | +| result.model | string | | -### Errors +### Examples -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example -#### Get Request +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.releaseversion" + "method": "org.rdk.IDeviceInfo.Model" } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "releaseversion": "8.2.0.0" + "model": "" } } ``` + +## *ReleaseVersion [method](#head.Methods)* - -## *chipset* - -Provides access to the chipset used for this device. -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | Chipset used for this device | -| (property).chipset | string | | +| result.releaseVersion | string | | -### Errors +### Examples -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example -#### Get Request +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.chipset" + "method": "org.rdk.IDeviceInfo.ReleaseVersion" } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "chipset": "T962X3" + "releaseVersion": "" } } ``` + +## *SerialNumber [method](#head.Methods)* - -## *modelid* - -Provides access to the device model number or SKU. -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | Device model number or SKU | -| (property).sku | string | Device model number or SKU | +| result.serialNumber | string | | -### Errors +### Examples -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example -#### Get Request +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.modelid" + "method": "org.rdk.IDeviceInfo.SerialNumber" } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "sku": "alphanumerical string" + "serialNumber": "" } } ``` + +## *Sku [method](#head.Methods)* - -## *make* - -Provides access to the device manufacturer. -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | Device manufacturer | -| (property).make | string | Device manufacturer | +| result.sku | string | | -### Errors +### Examples -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example -#### Get Request +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.make" + "method": "org.rdk.IDeviceInfo.Sku" } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "make": "alphanumerical string" + "sku": "" } } ``` + +## *SocName [method](#head.Methods)* - -## *modelname* - -Provides access to the friendly device model name. -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | Friendly device model name | -| (property).model | string | | +| result.socName | string | | -### Errors +### Examples -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example -#### Get Request +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.modelname" + "method": "org.rdk.IDeviceInfo.SocName" } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "model": "alphanumerical string" + "socName": "" } } ``` + +## *SupportedAudioPorts [method](#head.Methods)* - -## *devicetype* - -Provides access to the device type. -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | Device type | -| (property).devicetype | string | Device type (must be one of the following: *tv*, *IpStb*, *QamIpStb*) | +| result.supportedAudioPorts | RPC::IStringIterator | | +| result.supportedAudioPorts[#] | string | | -### Errors +### Examples -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example -#### Get Request +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.devicetype" + "method": "org.rdk.IDeviceInfo.SupportedAudioPorts" } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "devicetype": "IpStb" + "supportedAudioPorts": [ + "" + ] } } ``` + +## *SupportedHdcp [method](#head.Methods)* - -## *socname* - -Provides access to the SOC Name. -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | SOC Name | -| (property).socname | string | SOC Name | - -### Errors - -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example - -#### Get Request - -```json -{ - "jsonrpc": "2.0", - "id": 42, - "method": "DeviceInfo.socname" -} -``` - -#### Get Response - -```json -{ - "jsonrpc": "2.0", - "id": 42, - "result": { - "socname": "alphanumerical string" - } -} -``` - - -## *distributorid* - -Provides access to the partner ID or distributor ID for device. - -> This property is **read-only**. - -### Events - -No Events - -### Value - +| params.videoDisplay | string | | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | Partner ID or distributor ID for device | -| (property).distributorid | string | Partner ID or distributor ID for device | +| result.supportedHDCPVersion | CopyProtection | | -### Errors +### Examples -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | - -### Example -#### Get Request +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.distributorid" + "method": "org.rdk.IDeviceInfo.SupportedHdcp", + "params": { + "videoDisplay": "" + } } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "distributorid": "aplhanumerical string" + "supportedHDCPVersion": "HDCP_UNAVAILABLE" } } ``` + +## *SupportedMS12AudioProfiles [method](#head.Methods)* - -## *supportedaudioports* - -Provides access to the audio ports supported on the device (all ports that are physically present). -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | Audio ports supported on the device (all ports that are physically present) | -| (property).supportedAudioPorts | array | | -| (property).supportedAudioPorts[#] | string | | - -### Errors - -| Code | Message | Description | +| params.audioPort | string | | +### Results +| Name | Type | Description | | :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | +| result.supportedMS12AudioProfiles | RPC::IStringIterator | | +| result.supportedMS12AudioProfiles[#] | string | | -### Example +### Examples -#### Get Request + +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.supportedaudioports" + "method": "org.rdk.IDeviceInfo.SupportedMS12AudioProfiles", + "params": { + "audioPort": "" + } } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "supportedAudioPorts": [ - "HDMI0" + "supportedMS12AudioProfiles": [ + "" ] } } ``` + +## *SupportedResolutions [method](#head.Methods)* - -## *supportedvideodisplays* -Provides access to the video ports supported on the device (all ports that are physically present). - -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | Video ports supported on the device (all ports that are physically present) | -| (property).supportedVideoDisplays | array | | -| (property).supportedVideoDisplays[#] | string | | - -### Errors - -| Code | Message | Description | +| params.videoDisplay | string | | +### Results +| Name | Type | Description | | :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | +| result.supportedResolutions | RPC::IStringIterator | | +| result.supportedResolutions[#] | string | | -### Example +### Examples -#### Get Request + +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.supportedvideodisplays" + "method": "org.rdk.IDeviceInfo.SupportedResolutions", + "params": { + "videoDisplay": "" + } } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "supportedVideoDisplays": [ - "HDMI0" + "supportedResolutions": [ + "" ] } } ``` + +## *SupportedVideoDisplays [method](#head.Methods)* - -## *hostedid* - -Provides access to the EDID of the host. -> This property is **read-only**. ### Events - -No Events - -### Value - +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| (property) | object | EDID of the host | -| (property).EDID | string | A base64 encoded byte array string representing the EDID | +| result.supportedVideoDisplays | RPC::IStringIterator | | +| result.supportedVideoDisplays[#] | string | | -### Errors - -| Code | Message | Description | -| :-------- | :-------- | :-------- | -| 1 | ```ERROR_GENERAL``` | General error | +### Examples -### Example -#### Get Request +#### Request ```json { "jsonrpc": "2.0", "id": 42, - "method": "DeviceInfo.hostedid" + "method": "org.rdk.IDeviceInfo.SupportedVideoDisplays" } ``` -#### Get Response +#### Response ```json { "jsonrpc": "2.0", "id": 42, "result": { - "EDID": "AP///////wAQrMLQVEJTMQUdAQOANR546q11qVRNnSYPUFSlSwCBALMA0QBxT6lAgYDRwAEBVl4AoKCgKVAwIDUADighAAAaAAAA/wBNWTNORDkxVjFTQlQKAAAA/ABERUxMIFAyNDE4RAogAAAA/QAxVh1xHAAKICAgICAgARsCAxuxUJAFBAMCBxYBBhESFRMUHyBlAwwAEAACOoAYcTgtQFgsRQAOKCEAAB4BHYAYcRwWIFgsJQAOKCEAAJ6/FgCggDgTQDAgOgAOKCEAABp+OQCggDgfQDAgOgAOKCEAABoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2A" + "supportedVideoDisplays": [ + "" + ] } } ``` diff --git a/docs/apis/FirmwareVersionPlugin.md b/docs/apis/FirmwareVersionPlugin.md new file mode 100644 index 00000000..d1f1d823 --- /dev/null +++ b/docs/apis/FirmwareVersionPlugin.md @@ -0,0 +1,206 @@ + + +# IFirmwareVersion Plugin + +**Version: [1.0.0](https://github.com/rdkcentral/rdkservices/blob/main/IFirmwareVersion/CHANGELOG.md)** + +A IFirmwareVersion plugin for Thunder framework. + +### Table of Contents + +- [Abbreviation, Acronyms and Terms](#head.Abbreviation,_Acronyms_and_Terms) +- [Description](#head.Description) +- [Configuration](#head.Configuration) +- [Methods](#head.Methods) + + +# Abbreviation, Acronyms and Terms + +[[Refer to this link](userguide/aat.md)] + + +# Description + +The `IFirmwareVersion` plugin provides an interface for IFirmwareVersion. + +The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#ref.Thunder)]. + + +# Configuration + +The table below lists configuration options of the plugin. + +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| callsign | string | Plugin instance name (default: *IFirmwareVersion*) | +| classname | string | Class name: *IFirmwareVersion* | +| locator | string | Library name: *libWPEFrameworkIFirmwareVersion.so* | +| autostart | boolean | Determines if the plugin shall be started automatically along with the framework | + + +# Methods + +The following methods are provided by the IFirmwareVersion plugin: + +IFirmwareVersion interface methods: + +| Method | Description | +| :-------- | :-------- | +| [Imagename](#method.Imagename) | | +| [Mediarite](#method.Mediarite) | | +| [Sdk](#method.Sdk) | | +| [Yocto](#method.Yocto) | | + + +## *Imagename [method](#head.Methods)* + + + +### Events +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.imagename | string | | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.IFirmwareVersion.Imagename" +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "imagename": "" + } +} +``` + +## *Mediarite [method](#head.Methods)* + + + +### Events +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.mediarite | string | | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.IFirmwareVersion.Mediarite" +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "mediarite": "" + } +} +``` + +## *Sdk [method](#head.Methods)* + + + +### Events +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.sdk | string | | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.IFirmwareVersion.Sdk" +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "sdk": "" + } +} +``` + +## *Yocto [method](#head.Methods)* + + + +### Events +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.yocto | string | | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.IFirmwareVersion.Yocto" +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "yocto": "" + } +} +``` + diff --git a/docs/apis/HdmiCecSinkPlugin.md b/docs/apis/HdmiCecSinkPlugin.md index 8cf0dd08..ff2d382e 100644 --- a/docs/apis/HdmiCecSinkPlugin.md +++ b/docs/apis/HdmiCecSinkPlugin.md @@ -1,110 +1,103 @@ - -# HdmiCecSinkPlugin + +# IHdmiCecSink Plugin -**Version: [1.0.0]()** +**Version: [1.0.0](https://github.com/rdkcentral/rdkservices/blob/main/IHdmiCecSink/CHANGELOG.md)** -A org.rdk.HdmiCecSink plugin for Thunder framework. +A IHdmiCecSink plugin for Thunder framework. ### Table of Contents -- [Abbreviation, Acronyms and Terms](#Abbreviation,_Acronyms_and_Terms) -- [Description](#Description) -- [Configuration](#Configuration) -- [Methods](#Methods) -- [Notifications](#Notifications) +- [Abbreviation, Acronyms and Terms](#head.Abbreviation,_Acronyms_and_Terms) +- [Description](#head.Description) +- [Configuration](#head.Configuration) +- [Methods](#head.Methods) +- [Notifications](#head.Notifications) - + # Abbreviation, Acronyms and Terms -[[Refer to this link](overview/aat.md)] +[[Refer to this link](userguide/aat.md)] - + # Description -The `HdmiCecSink` plugin allows you to manage HDMI Consumer Electronics Control (CEC) sink for connected devices. +The `IHdmiCecSink` plugin provides an interface for IHdmiCecSink. -The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#Thunder)]. +The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#ref.Thunder)]. - + # Configuration The table below lists configuration options of the plugin. | Name | Type | Description | | :-------- | :-------- | :-------- | -| callsign | string | Plugin instance name (default: *org.rdk.HdmiCecSink*) | -| classname | string | Class name: *org.rdk.HdmiCecSink* | -| locator | string | Library name: *libWPEFrameworkHdmiCecSink.so* | +| callsign | string | Plugin instance name (default: *IHdmiCecSink*) | +| classname | string | Class name: *IHdmiCecSink* | +| locator | string | Library name: *libWPEFrameworkIHdmiCecSink.so* | | autostart | boolean | Determines if the plugin shall be started automatically along with the framework | - + # Methods -The following methods are provided by the org.rdk.HdmiCecSink plugin: +The following methods are provided by the IHdmiCecSink plugin: -HdmiCecSink interface methods: +IHdmiCecSink interface methods: | Method | Description | | :-------- | :-------- | -| [getActiveRoute](#getActiveRoute) | Gets details for the current route from the source to sink devices | -| [getActiveSource](#getActiveSource) | Gets details for the current active source | -| [getAudioDeviceConnectedStatus](#getAudioDeviceConnectedStatus) | Get status of audio device connection | -| [getDeviceList](#getDeviceList) | Gets the number of connected source devices and system information for each device | -| [getEnabled](#getEnabled) | Returns whether HDMI-CEC is enabled on platform or not | -| [getOSDName](#getOSDName) | Returns the OSD name used by host device | -| [getVendorId](#getVendorId) | Gets the current vendor ID used by host device | -| [printDeviceList](#printDeviceList) | This is a helper debug command for developers | -| [requestActiveSource](#requestActiveSource) | Requests the active source in the network | -| [requestShortAudioDescriptor](#requestShortAudioDescriptor) | Sends the CEC Request Short Audio Descriptor (SAD) message as an event | -| [sendAudioDevicePowerOnMessage](#sendAudioDevicePowerOnMessage) | This message is used to power on the connected audio device | -| [sendGetAudioStatusMessage](#sendGetAudioStatusMessage) | Sends the CEC \ message to request the audio status | -| [sendKeyPressEvent](#sendKeyPressEvent) | Sends the CEC \ message when TV remote key is pressed | -| [sendUserControlPressed](#sendUserControlPressed) | Sends the CEC \ message when TV remote key is pressed | -| [sendUserControlReleased](#sendUserControlReleased) | Sends the CEC \ message when TV remote key is released | -| [sendStandbyMessage](#sendStandbyMessage) | Sends a CEC \ message to the logical address of the device | -| [setActivePath](#setActivePath) | Sets the source device to active (`setStreamPath`) | -| [setActiveSource](#setActiveSource) | Sets the current active source as TV (physical address 0 | -| [setEnabled](#setEnabled) | Enables or disables HDMI-CEC support in the platform | -| [setMenuLanguage](#setMenuLanguage) | Updates the internal data structure with the new menu Language and also broadcasts the \ CEC message | -| [setOSDName](#setOSDName) | Sets the OSD Name used by host device | -| [setRoutingChange](#setRoutingChange) | Changes routing while switching between HDMI inputs and TV | -| [setupARCRouting](#setupARCRouting) | Enable (or disable) HDMI-CEC Audio Return Channel (ARC) routing | -| [setVendorId](#setVendorId) | Sets a vendor ID used by host device | -| [setLatencyInfo](#setLatencyInfo) | Sets the Current Latency Values such as Video Latency, Latency Flags,Audio Output Compensated value and Audio Output Delay by sending \ message for Dynamic Auto LipSync Feature | - - - -## *getActiveRoute* - -Gets details for the current route from the source to sink devices. This API is used for debugging the route. +| [GetActiveRoute](#method.GetActiveRoute) | Gets the Active Route(s) of the HDMI CEC Sink | +| [GetActiveSource](#method.GetActiveSource) | Gets the status of the current active source | +| [GetAudioDeviceConnectedStatus](#method.GetAudioDeviceConnectedStatus) | Gets audio device connected status | +| [GetDeviceList](#method.GetDeviceList) | Gets the list of devices connected to the HDMI CEC sink | +| [GetEnabled](#method.GetEnabled) | Gets the status of the HDMI CEC Sink | +| [GetOSDName](#method.GetOSDName) | Gets the OSD name of the HDMI CEC Sink | +| [GetVendorId](#method.GetVendorId) | Gets the vendor ID of the HDMI CEC Sink | +| [PrintDeviceList](#method.PrintDeviceList) | This is a helper debug command for developers. It prints the list of connected devices and properties of connected devices | +| [RequestActiveSource](#method.RequestActiveSource) | Request the active source in the network | +| [RequestShortAudioDescriptor](#method.RequestShortAudioDescriptor) | Sends the CEC Request Short Audio Descriptor (SAD) message as an | +| [SendAudioDevicePowerOnMessage](#method.SendAudioDevicePowerOnMessage) | This message is used to power on the connected audio device. Usually sent by the TV when it comes out of standby and detects audio device connected in the network. | +| [SendGetAudioStatusMessage](#method.SendGetAudioStatusMessage) | Sends the CEC message to request the audio status. | +| [SendKeyPressEvent](#method.SendKeyPressEvent) | Sends the CEC message when TV remote key is pressed. | +| [SendStandbyMessage](#method.SendStandbyMessage) | Sends the CEC message to another CEC device | +| [SendUserControlPressed](#method.SendUserControlPressed) | Sends the CEC message when TV remote key is pressed. | +| [SendUserControlReleased](#method.SendUserControlReleased) | Sends the CEC message when TV remote key is released. | +| [SetActivePath](#method.SetActivePath) | Sets the source device to active (setStreamPath). The source wakes from standby if it’s in the standby state. | +| [SetActiveSource](#method.SetActiveSource) | Sets the current active source as TV (physical address 0.0.0.0). This call needs to be made when the TV switches to internal tuner or any apps. | +| [SetEnabled](#method.SetEnabled) | Sets the status of the HDMI CEC Sink | +| [SetLatencyInfo](#method.SetLatencyInfo) | Sets the Current Latency Values such as Video Latency, Latency Flags,Audio Output Compensated value and Audio Output Delay by sending message for Dynamic Auto LipSync Feature. | +| [SetMenuLanguage](#method.SetMenuLanguage) | Updates the internal data structure with the new menu Language and also broadcasts the CEC message. | +| [SetOSDName](#method.SetOSDName) | Sets the OSD name of the HDMI CEC Sink | +| [SetRoutingChange](#method.SetRoutingChange) | Changes routing while switching between HDMI inputs and TV. | +| [SetVendorId](#method.SetVendorId) | Sets the vendor ID of the HDMI CEC Sink | +| [SetupARCRouting](#method.SetupARCRouting) | Enable (or disable) HDMI-CEC Audio Return Channel (ARC) routing. Upon enabling, triggers arcInitiationEvent and upon disabling, triggers arcTerminationEvent. | + + +## *GetActiveRoute [method](#head.Methods)* + +Gets the Active Route(s) of the HDMI CEC Sink ### Events - -No Events - +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.available | boolean | If `true`, then there is an active source available and source details are included in the result. If `false`, then there is no active source | -| result.length | integer | The number of devices in the path list | -| result.pathList | array | Object [] of information about each device in the active path | -| result.pathList[#] | object | | -| result.pathList[#].logicalAddress | integer | Logical address of the device | -| result.pathList[#].physicalAddress | string | Physical address of the device | -| result.pathList[#].deviceType | string | Type of the device | -| result.pathList[#].osdName | string | OSD name of the device if available | -| result.pathList[#].vendorID | string | Vendor ID of the device | -| result.ActiveRoute | string | Gives the route from source to sink with the device type and OSD name as an identifier | -| result.success | boolean | Whether the request succeeded | - -### Example +| result.available | bool | Is the active route available or not | +| result.length | uint8_t | Length of the active route | +| result.pathList | IHdmiCecSinkActivePathIterator | List of active path | +| result.pathList[#].logicalAddress | uint8_t | | +| result.pathList[#].physicalAddress | string | | +| result.pathList[#].deviceType | string | | +| result.pathList[#].vendorID | string | | +| result.pathList[#].osdName | string | | +| result.ActiveRoute | string | Active route of the device | +| result.success | bool | Is the operation successful or not | + +### Examples + #### Request @@ -112,7 +105,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.getActiveRoute" + "method": "org.rdk.IHdmiCecSink.GetActiveRoute" } ``` @@ -123,53 +116,47 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "available": true, - "length": 1, + "available": "true", + "length": "", "pathList": [ { - "logicalAddress": 4, - "physicalAddress": "1.0.0.0", - "deviceType": "Playback Device", - "osdName": "Fire TV Stick", - "vendorID": "0ce7" + "logicalAddress": "", + "physicalAddress": "", + "deviceType": "", + "vendorID": "", + "osdName": "" } ], - "ActiveRoute": "Playback Device 1(Fire TV Stick)-->HDMI0", - "success": true + "ActiveRoute": "", + "success": "true" } } ``` + +## *GetActiveSource [method](#head.Methods)* - -## *getActiveSource* - -Gets details for the current active source. +Gets the status of the current active source ### Events - -No Events - +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.available | boolean | If `true`, then there is an active source available and source details are included in the result. If `false`, then there is no active source | -| result.logicalAddress | integer | Logical address of the device | -| result.physicalAddress | string | Physical address of the device | -| result.deviceType | string | Type of the device | -| result.cecVersion | string | CEC version supported | -| result.osdName | string | OSD name of the device if available | -| result.vendorID | string | Vendor ID of the device | -| result.powerStatus | string | Power status of the device | -| result.port | string | Port of the device | -| result.success | boolean | Whether the request succeeded | - -### Example +| result.available | bool | Is the active route available or not | +| result.logicalAddress | uint8_t | Logical address of the active source | +| result.physicalAddress | string | Physical address of the active source | +| result.deviceType | string | Device type of the active source | +| result.cecVersion | string | CEC version of the active source | +| result.osdName | string | OSD name of the active source | +| result.vendorID | string | Vendor ID of the active source | +| result.powerStatus | string | Power status of the active source | +| result.port | string | | +| result.success | bool | Is the operation successful or not | + +### Examples + #### Request @@ -177,7 +164,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.getActiveSource" + "method": "org.rdk.IHdmiCecSink.GetActiveSource" } ``` @@ -188,42 +175,36 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "available": true, - "logicalAddress": 4, - "physicalAddress": "1.0.0.0", - "deviceType": "Playback Device", - "cecVersion": "Version 1.4", - "osdName": "Fire TV Stick", - "vendorID": "0ce7", - "powerStatus": "Standby", - "port": "HDMI0", - "success": true + "available": "true", + "logicalAddress": "", + "physicalAddress": "", + "deviceType": "", + "cecVersion": "", + "osdName": "", + "vendorID": "", + "powerStatus": "", + "port": "", + "success": "true" } } ``` + +## *GetAudioDeviceConnectedStatus [method](#head.Methods)* - -## *getAudioDeviceConnectedStatus* - -Get status of audio device connection. +Gets audio device connected status ### Events - -No Events - +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.connected | boolean | `true` if an audio device is connected, otherwise `false` | -| result.success | boolean | Whether the request succeeded | +| result.connected | bool | Is the audio device connected or not | +| result.success | bool | Is the operation successful or not | + +### Examples -### Example #### Request @@ -231,7 +212,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.getAudioDeviceConnectedStatus" + "method": "org.rdk.IHdmiCecSink.GetAudioDeviceConnectedStatus" } ``` @@ -242,44 +223,37 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "connected": true, - "success": true + "connected": "true", + "success": "true" } } ``` + +## *GetDeviceList [method](#head.Methods)* - -## *getDeviceList* - -Gets the number of connected source devices and system information for each device. The information includes device type, physical address, CEC version, vendor ID, power status and OSD name. +Gets the list of devices connected to the HDMI CEC sink ### Events - -No Events - +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.numberofdevices | integer | number of devices in the `devicelist` array | -| result.deviceList | array | Object [] of information about each device | -| result.deviceList[#] | object | | -| result.deviceList[#].logicalAddress | integer | Logical address of the device | -| result.deviceList[#].physicalAddress | string | Physical address of the device | -| result.deviceList[#].deviceType | string | Type of the device | -| result.deviceList[#].cecVersion | string | CEC version supported | -| result.deviceList[#].osdName | string | OSD name of the device if available | -| result.deviceList[#].vendorID | string | Vendor ID of the device | -| result.deviceList[#].powerStatus | string | Power status of the device | -| result.deviceList[#].portNumber | integer | | -| result.success | boolean | Whether the request succeeded | - -### Example +| result.numberofdevices | uint32_t | Number of devices connected to the HDMI CEC sink | +| result.deviceList | IHdmiCecSinkDeviceListIterator | List of devices connected to the HDMI CEC sink | +| result.deviceList[#].logicalAddress | uint8_t | | +| result.deviceList[#].physicalAddress | string | | +| result.deviceList[#].deviceType | string | | +| result.deviceList[#].cecVersion | string | | +| result.deviceList[#].osdName | string | | +| result.deviceList[#].vendorID | string | | +| result.deviceList[#].powerStatus | string | | +| result.deviceList[#].portNumber | string | | +| result.success | bool | Is the operation successful or not | + +### Examples + #### Request @@ -287,7 +261,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.getDeviceList" + "method": "org.rdk.IHdmiCecSink.GetDeviceList" } ``` @@ -298,46 +272,40 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "numberofdevices": 1, + "numberofdevices": "0", "deviceList": [ { - "logicalAddress": 4, - "physicalAddress": "1.0.0.0", - "deviceType": "Playback Device", - "cecVersion": "Version 1.4", - "osdName": "Fire TV Stick", - "vendorID": "0ce7", - "powerStatus": "Standby", - "portNumber": 0 + "logicalAddress": "", + "physicalAddress": "", + "deviceType": "", + "cecVersion": "", + "osdName": "", + "vendorID": "", + "powerStatus": "", + "portNumber": "" } ], - "success": true + "success": "true" } } ``` + +## *GetEnabled [method](#head.Methods)* - -## *getEnabled* - -Returns whether HDMI-CEC is enabled on platform or not. +Gets the status of the HDMI CEC Sink ### Events - -No Events - +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.enabled | boolean | Indicates whether HDMI-CEC is enabled (`true`) or disabled (`false`) in the platform | -| result.success | boolean | Whether the request succeeded | +| result.enabled | bool | Is the HDMI CEC Sink enabled or not | +| result.success | bool | Is the operation successful or not | + +### Examples -### Example #### Request @@ -345,7 +313,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.getEnabled" + "method": "org.rdk.IHdmiCecSink.GetEnabled" } ``` @@ -356,34 +324,28 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "enabled": false, - "success": true + "enabled": "true", + "success": "true" } } ``` + +## *GetOSDName [method](#head.Methods)* - -## *getOSDName* - -Returns the OSD name used by host device. +Gets the OSD name of the HDMI CEC Sink ### Events - -No Events - +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.name | string | The OSD Name | -| result.success | boolean | Whether the request succeeded | +| result.name | string | OSD name of the HDMI CEC Sink | +| result.success | bool | Is the operation successful or not | + +### Examples -### Example #### Request @@ -391,7 +353,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.getOSDName" + "method": "org.rdk.IHdmiCecSink.GetOSDName" } ``` @@ -402,34 +364,28 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "name": "Fire TV Stick", - "success": true + "name": "", + "success": "true" } } ``` + +## *GetVendorId [method](#head.Methods)* - -## *getVendorId* - -Gets the current vendor ID used by host device. +Gets the vendor ID of the HDMI CEC Sink ### Events - -No Events - +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.vendorid | string | Vendor ID for this device. The ID can have a maximum of 6 characters | -| result.success | boolean | Whether the request succeeded | +| result.vendorid | string | Vendor ID of the HDMI CEC Sink | +| result.success | bool | Is the operation successful or not | + +### Examples -### Example #### Request @@ -437,7 +393,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.getVendorId" + "method": "org.rdk.IHdmiCecSink.GetVendorId" } ``` @@ -448,34 +404,28 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "vendorid": "0019fc", - "success": true + "vendorid": "", + "success": "true" } } ``` + +## *PrintDeviceList [method](#head.Methods)* - -## *printDeviceList* - -This is a helper debug command for developers. It prints the list of connected devices and properties of connected devices like deviceType, VendorID, CEC version, PowerStatus, OSDName, PhysicalAddress etc. +This is a helper debug command for developers. It prints the list of connected devices and properties of connected devices ### Events - -No Events - +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.printed | boolean | Whether device list is printed | -| result.success | boolean | Whether the request succeeded | +| result.printed | bool | Is the device list printed or not | +| result.success | bool | Is the operation successful or not | + +### Examples -### Example #### Request @@ -483,7 +433,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.printDeviceList" + "method": "org.rdk.IHdmiCecSink.PrintDeviceList" } ``` @@ -494,36 +444,28 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "printed": true, - "success": true + "printed": "true", + "success": "true" } } ``` + +## *RequestActiveSource [method](#head.Methods)* - -## *requestActiveSource* - -Requests the active source in the network. +Request the active source in the network ### Events - -| Event | Description | -| :-------- | :-------- | -| [onActiveSourceChange](#onActiveSourceChange) | Triggered with the active source device changes. | -| [onDeviceAdded](#onDeviceAdded) | 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. | -| [onDeviceInfoUpdated](#onDeviceInfoUpdated) | Triggered when device information changes (physicalAddress, deviceType, vendorID, osdName, cecVersion, powerStatus). | +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -531,7 +473,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.requestActiveSource" + "method": "org.rdk.IHdmiCecSink.RequestActiveSource" } ``` @@ -542,33 +484,29 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *RequestShortAudioDescriptor [method](#head.Methods)* - -## *requestShortAudioDescriptor* - -Sends the CEC Request Short Audio Descriptor (SAD) message as an +Sends the CEC Request Short Audio Descriptor (SAD) message as an ### Events - -| Event | Description | -| :-------- | :-------- | -| [shortAudiodesciptorEvent](#shortAudiodesciptorEvent) | Triggered when SAD is received from the connected audio device. | +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -576,7 +514,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.requestShortAudioDescriptor" + "method": "org.rdk.IHdmiCecSink.RequestShortAudioDescriptor" } ``` @@ -587,33 +525,29 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` - - -## *sendAudioDevicePowerOnMessage* + +## *SendAudioDevicePowerOnMessage [method](#head.Methods)* This message is used to power on the connected audio device. Usually sent by the TV when it comes out of standby and detects audio device connected in the network. ### Events - -| Event | Description | -| :-------- | :-------- | -| [setSystemAudioModeEvent](#setSystemAudioModeEvent) | Triggered when CEC message of device is received. | +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -621,7 +555,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.sendAudioDevicePowerOnMessage" + "method": "org.rdk.IHdmiCecSink.SendAudioDevicePowerOnMessage" } ``` @@ -632,33 +566,29 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SendGetAudioStatusMessage [method](#head.Methods)* - -## *sendGetAudioStatusMessage* - -Sends the CEC \ message to request the audio status. +Sends the CEC message to request the audio status. ### Events - -| Event | Description | -| :-------- | :-------- | -| [reportAudioStatusEvent](#reportAudioStatusEvent) | Triggered when CEC message of device is received. | +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -666,7 +596,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.sendGetAudioStatusMessage" + "method": "org.rdk.IHdmiCecSink.SendGetAudioStatusMessage" } ``` @@ -677,36 +607,32 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SendKeyPressEvent [method](#head.Methods)* - -## *sendKeyPressEvent* - -Sends the CEC \ message when TV remote key is pressed. +Sends the CEC message when TV remote key is pressed. ### Events - -No Events - +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | -| params.keyCode | integer | 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) | - -### Result - +| params.logicalAddress | uint32_t | Logical address of the device | +| params.keyCode | uint32_t | Key code of the key press event | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -714,10 +640,10 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.sendKeyPressEvent", + "method": "org.rdk.IHdmiCecSink.SendKeyPressEvent", "params": { - "logicalAddress": 4, - "keyCode": 65 + "logicalAddress": "0", + "keyCode": "0" } } ``` @@ -729,36 +655,29 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SendStandbyMessage [method](#head.Methods)* - -## *sendUserControlPressed* - -Sends the CEC \ message when TV remote key is pressed. +Sends the CEC message to another CEC device ### Events - -No Events - +No events are associated with this method. ### Parameters - +This method takes no parameters. +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | -| params.keyCode | integer | 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) | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | -### Result +### Examples -| Name | Type | Description | -| :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | - -### Example #### Request @@ -766,11 +685,7 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.sendUserControlPressed", - "params": { - "logicalAddress": 4, - "keyCode": 65 - } + "method": "org.rdk.IHdmiCecSink.SendStandbyMessage" } ``` @@ -781,35 +696,32 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SendUserControlPressed [method](#head.Methods)* - -## *sendUserControlReleased* - -Sends the CEC \ message when TV remote key is released. +Sends the CEC message when TV remote key is pressed. ### Events - -No Events - +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | - -### Result - +| params.logicalAddress | uint32_t | Logical address of the device | +| params.keyCode | uint32_t | Key code of the key press event | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -817,9 +729,10 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.sendUserControlReleased", + "method": "org.rdk.IHdmiCecSink.SendUserControlPressed", "params": { - "logicalAddress": 4 + "logicalAddress": "0", + "keyCode": "0" } } ``` @@ -831,32 +744,31 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SendUserControlReleased [method](#head.Methods)* - -## *sendStandbyMessage* - -Sends a CEC \ message to the logical address of the device. +Sends the CEC message when TV remote key is released. ### Events - -No Events - +No events are associated with this method. ### Parameters - -This method takes no parameters. - -### Result - | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| params.logicalAddress | uint32_t | Logical address of the device | +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -864,7 +776,10 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.sendStandbyMessage" + "method": "org.rdk.IHdmiCecSink.SendUserControlReleased", + "params": { + "logicalAddress": "0" + } } ``` @@ -875,35 +790,31 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SetActivePath [method](#head.Methods)* - -## *setActivePath* - -Sets the source device to active (`setStreamPath`). The source wakes from standby if it's in the standby state. +Sets the source device to active (setStreamPath). The source wakes from standby if it’s in the standby state. ### Events - -No Events - +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.activePath | string | Physical address of the source device | - -### Result - +| params.activePath | string | Active path of the device | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -911,9 +822,9 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.setActivePath", + "method": "org.rdk.IHdmiCecSink.SetActivePath", "params": { - "activePath": "1.0.0.0" + "activePath": "" } } ``` @@ -925,32 +836,29 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` - - -## *setActiveSource* + +## *SetActiveSource [method](#head.Methods)* Sets the current active source as TV (physical address 0.0.0.0). This call needs to be made when the TV switches to internal tuner or any apps. ### Events - -No Events - +No events are associated with this method. ### Parameters - This method takes no parameters. - -### Result - +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -958,7 +866,7 @@ This method takes no parameters. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.setActiveSource" + "method": "org.rdk.IHdmiCecSink.SetActiveSource" } ``` @@ -969,36 +877,31 @@ This method takes no parameters. "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SetEnabled [method](#head.Methods)* - -## *setEnabled* - -Enables or disables HDMI-CEC support in the platform. +Sets the status of the HDMI CEC Sink ### Events - -| Event | Description | -| :-------- | :-------- | -| [reportCecEnabledEvent](#reportCecEnabledEvent) | Triggered when the HDMI-CEC is enabled. | +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.enabled | boolean | Indicates whether HDMI-CEC is enabled (`true`) or disabled (`false`) in the platform | - -### Result - +| params.enabled | bool | Is the HDMI CEC Sink enabled or not | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -1006,9 +909,9 @@ Enables or disables HDMI-CEC support in the platform. { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.setEnabled", + "method": "org.rdk.IHdmiCecSink.SetEnabled", "params": { - "enabled": false + "enabled": "true" } } ``` @@ -1020,35 +923,34 @@ Enables or disables HDMI-CEC support in the platform. "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SetLatencyInfo [method](#head.Methods)* - -## *setMenuLanguage* - -Updates the internal data structure with the new menu Language and also broadcasts the \ CEC message. +Sets the Current Latency Values such as Video Latency, Latency Flags,Audio Output Compensated value and Audio Output Delay by sending message for Dynamic Auto LipSync Feature. ### Events - -No Events - +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.language | string | 3 byte ASCII defined in ISO_639-2_codes (https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes) | - -### Result - +| params.videoLatency | string | Video Latency value | +| params.lowLatencyMode | string | Low Latency Mode value | +| params.audioOutputCompensated | string | Audio Output Compensated value | +| params.audioOutputDelay | string | Audio Output Delay value | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -1056,9 +958,12 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.setMenuLanguage", + "method": "org.rdk.IHdmiCecSink.SetLatencyInfo", "params": { - "language": "chi" + "videoLatency": "", + "lowLatencyMode": "", + "audioOutputCompensated": "", + "audioOutputDelay": "" } } ``` @@ -1070,35 +975,31 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SetMenuLanguage [method](#head.Methods)* - -## *setOSDName* - -Sets the OSD Name used by host device. +Updates the internal data structure with the new menu Language and also broadcasts the CEC message. ### Events - -No Events - +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.name | string | The OSD Name | - -### Result - +| params.language | string | Menu language to be set | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -1106,9 +1007,9 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.setOSDName", + "method": "org.rdk.IHdmiCecSink.SetMenuLanguage", "params": { - "name": "Fire TV Stick" + "language": "" } } ``` @@ -1120,36 +1021,31 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SetOSDName [method](#head.Methods)* - -## *setRoutingChange* - -Changes routing while switching between HDMI inputs and TV. +Sets the OSD name of the HDMI CEC Sink ### Events - -No Events - +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.oldPort | string | Current active port, such as `TV`, `HDMI0`, `HDMI1`, `HDMI2` | -| params.newPort | string | New port to switch to, such as `TV`, `HDMI0`, `HDMI1`, `HDMI2` | - -### Result - +| params.name | string | OSD name of the HDMI CEC Sink | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -1157,10 +1053,9 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.setRoutingChange", + "method": "org.rdk.IHdmiCecSink.SetOSDName", "params": { - "oldPort": "HDMI0", - "newPort": "TV" + "name": "" } } ``` @@ -1172,37 +1067,32 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SetRoutingChange [method](#head.Methods)* - -## *setupARCRouting* - -Enable (or disable) HDMI-CEC Audio Return Channel (ARC) routing. Upon enabling, triggers arcInitiationEvent and upon disabling, triggers arcTerminationEvent. +Changes routing while switching between HDMI inputs and TV. ### Events - -| Event | Description | -| :-------- | :-------- | -| [arcInitiationEvent](#arcInitiationEvent) | Triggered when routing though the HDMI ARC port is successfully established. | -| [arcTerminationEvent](#arcTerminationEvent) | Triggered when routing though the HDMI ARC port terminates. | +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.enabled | boolean | Indicates whether HDMI-CEC ARC is enabled (`true`) or disabled (`false`). If enabled, the CEC \ and \ messages are sent. If disabled, the CEC \ and \ messages are sent | - -### Result - +| params.oldPort | string | Old port number | +| params.newPort | string | New port number | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -1210,9 +1100,10 @@ Enable (or disable) HDMI-CEC Audio Return Channel (ARC) routing. Upon enabling, { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.setupARCRouting", + "method": "org.rdk.IHdmiCecSink.SetRoutingChange", "params": { - "enabled": true + "oldPort": "", + "newPort": "" } } ``` @@ -1224,35 +1115,31 @@ Enable (or disable) HDMI-CEC Audio Return Channel (ARC) routing. Upon enabling, "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SetVendorId [method](#head.Methods)* - -## *setVendorId* - -Sets a vendor ID used by host device. +Sets the vendor ID of the HDMI CEC Sink ### Events - -No Events - +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.vendorid | string | Vendor ID for this device. The ID can have a maximum of 6 characters | - -### Result - +| params.vendorid | string | Vendor ID of the HDMI CEC Sink | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -1260,9 +1147,9 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.setVendorId", + "method": "org.rdk.IHdmiCecSink.SetVendorId", "params": { - "vendorid": "0019fc" + "vendorid": "" } } ``` @@ -1274,38 +1161,31 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` + +## *SetupARCRouting [method](#head.Methods)* - -## *setLatencyInfo* - -Sets the Current Latency Values such as Video Latency, Latency Flags,Audio Output Compensated value and Audio Output Delay by sending \ message for Dynamic Auto LipSync Feature. +Enable (or disable) HDMI-CEC Audio Return Channel (ARC) routing. Upon enabling, triggers arcInitiationEvent and upon disabling, triggers arcTerminationEvent. ### Events - -No Events - +No events are associated with this method. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.videoLatency | string | Indicates the Video Latency value of the target device | -| params.lowLatencyMode | string | Indicates whether low latency Mode is 0 or 1 | -| params.audioOutputCompensated | string | Indicates whether Audio Output is delay compensated or not. 0 = (NA)Sent by Non-TV, 1 = TV's audio Output is delay compensated, 2 = Not delay compensated, 3 = Partially delayed | -| params.audioOutputDelay | string | Indicates the Audio Output Delay value of the target device | - -### Result - +| params.enabled | bool | Is the HDMI CEC Sink enabled or not | +### Results | Name | Type | Description | | :-------- | :-------- | :-------- | -| result | object | | -| result.success | boolean | Whether the request succeeded | +| result.success | HdmiCecSinkSuccess | Is the operation successful or not | +| result.success.success | bool | | + +### Examples -### Example #### Request @@ -1313,12 +1193,9 @@ No Events { "jsonrpc": "2.0", "id": 42, - "method": "org.rdk.HdmiCecSink.setLatencyInfo", + "method": "org.rdk.IHdmiCecSink.SetupARCRouting", "params": { - "videoLatency": "2", - "lowLatencyMode": "1", - "audioOutputCompensated": "1", - "audioOutputDelay": "20" + "enabled": "true" } } ``` @@ -1330,465 +1207,503 @@ No Events "jsonrpc": "2.0", "id": 42, "result": { - "success": true + "success": { + "success": "true" + } } } ``` - + + # Notifications -Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [[Thunder](#Thunder)] for information on how to register for a notification. +Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [[Thunder](#ref.Thunder)] for information on how to register for a notification. -The following events are provided by the org.rdk.HdmiCecSink plugin: +The following events are provided by the IHdmiCecSink plugin: -HdmiCecSink interface events: +IHdmiCecSink interface events: -| Event | Description | +| Method | Description | | :-------- | :-------- | -| [arcInitiationEvent](#arcInitiationEvent) | Triggered when routing though the HDMI ARC port is successfully established | -| [arcTerminationEvent](#arcTerminationEvent) | Triggered when routing though the HDMI ARC port terminates | -| [onActiveSourceChange](#onActiveSourceChange) | Triggered with the active source device changes | -| [onDeviceAdded](#onDeviceAdded) | 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 | -| [onDeviceInfoUpdated](#onDeviceInfoUpdated) | Triggered when device information changes (physicalAddress, deviceType, vendorID, osdName, cecVersion, powerStatus) | -| [onDeviceRemoved](#onDeviceRemoved) | Triggered when HDMI cable is physically removed from the HDMI port on a TV or the power cable is removed from the source device | -| [onImageViewOnMsg](#onImageViewOnMsg) | Triggered when an \ CEC message is received from the source device | -| [onInActiveSource](#onInActiveSource) | Triggered when the source is no longer active | -| [onTextViewOnMsg](#onTextViewOnMsg) | Triggered when a \ CEC message is received from the source device | -| [onWakeupFromStandby](#onWakeupFromStandby) | Triggered when the TV is in standby mode and it receives \/ \/ \ CEC message from the connected source device | -| [reportAudioDeviceConnectedStatus](#reportAudioDeviceConnectedStatus) | Triggered when an audio device is added or removed | -| [reportAudioStatusEvent](#reportAudioStatusEvent) | Triggered when CEC \ message of device is received | -| [reportFeatureAbortEvent](#reportFeatureAbortEvent) | Triggered when CEC \ message of device is received | -| [reportCecEnabledEvent](#reportCecEnabledEvent) | Triggered when the HDMI-CEC is enabled | -| [setSystemAudioModeEvent](#setSystemAudioModeEvent) | Triggered when CEC \ message of device is received | -| [shortAudiodesciptorEvent](#shortAudiodesciptorEvent) | Triggered when SAD is received from the connected audio device | -| [standbyMessageReceived](#standbyMessageReceived) | Triggered when the source device changes status to `STANDBY` | - - - -## *arcInitiationEvent* +| [ArcInitiationEvent](#event.ArcInitiationEvent) | Triggered when routing though the HDMI ARC port is successfully established. | +| [ArcTerminationEvent](#event.ArcTerminationEvent) | Triggered when routing though the HDMI ARC port terminates. | +| [OnActiveSourceChange](#event.OnActiveSourceChange) | Triggered when the active source device changes. | +| [OnDeviceAdded](#event.OnDeviceAdded) | Triggered when a new device is added to the CEC network. | +| [OnDeviceInfoUpdated](#event.OnDeviceInfoUpdated) | Triggered when device information changes. | +| [OnDeviceRemoved](#event.OnDeviceRemoved) | Triggered when a device is removed from the CEC network. | +| [OnImageViewOnMsg](#event.OnImageViewOnMsg) | Triggered when an CEC message is received from the source device. | +| [OnInActiveSource](#event.OnInActiveSource) | Triggered when the source is no longer active. | +| [OnTextViewOnMsg](#event.OnTextViewOnMsg) | Triggered when a CEC message is received from the source device. | +| [OnWakeupFromStandby](#event.OnWakeupFromStandby) | Triggered when the TV is in standby mode and it receives / / CEC message from the connected source device. | +| [ReportAudioDeviceConnectedStatus](#event.ReportAudioDeviceConnectedStatus) | Triggered when an audio device is added or removed. | +| [ReportAudioDevicePowerStatus](#event.ReportAudioDevicePowerStatus) | Triggered when the source device changes. | +| [ReportAudioStatusEvent](#event.ReportAudioStatusEvent) | Triggered when CEC message of device is received. | +| [ReportCecEnabledEvent](#event.ReportCecEnabledEvent) | Triggered when the HDMI-CEC is enabled. | +| [ReportFeatureAbortEvent](#event.ReportFeatureAbortEvent) | Triggered when CEC message of device is received. | +| [SetSystemAudioModeEvent](#event.SetSystemAudioModeEvent) | Triggered when CEC message of device is received. | +| [ShortAudiodescriptorEvent](#event.ShortAudiodescriptorEvent) | Triggered when SAD is received from the connected audio device. See requestShortAudioDescriptor. | +| [StandbyMessageReceived](#event.StandbyMessageReceived) | Triggered when the source device changes status to STANDBY. | + + +## *ArcInitiationEvent [event](#head.Notifications)* Triggered when routing though the HDMI ARC port is successfully established. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.status | string | Whether the operation succeeded | +| params.success | string | Is the operation successful or not | + +### Examples -### Example + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.arcInitiationEvent", + "id": 42, + "method": "org.rdk.IHdmiCecSink.ArcInitiationEvent", "params": { - "status": "success" + "success": "" } } ``` - - -## *arcTerminationEvent* + +## *ArcTerminationEvent [event](#head.Notifications)* Triggered when routing though the HDMI ARC port terminates. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.status | string | Whether the operation succeeded | +| params.success | string | Is the operation successful or not | -### Example +### Examples + + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.arcTerminationEvent", + "id": 42, + "method": "org.rdk.IHdmiCecSink.ArcTerminationEvent", "params": { - "status": "success" + "success": "" } } ``` + +## *OnActiveSourceChange [event](#head.Notifications)* - -## *onActiveSourceChange* - -Triggered with the active source device changes. +Triggered when the active source device changes. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | -| params.physicalAddress | string | Physical address of the device | +| params.logicalAddress | int | Logical address of the active source | +| params.physicalAddress | string | Physical address of the active source | + +### Examples -### Example + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.onActiveSourceChange", + "id": 42, + "method": "org.rdk.IHdmiCecSink.OnActiveSourceChange", "params": { - "logicalAddress": 4, - "physicalAddress": "1.0.0.0" + "logicalAddress": "0", + "physicalAddress": "" } } ``` + +## *OnDeviceAdded [event](#head.Notifications)* - -## *onDeviceAdded* - -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 is collected such as CEC version, OSD name, vendor ID, and power status. 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. +Triggered when a new device is added to the CEC network. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | +| params.logicalAddress | int | Logical address of the active source | + +### Examples + -### Example +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.onDeviceAdded", + "id": 42, + "method": "org.rdk.IHdmiCecSink.OnDeviceAdded", "params": { - "logicalAddress": 4 + "logicalAddress": "0" } } ``` + +## *OnDeviceInfoUpdated [event](#head.Notifications)* - -## *onDeviceInfoUpdated* - -Triggered when device information changes (physicalAddress, deviceType, vendorID, osdName, cecVersion, powerStatus). +Triggered when device information changes. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | +| params.logicalAddress | int | Logical address of the active source | + +### Examples -### Example + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.onDeviceInfoUpdated", + "id": 42, + "method": "org.rdk.IHdmiCecSink.OnDeviceInfoUpdated", "params": { - "logicalAddress": 4 + "logicalAddress": "0" } } ``` + +## *OnDeviceRemoved [event](#head.Notifications)* - -## *onDeviceRemoved* - -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. +Triggered when a device is removed from the CEC network. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | +| params.logicalAddress | int | Logical address of the active source | -### Example +### Examples + + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.onDeviceRemoved", + "id": 42, + "method": "org.rdk.IHdmiCecSink.OnDeviceRemoved", "params": { - "logicalAddress": 4 + "logicalAddress": "0" } } ``` + +## *OnImageViewOnMsg [event](#head.Notifications)* - -## *onImageViewOnMsg* - -Triggered when an \ CEC message is received from the source device. +Triggered when an CEC message is received from the source device. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | +| params.logicalAddress | int | Logical address of the active source | + +### Examples -### Example + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.onImageViewOnMsg", + "id": 42, + "method": "org.rdk.IHdmiCecSink.OnImageViewOnMsg", "params": { - "logicalAddress": 4 + "logicalAddress": "0" } } ``` - - -## *onInActiveSource* + +## *OnInActiveSource [event](#head.Notifications)* Triggered when the source is no longer active. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | -| params.physicalAddress | string | Physical address of the device | +| params.logicalAddress | int | Logical address of the active source | +| params.physicalAddress | string | Physical address of the active source | + +### Examples + -### Example +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.onInActiveSource", + "id": 42, + "method": "org.rdk.IHdmiCecSink.OnInActiveSource", "params": { - "logicalAddress": 4, - "physicalAddress": "1.0.0.0" + "logicalAddress": "0", + "physicalAddress": "" } } ``` + +## *OnTextViewOnMsg [event](#head.Notifications)* - -## *onTextViewOnMsg* - -Triggered when a \ CEC message is received from the source device. +Triggered when a CEC message is received from the source device. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | +| params.logicalAddress | int | Logical address of the active source | + +### Examples -### Example + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.onTextViewOnMsg", + "id": 42, + "method": "org.rdk.IHdmiCecSink.OnTextViewOnMsg", "params": { - "logicalAddress": 4 + "logicalAddress": "0" } } ``` + +## *OnWakeupFromStandby [event](#head.Notifications)* - -## *onWakeupFromStandby* - -Triggered when the TV is in standby mode and it receives \/ \/ \ CEC message from the connected source device. This event will be notified to UI/Application and application will bring the TV out of standby. +Triggered when the TV is in standby mode and it receives / / CEC message from the connected source device. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | +| params.logicalAddress | int | Logical address of the active source | -### Example +### Examples + + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.onWakeupFromStandby", + "id": 42, + "method": "org.rdk.IHdmiCecSink.OnWakeupFromStandby", "params": { - "logicalAddress": 4 + "logicalAddress": "0" } } ``` - - -## *reportAudioDeviceConnectedStatus* + +## *ReportAudioDeviceConnectedStatus [event](#head.Notifications)* Triggered when an audio device is added or removed. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.status | string | The status | -| params.audioDeviceConnected | string | `true` if an audio device is connected, otherwise `false` | +| params.status | string | Status of the audio device | +| params.audioDeviceConnected | string | Audio device connected or not | + +### Examples -### Example + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.reportAudioDeviceConnectedStatus", + "id": 42, + "method": "org.rdk.IHdmiCecSink.ReportAudioDeviceConnectedStatus", "params": { - "status": "success", - "audioDeviceConnected": "true" + "status": "", + "audioDeviceConnected": "" } } ``` + +## *ReportAudioDevicePowerStatus [event](#head.Notifications)* - -## *reportAudioStatusEvent* - -Triggered when CEC \ message of device is received. +Triggered when the source device changes. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.muteStatus | integer | The mute status | -| params.volumeLevel | integer | The volume level of device | +| params.powerStatus | int | Power status of the device | + +### Examples -### Example + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.reportAudioStatusEvent", + "id": 42, + "method": "org.rdk.IHdmiCecSink.ReportAudioDevicePowerStatus", "params": { - "muteStatus": 0, - "volumeLevel": 28 + "powerStatus": "0" } } ``` + +## *ReportAudioStatusEvent [event](#head.Notifications)* - -## *reportFeatureAbortEvent* - -Triggered when CEC \ message of device is received. +Triggered when CEC message of device is received. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | -| params.opcode | integer | The opcode send to the device | -| params.FeatureAbortReason | integer | Reason for the feature abort | +| params.muteStatus | int | Mute status of the device | +| params.volumeLevel | int | Volume level of the device | -### Example +### Examples + + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.reportFeatureAbortEvent", + "id": 42, + "method": "org.rdk.IHdmiCecSink.ReportAudioStatusEvent", "params": { - "logicalAddress": 4, - "opcode": 0, - "FeatureAbortReason": 0 + "muteStatus": "0", + "volumeLevel": "0" } } ``` - - -## *reportCecEnabledEvent* + +## *ReportCecEnabledEvent [event](#head.Notifications)* Triggered when the HDMI-CEC is enabled. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.cecEnable | string | Whether the cec is enabled | +| params.cecEnable | string | HDMI-CEC enabled or not | -### Example +### Examples + + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.reportCecEnabledEvent", + "id": 42, + "method": "org.rdk.IHdmiCecSink.ReportCecEnabledEvent", "params": { - "cecEnable": "true" + "cecEnable": "" } } ``` + +## *ReportFeatureAbortEvent [event](#head.Notifications)* - -## *setSystemAudioModeEvent* - -Triggered when CEC \ message of device is received. +Triggered when CEC message of device is received. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.audioMode | string | Audio mode of system | +| params.logicalAddress | int | Logical address of the active source | +| params.opcode | int | Opcode of the message | +| params.FeatureAbortReason | int | Reason for the feature abort | + +### Examples -### Example + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.setSystemAudioModeEvent", + "id": 42, + "method": "org.rdk.IHdmiCecSink.ReportFeatureAbortEvent", "params": { - "audioMode": "On" + "logicalAddress": "0", + "opcode": "0", + "FeatureAbortReason": "0" } } ``` + +## *SetSystemAudioModeEvent [event](#head.Notifications)* - -## *shortAudiodesciptorEvent* - -Triggered when SAD is received from the connected audio device. See `requestShortAudioDescriptor`. +Triggered when CEC message of device is received. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.ShortAudioDescriptor | array | The SAD information (formatid, audioFormatCode, numberofdescriptor) | -| params.ShortAudioDescriptor[#] | integer | | +| params.audioMode | string | Audio mode of the device | + +### Examples -### Example + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.shortAudiodesciptorEvent", + "id": 42, + "method": "org.rdk.IHdmiCecSink.SetSystemAudioModeEvent", "params": { - "ShortAudioDescriptor": [ - [ - 0, - 10, - 2 - ] - ] + "audioMode": "" } } ``` + +## *ShortAudiodescriptorEvent [event](#head.Notifications)* - -## *standbyMessageReceived* - -Triggered when the source device changes status to `STANDBY`. +Triggered when SAD is received from the connected audio device. See requestShortAudioDescriptor. ### Parameters - | Name | Type | Description | | :-------- | :-------- | :-------- | -| params | object | | -| params.logicalAddress | integer | Logical address of the device | +| params.jsonresponse | string | JSON response containing the Short Audio Descriptor (SAD) information | + +### Examples -### Example + +#### Request ```json { "jsonrpc": "2.0", - "method": "client.events.standbyMessageReceived", + "id": 42, + "method": "org.rdk.IHdmiCecSink.ShortAudiodescriptorEvent", "params": { - "logicalAddress": 4 + "jsonresponse": "" } } ``` + +## *StandbyMessageReceived [event](#head.Notifications)* + +Triggered when the source device changes status to STANDBY. + +### Parameters +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| params.logicalAddress | int | Logical address of the active source | + +### Examples + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.IHdmiCecSink.StandbyMessageReceived", + "params": { + "logicalAddress": "0" + } +} +``` \ No newline at end of file diff --git a/docs/apis/SharedStoragePlugin.md b/docs/apis/SharedStoragePlugin.md new file mode 100644 index 00000000..91897653 --- /dev/null +++ b/docs/apis/SharedStoragePlugin.md @@ -0,0 +1,588 @@ + + +# ISharedStorage Plugin + +**Version: [1.0.0](https://github.com/rdkcentral/rdkservices/blob/main/ISharedStorage/CHANGELOG.md)** + +A ISharedStorage plugin for Thunder framework. + +### Table of Contents + +- [Abbreviation, Acronyms and Terms](#head.Abbreviation,_Acronyms_and_Terms) +- [Description](#head.Description) +- [Configuration](#head.Configuration) +- [Methods](#head.Methods) +- [Notifications](#head.Notifications) + + +# Abbreviation, Acronyms and Terms + +[[Refer to this link](userguide/aat.md)] + + +# Description + +The `ISharedStorage` plugin provides an interface for ISharedStorage. + +The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#ref.Thunder)]. + + +# Configuration + +The table below lists configuration options of the plugin. + +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| callsign | string | Plugin instance name (default: *ISharedStorage*) | +| classname | string | Class name: *ISharedStorage* | +| locator | string | Library name: *libWPEFrameworkISharedStorage.so* | +| autostart | boolean | Determines if the plugin shall be started automatically along with the framework | + + +# Methods + +The following methods are provided by the ISharedStorage plugin: + +ISharedStorage interface methods: + +| Method | Description | +| :-------- | :-------- | +| [DeleteKey](#method.DeleteKey) | Deletes a key from the specified namespace | +| [DeleteNamespace](#method.DeleteNamespace) | Deletes the specified namespace | +| [FlushCache](#method.FlushCache) | Flushes the device cache | +| [GetKeys](#method.GetKeys) | Returns the keys that are stored in the specified namespace | +| [GetNamespaceStorageLimit](#method.GetNamespaceStorageLimit) | Returns the storage limit for a given namespace | +| [GetNamespaces](#method.GetNamespaces) | Returns the namespaces | +| [GetStorageSizes](#method.GetStorageSizes) | Returns the size occupied by each namespace | +| [GetValue](#method.GetValue) | Returns the value of a key from the specified namespace. | +| [SetNamespaceStorageLimit](#method.SetNamespaceStorageLimit) | Sets the storage limit for a given namespace | +| [SetValue](#method.SetValue) | Sets the value of a key in the the specified namespace | + + +## *DeleteKey [method](#head.Methods)* + +Deletes a key from the specified namespace + +### Events +No events are associated with this method. +### Parameters +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| params.scope | ScopeType | must be device or account | +| params.ns | string | name space | +| params.key | string | key | +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.success | Success | success | +| result.success.success | bool | | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.ISharedStorage.DeleteKey", + "params": { + "scope": "DEVICE", + "ns": "", + "key": "" + } +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "success": { + "success": "true" + } + } +} +``` + +## *DeleteNamespace [method](#head.Methods)* + +Deletes the specified namespace + +### Events +No events are associated with this method. +### Parameters +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| params.scope | ScopeType | must be device or account | +| params.ns | string | name space | +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.success | Success | success | +| result.success.success | bool | | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.ISharedStorage.DeleteNamespace", + "params": { + "scope": "DEVICE", + "ns": "" + } +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "success": { + "success": "true" + } + } +} +``` + +## *FlushCache [method](#head.Methods)* + +Flushes the device cache + +### Events +No events are associated with this method. +### Parameters +This method takes no parameters. +### Results +This method returns no results. + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.ISharedStorage.FlushCache" +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": "null" +} +``` + +## *GetKeys [method](#head.Methods)* + +Returns the keys that are stored in the specified namespace + +### Events +No events are associated with this method. +### Parameters +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| params.scope | ScopeType | must be device or account | +| params.ns | string | name space | +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.keys | IStringIterator | keys list | +| result.keys[#] | string | | +| result.success | bool | success | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.ISharedStorage.GetKeys", + "params": { + "scope": "DEVICE", + "ns": "" + } +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "keys": [ + "" + ], + "success": "true" + } +} +``` + +## *GetNamespaceStorageLimit [method](#head.Methods)* + +Returns the storage limit for a given namespace + +### Events +No events are associated with this method. +### Parameters +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| params.scope | ScopeType | must be device or account | +| params.ns | string | name space | +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.storageLimit | StorageLimit | Size in bytes | +| result.storageLimit.storageLimit | uint32_t | | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.ISharedStorage.GetNamespaceStorageLimit", + "params": { + "scope": "DEVICE", + "ns": "" + } +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "storageLimit": { + "storageLimit": "0" + } + } +} +``` + +## *GetNamespaces [method](#head.Methods)* + +Returns the namespaces + +### Events +No events are associated with this method. +### Parameters +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| params.scope | ScopeType | must be device or account | +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.namespaces | IStringIterator | namespaces list | +| result.namespaces[#] | string | | +| result.success | bool | success | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.ISharedStorage.GetNamespaces", + "params": { + "scope": "DEVICE" + } +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "namespaces": [ + "" + ], + "success": "true" + } +} +``` + +## *GetStorageSizes [method](#head.Methods)* + +Returns the size occupied by each namespace + +### Events +No events are associated with this method. +### Parameters +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| params.scope | ScopeType | must be device or account | +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.storageList | INamespaceSizeIterator | list of namespaces and their sizes | +| result.storageList[#].ns | string | | +| result.storageList[#].size | uint32_t | | +| result.success | bool | success | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.ISharedStorage.GetStorageSizes", + "params": { + "scope": "DEVICE" + } +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "storageList": [ + { + "ns": "", + "size": "0" + } + ], + "success": "true" + } +} +``` + +## *GetValue [method](#head.Methods)* + +Returns the value of a key from the specified namespace. + +### Events +No events are associated with this method. +### Parameters +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| params.scope | ScopeType | must be device or account | +| params.ns | string | name space | +| params.key | string | key | +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.value | string | value | +| result.ttl | uint32_t | time to live (optional) | +| result.success | bool | success | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.ISharedStorage.GetValue", + "params": { + "scope": "DEVICE", + "ns": "", + "key": "" + } +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "value": "", + "ttl": "0", + "success": "true" + } +} +``` + +## *SetNamespaceStorageLimit [method](#head.Methods)* + +Sets the storage limit for a given namespace + +### Events +No events are associated with this method. +### Parameters +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| params.scope | ScopeType | must be device or account | +| params.ns | string | name space | +| params.storageLimit | uint32_t | size | +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.success | bool | success | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.ISharedStorage.SetNamespaceStorageLimit", + "params": { + "scope": "DEVICE", + "ns": "", + "storageLimit": "0" + } +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "success": "true" + } +} +``` + +## *SetValue [method](#head.Methods)* + +Sets the value of a key in the the specified namespace + +### Events +No events are associated with this method. +### Parameters +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| params.scope | ScopeType | must be device or account | +| params.ns | string | name space | +| params.key | string | key | +| params.value | string | value | +| params.ttl | uint32_t | time to live (optional) | +### Results +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| result.success | Success | success | +| result.success.success | bool | | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.ISharedStorage.SetValue", + "params": { + "scope": "DEVICE", + "ns": "", + "key": "", + "value": "", + "ttl": "0" + } +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "result": { + "success": { + "success": "true" + } + } +} +``` + + + +# Notifications + +Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [[Thunder](#ref.Thunder)] for information on how to register for a notification. + +The following events are provided by the ISharedStorage plugin: + +ISharedStorage interface events: + +| Method | Description | +| :-------- | :-------- | +| [OnValueChanged](#event.OnValueChanged) | Values stored are changed using setValue | + + +## *OnValueChanged [event](#head.Notifications)* + +Values stored are changed using setValue + +### Parameters +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| params.scope | ScopeType | must be device or account | +| params.ns | string | name space | +| params.key | string | key | +| params.value | string | value | + +### Examples + + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 42, + "method": "org.rdk.ISharedStorage.OnValueChanged", + "params": { + "scope": "DEVICE", + "ns": "", + "key": "", + "value": "" + } +} +``` \ No newline at end of file