From c617325769a5da3e473cccb560206bf4c08cb809 Mon Sep 17 00:00:00 2001 From: Sergey Borushevsky Date: Thu, 24 Oct 2024 04:26:57 +0300 Subject: [PATCH 1/6] RDK-53879 : Added DeviceInfo.socname property --- DeviceInfo/DeviceInfo.h | 1 + DeviceInfo/DeviceInfo.json | 31 ++++++++++++++++ DeviceInfo/DeviceInfoJsonRpc.cpp | 25 +++++++++++++ DeviceInfo/Implementation/DeviceInfo.cpp | 47 ++++++++++++++++++++++++ DeviceInfo/Implementation/DeviceInfo.h | 1 + 5 files changed, 105 insertions(+) diff --git a/DeviceInfo/DeviceInfo.h b/DeviceInfo/DeviceInfo.h index 4714b6c0aa..fd7a0acd8c 100644 --- a/DeviceInfo/DeviceInfo.h +++ b/DeviceInfo/DeviceInfo.h @@ -118,6 +118,7 @@ namespace Plugin { uint32_t get_make(JsonData::DeviceInfo::MakeData& response) const; uint32_t get_modelname(JsonData::DeviceInfo::ModelnameData& response) const; uint32_t get_devicetype(JsonData::DeviceInfo::DevicetypeData& response) const; + uint32_t get_socname(JsonData::DeviceInfo::SocnameData& response) const; uint32_t get_distributorid(JsonData::DeviceInfo::DistributoridData& response) const; uint32_t get_supportedaudioports(JsonData::DeviceInfo::SupportedaudioportsData& response) const; uint32_t get_supportedvideodisplays(JsonData::DeviceInfo::SupportedvideodisplaysData& response) const; diff --git a/DeviceInfo/DeviceInfo.json b/DeviceInfo/DeviceInfo.json index 463e051f76..08ae82675d 100644 --- a/DeviceInfo/DeviceInfo.json +++ b/DeviceInfo/DeviceInfo.json @@ -181,6 +181,16 @@ "description": "Device model number or SKU", "example": "PX051AEI" }, + "socname": { + "type": "string", + "enum": [ + "Amlogic", + "Realtek", + "Broadcom" + ], + "description": "SOC Name", + "example": "Realtek" + }, "yocto": { "type": "string", "enum": [ @@ -573,6 +583,27 @@ } ] }, + "socname": { + "summary": "Device type", + "readonly": true, + "params": { + "type": "object", + "properties": { + "socname": { + "$ref": "#/definitions/socname" + } + }, + "required": [ + "socname" + ] + }, + "errors": [ + { + "description": "General error", + "$ref": "#/common/errors/general" + } + ] + }, "distributorid": { "summary": "Partner ID or distributor ID for device", "readonly": true, diff --git a/DeviceInfo/DeviceInfoJsonRpc.cpp b/DeviceInfo/DeviceInfoJsonRpc.cpp index 166050f286..11dc14517b 100644 --- a/DeviceInfo/DeviceInfoJsonRpc.cpp +++ b/DeviceInfo/DeviceInfoJsonRpc.cpp @@ -40,6 +40,7 @@ namespace Plugin { Property(_T("make"), &DeviceInfo::get_make, nullptr, this); Property(_T("modelname"), &DeviceInfo::get_modelname, nullptr, this); Property(_T("devicetype"), &DeviceInfo::get_devicetype, nullptr, this); + Property(_T("socname"), &DeviceInfo::get_socname, nullptr, this); Property(_T("distributorid"), &DeviceInfo::get_distributorid, nullptr, this); Property(_T("supportedaudioports"), &DeviceInfo::get_supportedaudioports, nullptr, this); Property(_T("supportedvideodisplays"), &DeviceInfo::get_supportedvideodisplays, nullptr, this); @@ -63,6 +64,7 @@ namespace Plugin { Unregister(_T("make")); Unregister(_T("modelname")); Unregister(_T("devicetype")); + Unregister(_T("socname")); Unregister(_T("distributorid")); Unregister(_T("supportedaudioports")); Unregister(_T("supportedvideodisplays")); @@ -243,6 +245,29 @@ namespace Plugin { return result; } + // Property: socname - SOC Name + // Return codes: + // - ERROR_NONE: Success + // - ERROR_GENERAL: General error + uint32_t DeviceInfo::get_socname(SocnameData& response) const + { + string socType; + + auto result = _deviceInfo->SocName(socType); + + if (result == Core::ERROR_NONE) { + Core::EnumerateType value(socType.c_str(), false); + if (value.IsSet()) { + response.Socname = value.Value(); + } else { + TRACE(Trace::Fatal, (_T("Unknown value %s"), socType.c_str())); + result = Core::ERROR_GENERAL; + } + } + + return result; + } + // Property: distributorid - Partner ID or distributor ID for device // Return codes: // - ERROR_NONE: Success diff --git a/DeviceInfo/Implementation/DeviceInfo.cpp b/DeviceInfo/Implementation/DeviceInfo.cpp index 9707f52c7a..2407342084 100644 --- a/DeviceInfo/Implementation/DeviceInfo.cpp +++ b/DeviceInfo/Implementation/DeviceInfo.cpp @@ -11,6 +11,37 @@ namespace WPEFramework { namespace Plugin { namespace { + + static const char *Sku2Soc[][2] = { + { "PLTL11AEI" , "Amlogic" }, + { "ZWCN11MWI" , "Amlogic" }, + { "SKTL11AEI" , "Amlogic" }, + //{ "LS301" , "" }, // ? + { "HSTP11MWR" , "Amlogic" }, + { "HSTP11MWRFX50", "Amlogic" }, + { "ELTE11MWR" , "Amlogic" }, + { "SKXI11ADS" , "Realtek" }, + { "SKXI11AIS" , "Realtek" }, + { "SKXI11ANS" , "Realtek" }, + { "SCXI11AIC" , "Realtek" }, + { "SCXI11BEI" , "Broadcom" }, + //{ "CMXI11BEI" , "" }, // ? + { "AX013AN" , "Broadcom" }, + { "AX014AN" , "Broadcom" }, + { "AX061AEI" , "Broadcom" }, + { "MX011AN" , "Broadcom" }, + { "CS011AN" , "Broadcom" }, + { "CXD01ANI" , "Broadcom" }, + //{ "PX001AN" , "Intel" }, + { "PX013AN" , "Broadcom" }, + { "PX022AN" , "Broadcom" }, + { "PX032ANI" , "Broadcom" }, + { "PX051AEI" , "Broadcom" }, + { "PXD01ANI" , "Broadcom" }, + { "SX022AN" , "Broadcom" }, + { "TX061AEI" , "Broadcom" } + }; + uint32_t GetFileRegex(const char* filename, const std::regex& regex, string& response) { uint32_t result = Core::ERROR_GENERAL; @@ -133,6 +164,22 @@ namespace Plugin { #endif } + uint32_t DeviceInfoImplementation::SocName(string& socName) const + { + string sku; + + auto result = Sku(sku); + if (result == Core::ERROR_NONE) { + for (int n = sizeof(Sku2Soc) / sizeof(*Sku2Soc) - 1; n >= 0; n--) { + if (strcmp(Sku2Soc[n][0], sku.c_str()) == 0) { + socName = Sku2Soc[n][1]; + return result; + } + } + } + return Core::ERROR_GENERAL; + } + uint32_t DeviceInfoImplementation::DistributorId(string& distributorId) const { return (GetFileRegex(_T("/opt/www/authService/partnerId3.dat"), diff --git a/DeviceInfo/Implementation/DeviceInfo.h b/DeviceInfo/Implementation/DeviceInfo.h index 66d50dc003..3301f2adba 100644 --- a/DeviceInfo/Implementation/DeviceInfo.h +++ b/DeviceInfo/Implementation/DeviceInfo.h @@ -28,6 +28,7 @@ namespace Plugin { uint32_t Make(string& make) const override; uint32_t Model(string& model) const override; uint32_t DeviceType(string& deviceType) const override; + uint32_t SocName(string& socName) const override; uint32_t DistributorId(string& distributorId) const override; }; } From a393900828a664f0719305ee270b1cef78c16980 Mon Sep 17 00:00:00 2001 From: Sergey Borushevsky Date: Thu, 24 Oct 2024 04:51:59 +0300 Subject: [PATCH 2/6] Added interfaces patch for L1 tests. --- .github/workflows/L1-tests.yml | 2 + .../patches/0002-RDK-53879-Add-socname.patch | 59 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index 9f00c60f58..10aef7bbd9 100755 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -143,6 +143,8 @@ jobs: && git apply "${{github.workspace}}/rdkservices/Tests/L1Tests/patches/0001-Add-IAnalytics-interface-R2.patch" && + git apply "${{github.workspace}}/rdkservices/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch" + && cd .. - name: Build ThunderInterfaces diff --git a/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch b/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch new file mode 100644 index 0000000000..51528eeafe --- /dev/null +++ b/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch @@ -0,0 +1,59 @@ +diff -uprN a/interfaces/IDeviceInfo.h b/interfaces/IDeviceInfo.h +--- a/interfaces/IDeviceInfo.h 2024-10-24 04:46:28.446820588 +0300 ++++ b/interfaces/IDeviceInfo.h 2024-10-23 17:48:50.583263517 +0300 +@@ -17,6 +17,7 @@ namespace Exchange { + virtual uint32_t Make(string& make /* @out */) const = 0; + virtual uint32_t Model(string& model /* @out */) const = 0; + virtual uint32_t DeviceType(string& deviceType /* @out */) const = 0; ++ virtual uint32_t SocName(string& socName /* @out */) const = 0; + virtual uint32_t DistributorId(string& distributorId /* @out */) const = 0; + }; + +diff -uprN a/jsonrpc/DeviceInfo.json b/jsonrpc/DeviceInfo.json +--- a/jsonrpc/DeviceInfo.json 2024-10-24 04:46:28.447820629 +0300 ++++ b/jsonrpc/DeviceInfo.json 2024-10-23 19:59:21.857033373 +0300 +@@ -184,6 +184,16 @@ + "description": "Device model number or SKU", + "example": "PX051AEI" + }, ++ "socname": { ++ "type": "string", ++ "enum": [ ++ "Amlogic", ++ "Realtek", ++ "Broadcom" ++ ], ++ "description": "SOC Name", ++ "example": "Realtek" ++ }, + "yocto": { + "type": "string", + "enum": [ +@@ -596,6 +606,27 @@ + } + ] + }, ++ "socname": { ++ "summary": "Device type", ++ "readonly": true, ++ "params": { ++ "type": "object", ++ "properties": { ++ "socname": { ++ "$ref": "#/definitions/socname" ++ } ++ }, ++ "required": [ ++ "socname" ++ ] ++ }, ++ "errors": [ ++ { ++ "description": "General error", ++ "$ref": "#/common/errors/general" ++ } ++ ] ++ }, + "distributorid": { + "summary": "Partner ID or distributor ID for device", + "readonly": true, From 8f28b920edb21a9d191f78c5f1f8aaeb1fc5d629 Mon Sep 17 00:00:00 2001 From: Sergey Borushevsky Date: Thu, 24 Oct 2024 05:11:42 +0300 Subject: [PATCH 3/6] Patch fix. --- .../patches/0002-RDK-53879-Add-socname.patch | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch b/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch index 51528eeafe..d7afc1f387 100644 --- a/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch +++ b/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch @@ -11,7 +11,7 @@ diff -uprN a/interfaces/IDeviceInfo.h b/interfaces/IDeviceInfo.h diff -uprN a/jsonrpc/DeviceInfo.json b/jsonrpc/DeviceInfo.json --- a/jsonrpc/DeviceInfo.json 2024-10-24 04:46:28.447820629 +0300 -+++ b/jsonrpc/DeviceInfo.json 2024-10-23 19:59:21.857033373 +0300 ++++ b/jsonrpc/DeviceInfo.json 2024-10-24 05:09:34.591254270 +0300 @@ -184,6 +184,16 @@ "description": "Device model number or SKU", "example": "PX051AEI" @@ -29,10 +29,16 @@ diff -uprN a/jsonrpc/DeviceInfo.json b/jsonrpc/DeviceInfo.json "yocto": { "type": "string", "enum": [ -@@ -596,6 +606,27 @@ - } - ] - }, +@@ -590,6 +600,27 @@ + ] + }, + "errors": [ ++ { ++ "description": "General error", ++ "$ref": "#/common/errors/general" ++ } ++ ] ++ }, + "socname": { + "summary": "Device type", + "readonly": true, @@ -48,12 +54,6 @@ diff -uprN a/jsonrpc/DeviceInfo.json b/jsonrpc/DeviceInfo.json + ] + }, + "errors": [ -+ { -+ "description": "General error", -+ "$ref": "#/common/errors/general" -+ } -+ ] -+ }, - "distributorid": { - "summary": "Partner ID or distributor ID for device", - "readonly": true, + { + "description": "General error", + "$ref": "#/common/errors/general" From 07e4a4dc6821805bc47628199cdc3757fa9d1280 Mon Sep 17 00:00:00 2001 From: Sergey Borushevsky Date: Thu, 24 Oct 2024 05:41:01 +0300 Subject: [PATCH 4/6] Interfaces patch is not needed. Fixed typo. --- DeviceInfo/DeviceInfo.json | 22 +++++++++---------- .../patches/0002-RDK-53879-Add-socname.patch | 11 ---------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/DeviceInfo/DeviceInfo.json b/DeviceInfo/DeviceInfo.json index 08ae82675d..fc218f2db0 100644 --- a/DeviceInfo/DeviceInfo.json +++ b/DeviceInfo/DeviceInfo.json @@ -127,6 +127,16 @@ "description": "Device type", "example": "IpStb" }, + "socname": { + "type": "string", + "enum": [ + "Amlogic", + "Realtek", + "Broadcom" + ], + "description": "SOC Name", + "example": "Realtek" + }, "make": { "type": "string", "enum": [ @@ -181,16 +191,6 @@ "description": "Device model number or SKU", "example": "PX051AEI" }, - "socname": { - "type": "string", - "enum": [ - "Amlogic", - "Realtek", - "Broadcom" - ], - "description": "SOC Name", - "example": "Realtek" - }, "yocto": { "type": "string", "enum": [ @@ -584,7 +584,7 @@ ] }, "socname": { - "summary": "Device type", + "summary": "SOC Name", "readonly": true, "params": { "type": "object", diff --git a/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch b/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch index d7afc1f387..02e5ff55ec 100644 --- a/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch +++ b/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch @@ -1,14 +1,3 @@ -diff -uprN a/interfaces/IDeviceInfo.h b/interfaces/IDeviceInfo.h ---- a/interfaces/IDeviceInfo.h 2024-10-24 04:46:28.446820588 +0300 -+++ b/interfaces/IDeviceInfo.h 2024-10-23 17:48:50.583263517 +0300 -@@ -17,6 +17,7 @@ namespace Exchange { - virtual uint32_t Make(string& make /* @out */) const = 0; - virtual uint32_t Model(string& model /* @out */) const = 0; - virtual uint32_t DeviceType(string& deviceType /* @out */) const = 0; -+ virtual uint32_t SocName(string& socName /* @out */) const = 0; - virtual uint32_t DistributorId(string& distributorId /* @out */) const = 0; - }; - diff -uprN a/jsonrpc/DeviceInfo.json b/jsonrpc/DeviceInfo.json --- a/jsonrpc/DeviceInfo.json 2024-10-24 04:46:28.447820629 +0300 +++ b/jsonrpc/DeviceInfo.json 2024-10-24 05:09:34.591254270 +0300 From aa548d7ff0b904ae2c3238f348907865d1de901a Mon Sep 17 00:00:00 2001 From: Sergey Borushevsky Date: Thu, 24 Oct 2024 06:11:52 +0300 Subject: [PATCH 5/6] L1 tests patch fix. --- .../patches/0002-RDK-53879-Add-socname.patch | 47 ++++++++++++------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch b/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch index 02e5ff55ec..6b88450eaa 100644 --- a/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch +++ b/Tests/L1Tests/patches/0002-RDK-53879-Add-socname.patch @@ -1,7 +1,20 @@ -diff -uprN a/jsonrpc/DeviceInfo.json b/jsonrpc/DeviceInfo.json ---- a/jsonrpc/DeviceInfo.json 2024-10-24 04:46:28.447820629 +0300 -+++ b/jsonrpc/DeviceInfo.json 2024-10-24 05:09:34.591254270 +0300 -@@ -184,6 +184,16 @@ +diff --git a/interfaces/IDeviceInfo2.h b/interfaces/IDeviceInfo2.h +index f87914d..10397a9 100644 +--- a/interfaces/IDeviceInfo2.h ++++ b/interfaces/IDeviceInfo2.h +@@ -17,6 +17,7 @@ namespace Exchange { + virtual uint32_t Make(string& make /* @out */) const = 0; + virtual uint32_t Model(string& model /* @out */) const = 0; + virtual uint32_t DeviceType(string& deviceType /* @out */) const = 0; ++ virtual uint32_t SocName(string& socName /* @out */) const = 0; + virtual uint32_t DistributorId(string& distributorId /* @out */) const = 0; + }; + +diff --git a/jsonrpc/DeviceInfo.json b/jsonrpc/DeviceInfo.json +index ed32927..9823b86 100644 +--- a/jsonrpc/DeviceInfo.json ++++ b/jsonrpc/DeviceInfo.json +@@ -196,6 +196,16 @@ "description": "Device model number or SKU", "example": "PX051AEI" }, @@ -18,16 +31,10 @@ diff -uprN a/jsonrpc/DeviceInfo.json b/jsonrpc/DeviceInfo.json "yocto": { "type": "string", "enum": [ -@@ -590,6 +600,27 @@ - ] - }, - "errors": [ -+ { -+ "description": "General error", -+ "$ref": "#/common/errors/general" -+ } -+ ] -+ }, +@@ -609,6 +619,27 @@ + } + ] + }, + "socname": { + "summary": "Device type", + "readonly": true, @@ -43,6 +50,12 @@ diff -uprN a/jsonrpc/DeviceInfo.json b/jsonrpc/DeviceInfo.json + ] + }, + "errors": [ - { - "description": "General error", - "$ref": "#/common/errors/general" ++ { ++ "description": "General error", ++ "$ref": "#/common/errors/general" ++ } ++ ] ++ }, + "supportedaudioports": { + "summary": "Audio ports supported on the device (all ports that are physically present)", + "readonly": true, From f4b56331d5c3235ee5be8a954e47ba0db9557adc Mon Sep 17 00:00:00 2001 From: Sergey Borushevsky Date: Mon, 28 Oct 2024 18:55:18 +0200 Subject: [PATCH 6/6] Updated DeviceInfo API doc. --- docs/api/DeviceInfoPlugin.md | 214 ++++++++++++++++++++--------------- 1 file changed, 125 insertions(+), 89 deletions(-) diff --git a/docs/api/DeviceInfoPlugin.md b/docs/api/DeviceInfoPlugin.md index f172570568..ec7fcbf832 100644 --- a/docs/api/DeviceInfoPlugin.md +++ b/docs/api/DeviceInfoPlugin.md @@ -1,62 +1,49 @@ - -# DeviceInfo Plugin + +# Device Info API -**Version: [1.0.15](https://github.com/rdkcentral/rdkservices/blob/main/DeviceInfo/CHANGELOG.md)** +**Version: [1.0.0]()** -A DeviceInfo plugin for Thunder framework. +A DeviceInfo interface for Thunder framework. + +(Defined by [DeviceInfo.json](https://github.com/rdkcentral/ThunderInterfaces/blob/master/interfaces/DeviceInfo.json)) ### 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) +- [Methods](#head.Methods) +- [Properties](#head.Properties) - + # Abbreviation, Acronyms and Terms [[Refer to this link](userguide/aat.md)] - + # Description -The `DeviceInfo` plugin allows retrieving of various device-related information. - -The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#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* | -| autostart | boolean | Determines if the plugin shall be started automatically along with the framework | +DeviceInfo JSON-RPC interface. - + # Methods -The following methods are provided by the DeviceInfo plugin: +The following methods are provided by the DeviceInfo interface: DeviceInfo 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 | +| [supportedresolutions](#method.supportedresolutions) | Supported resolutions on the selected video display port | +| [defaultresolution](#method.defaultresolution) | Default resolution on the selected video display port | +| [supportedhdcp](#method.supportedhdcp) | Supported HDCP version on the selected video display port | +| [audiocapabilities](#method.audiocapabilities) | Audio capabilities for the specified audio port | +| [ms12capabilities](#method.ms12capabilities) | MS12 audio capabilities for the specified audio port | +| [supportedms12audioprofiles](#method.supportedms12audioprofiles) | Supported MS12 audio profiles for the specified audio port | - -## *supportedresolutions* + +## *supportedresolutions [method](#head.Methods)* Supported resolutions on the selected video display port. @@ -114,8 +101,8 @@ No Events } ``` - -## *defaultresolution* + +## *defaultresolution [method](#head.Methods)* Default resolution on the selected video display port. @@ -170,8 +157,8 @@ No Events } ``` - -## *supportedhdcp* + +## *supportedhdcp [method](#head.Methods)* Supported HDCP version on the selected video display port. @@ -226,8 +213,8 @@ No Events } ``` - -## *audiocapabilities* + +## *audiocapabilities [method](#head.Methods)* Audio capabilities for the specified audio port. @@ -285,8 +272,8 @@ No Events } ``` - -## *ms12capabilities* + +## *ms12capabilities [method](#head.Methods)* MS12 audio capabilities for the specified audio port. @@ -344,8 +331,8 @@ No Events } ``` - -## *supportedms12audioprofiles* + +## *supportedms12audioprofiles [method](#head.Methods)* Supported MS12 audio profiles for the specified audio port. @@ -403,32 +390,33 @@ No Events } ``` - + # Properties -The following properties are provided by the DeviceInfo plugin: +The following properties are provided by the DeviceInfo interface: 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 | -| [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 | -| [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* +| [systeminfo](#property.systeminfo) RO | System general information | +| [addresses](#property.addresses) RO | Network interface addresses | +| [socketinfo](#property.socketinfo) RO | Socket information | +| [firmwareversion](#property.firmwareversion) RO | Versions maintained in version | +| [serialnumber](#property.serialnumber) RO | Serial number set by manufacturer | +| [modelid](#property.modelid) RO | Device model number or SKU | +| [make](#property.make) RO | Device manufacturer | +| [modelname](#property.modelname) RO | Friendly device model name | +| [devicetype](#property.devicetype) RO | Device type | +| [socname](#property.socname) RO | SOC Name | +| [distributorid](#property.distributorid) RO | Partner ID or distributor ID for device | +| [supportedaudioports](#property.supportedaudioports) RO | Audio ports supported on the device (all ports that are physically present) | +| [supportedvideodisplays](#property.supportedvideodisplays) RO | Video ports supported on the device (all ports that are physically present) | +| [hostedid](#property.hostedid) RO | EDID of the host | + + + +## *systeminfo [property](#head.Properties)* Provides access to the system general information. @@ -496,8 +484,8 @@ No Events } ``` - -## *addresses* + +## *addresses [property](#head.Properties)* Provides access to the network interface addresses. @@ -548,8 +536,8 @@ No Events } ``` - -## *socketinfo* + +## *socketinfo [property](#head.Properties)* Provides access to the socket information. @@ -590,8 +578,8 @@ No Events } ``` - -## *firmwareversion* + +## *firmwareversion [property](#head.Properties)* Provides access to the versions maintained in version.txt. @@ -644,8 +632,8 @@ No Events } ``` - -## *serialnumber* + +## *serialnumber [property](#head.Properties)* Provides access to the serial number set by manufacturer. @@ -692,8 +680,8 @@ No Events } ``` - -## *modelid* + +## *modelid [property](#head.Properties)* Provides access to the device model number or SKU. @@ -740,8 +728,8 @@ No Events } ``` - -## *make* + +## *make [property](#head.Properties)* Provides access to the device manufacturer. @@ -788,8 +776,8 @@ No Events } ``` - -## *modelname* + +## *modelname [property](#head.Properties)* Provides access to the friendly device model name. @@ -836,8 +824,8 @@ No Events } ``` - -## *devicetype* + +## *devicetype [property](#head.Properties)* Provides access to the device type. @@ -884,8 +872,56 @@ No Events } ``` - -## *distributorid* + +## *socname [property](#head.Properties)* + +Provides access to the SOC Name. + +> This property is **read-only**. + +### Events + +No Events + +### Value + +| Name | Type | Description | +| :-------- | :-------- | :-------- | +| (property) | object | SOC Name | +| (property).socname | string | SOC Name (must be one of the following: *Amlogic*, *Realtek*, *Broadcom*) | + +### 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": "Realtek" + } +} +``` + + +## *distributorid [property](#head.Properties)* Provides access to the partner ID or distributor ID for device. @@ -932,8 +968,8 @@ No Events } ``` - -## *supportedaudioports* + +## *supportedaudioports [property](#head.Properties)* Provides access to the audio ports supported on the device (all ports that are physically present). @@ -983,8 +1019,8 @@ No Events } ``` - -## *supportedvideodisplays* + +## *supportedvideodisplays [property](#head.Properties)* Provides access to the video ports supported on the device (all ports that are physically present). @@ -1034,8 +1070,8 @@ No Events } ``` - -## *hostedid* + +## *hostedid [property](#head.Properties)* Provides access to the EDID of the host.