|
| 1 | +<!-- Generated automatically, DO NOT EDIT! --> |
| 2 | +<a id="UserPlugin_Plugin"></a> |
| 3 | +# UserPlugin Plugin |
| 4 | + |
| 5 | +**Version: [1.0.0](https://github.com/rdkcentral/entservices-apis/tree/main/apis/UserPlugin/IUserPlugin.h)** |
| 6 | + |
| 7 | +A UserPlugin plugin for Thunder framework. |
| 8 | + |
| 9 | +### Table of Contents |
| 10 | + |
| 11 | +- [Abbreviation, Acronyms and Terms](#abbreviation-acronyms-and-terms) |
| 12 | +- [Description](#Description) |
| 13 | +- [Configuration](#Configuration) |
| 14 | +- [Methods](#Methods) |
| 15 | + |
| 16 | +<a id="abbreviation-acronyms-and-terms"></a> |
| 17 | +# Abbreviation, Acronyms and Terms |
| 18 | + |
| 19 | +[[Refer to this link](overview/aat.md)] |
| 20 | + |
| 21 | +<a id="Description"></a> |
| 22 | +# Description |
| 23 | + |
| 24 | +The `UserPlugin` plugin provides an interface for UserPlugin. |
| 25 | + |
| 26 | +The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](https://rdkcentral.github.io/Thunder/)]. |
| 27 | + |
| 28 | +<a id="Configuration"></a> |
| 29 | +# Configuration |
| 30 | + |
| 31 | +The table below lists configuration options of the plugin. |
| 32 | + |
| 33 | +| Name | Type | Description | |
| 34 | +| :-------- | :-------- | :-------- | |
| 35 | +| callsign | string | Plugin instance name (default: org.rdk.UserPlugin) | |
| 36 | +| classname | string | Class name: *UserPlugin* | |
| 37 | +| locator | string | Library name: *libWPEFrameworkUserPlugin.so* | |
| 38 | +| autostart | boolean | Determines if the plugin shall be started automatically along with the framework | |
| 39 | + |
| 40 | +<a id="Methods"></a> |
| 41 | +# Methods |
| 42 | + |
| 43 | +The following methods are provided by the UserPlugin plugin: |
| 44 | + |
| 45 | +UserPlugin interface methods: |
| 46 | + |
| 47 | +| Method | Description | |
| 48 | +| :-------- | :-------- | |
| 49 | +| [getDevicePowerState](#getDevicePowerState) | Get current Power State | |
| 50 | +| [getVolumeLevel](#getVolumeLevel) | Get Volume Level | |
| 51 | + |
| 52 | +<a id="getDevicePowerState"></a> |
| 53 | +## *getDevicePowerState* |
| 54 | + |
| 55 | +Get current Power State |
| 56 | + |
| 57 | +### Events |
| 58 | +Event details will be updated soon. |
| 59 | +### Parameters |
| 60 | +This method takes no parameters. |
| 61 | +### Results |
| 62 | +| Name | Type | Description | |
| 63 | +| :-------- | :-------- | :-------- | |
| 64 | +| result | object | | |
| 65 | +| result.powerState | string | current power state | |
| 66 | + |
| 67 | +### Examples |
| 68 | + |
| 69 | + |
| 70 | +#### Request |
| 71 | + |
| 72 | +```json |
| 73 | +{ |
| 74 | + "jsonrpc": 2.0, |
| 75 | + "id": 0, |
| 76 | + "method": "org.rdk.UserPlugin.getDevicePowerState" |
| 77 | +} |
| 78 | +``` |
| 79 | + |
| 80 | + |
| 81 | +#### CURL Command |
| 82 | + |
| 83 | +```curl |
| 84 | +curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "method": "org.rdk.UserPlugin.getDevicePowerState"}' http://127.0.0.1:9998/jsonrpc |
| 85 | +``` |
| 86 | + |
| 87 | + |
| 88 | +#### Response |
| 89 | + |
| 90 | +```json |
| 91 | +{ |
| 92 | + "jsonrpc": 2.0, |
| 93 | + "id": 0, |
| 94 | + "result": { |
| 95 | + "powerState": "" |
| 96 | + } |
| 97 | +} |
| 98 | +``` |
| 99 | + |
| 100 | +<a id="getVolumeLevel"></a> |
| 101 | +## *getVolumeLevel* |
| 102 | + |
| 103 | +Get Volume Level |
| 104 | + |
| 105 | +### Events |
| 106 | +Event details will be updated soon. |
| 107 | +### Parameters |
| 108 | +| Name | Type | Description | |
| 109 | +| :-------- | :-------- | :-------- | |
| 110 | +| params | object | | |
| 111 | +| params.port | string | | |
| 112 | +### Results |
| 113 | +| Name | Type | Description | |
| 114 | +| :-------- | :-------- | :-------- | |
| 115 | +| result | object | | |
| 116 | +| result.volumeLevel | string | | |
| 117 | + |
| 118 | +### Examples |
| 119 | + |
| 120 | + |
| 121 | +#### Request |
| 122 | + |
| 123 | +```json |
| 124 | +{ |
| 125 | + "jsonrpc": 2.0, |
| 126 | + "id": 1, |
| 127 | + "method": "org.rdk.UserPlugin.getVolumeLevel", |
| 128 | + "params": { |
| 129 | + "port": "" |
| 130 | + } |
| 131 | +} |
| 132 | +``` |
| 133 | + |
| 134 | + |
| 135 | +#### CURL Command |
| 136 | + |
| 137 | +```curl |
| 138 | +curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 1, "method": "org.rdk.UserPlugin.getVolumeLevel", "params": {"port": ""}}' http://127.0.0.1:9998/jsonrpc |
| 139 | +``` |
| 140 | + |
| 141 | + |
| 142 | +#### Response |
| 143 | + |
| 144 | +```json |
| 145 | +{ |
| 146 | + "jsonrpc": 2.0, |
| 147 | + "id": 1, |
| 148 | + "result": { |
| 149 | + "volumeLevel": "" |
| 150 | + } |
| 151 | +} |
| 152 | +``` |
| 153 | + |
| 154 | + |
0 commit comments