ConnectionProperties API
Version: 1.0.0
Status:
ConnectionProperties interface for Thunder framework.
(Defined with IConnectionProperties in IDisplayInfo.h)
Table of Contents
Introduction
Scope
This document describes purpose and functionality of the ConnectionProperties interface (version 1.0.0). It includes detailed specification about its methods and properties as well as sent notifications.
Case Sensitivity
All identifiers of the interfaces described in this document are case-sensitive. Thus, unless stated otherwise, all keywords, entities, properties, relations and actions should be treated as such.
Acronyms, Abbreviations and Terms
The table below provides and overview of acronyms used in this document and their definitions.
Acronym | Description |
---|---|
API | Application Programming Interface |
HTTP | Hypertext Transfer Protocol |
JSON | JavaScript Object Notation; a data interchange format |
JSON-RPC | A remote procedure call protocol encoded in JSON |
The table below provides and overview of terms and abbreviations used in this document and their definitions.
Term | Description |
---|---|
callsign | The name given to an instance of a plugin. One plugin can be instantiated multiple times, but each instance the instance name, callsign, must be unique. |
References
Ref ID | Description |
---|---|
HTTP | HTTP specification |
JSON-RPC | JSON-RPC 2.0 specification |
JSON | JSON specification |
Thunder | Thunder API Reference |
Description
ConnectionProperties JSON-RPC interface.
This interface uses legacy
lowercase
naming convention. With the next major release the naming convention will change tocamelCase
.
Methods
The following methods are provided by the ConnectionProperties interface:
ConnectionProperties interface methods:
Method | Description |
---|---|
edid | TV's Extended Display Identification Data |
widthincentimeters | Horizontal size in centimeters |
heightincentimeters | Vertical size in centimeters |
edid method
TV's Extended Display Identification Data.
Parameters
Name | Type | M/O | Description |
---|---|---|---|
params | object | mandatory | ... |
params.length | integer | mandatory | Length of EDID byte string |
Result
Name | Type | M/O | Description |
---|---|---|---|
result | object | mandatory | ... |
result.length | integer | mandatory | Length of EDID byte string |
result.data | string (base64) | mandatory | EDID byte string |
Example
Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.edid",
"params": {
"length": 0
}
}
Response
{
"jsonrpc": "2.0",
"id": 42,
"result": {
"length": 0,
"data": "..."
}
}
widthincentimeters method
Horizontal size in centimeters.
Parameters
This method takes no parameters.
Result
Name | Type | M/O | Description |
---|---|---|---|
result | integer | mandatory | Width in cm |
Example
Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.widthincentimeters"
}
Response
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
heightincentimeters method
Vertical size in centimeters.
Parameters
This method takes no parameters.
Result
Name | Type | M/O | Description |
---|---|---|---|
result | integer | mandatory | ... |
Example
Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.heightincentimeters"
}
Response
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
Properties
The following properties are provided by the ConnectionProperties interface:
ConnectionProperties interface properties:
Property | R/W | Description |
---|---|---|
isaudiopassthrough | read-only | Current audio passthrough status on HDMI |
connected | read-only | Current HDMI connection status |
width | read-only | Horizontal resolution of TV |
height | read-only | Vertical resolution of TV |
verticalfreq | read-only | Vertical Frequency |
hdcpprotection | read/write | HDCP protocol used for transmission |
portname | read-only | Video output port on the STB used for connection to TV |
isaudiopassthrough property
Provides access to the current audio passthrough status on HDMI.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | boolean | mandatory | Enabled/Disabled |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.isaudiopassthrough"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": false
}
connected property
Provides access to the current HDMI connection status.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | boolean | mandatory | Connected/Disconnected |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.connected"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": false
}
width property
Provides access to the horizontal resolution of TV.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | integer | mandatory | Width of TV in pixels |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.width"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
height property
Provides access to the vertical resolution of TV.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | integer | mandatory | Height of TV in pixels |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.height"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
verticalfreq property
Provides access to the vertical Frequency.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | integer | mandatory | Vertical freq |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.verticalfreq"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
hdcpprotection property
Provides access to the HDCP protocol used for transmission.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | string | mandatory | HDCP protocol used for transmission (must be one of the following: Hdcp1x, Hdcp2x, HdcpAuto, HdcpUnencrypted) |
Name | Type | M/O | Description |
---|---|---|---|
(property) | string | mandatory | Protocol (must be one of the following: Hdcp1x, Hdcp2x, HdcpAuto, HdcpUnencrypted) |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.hdcpprotection"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": "Hdcp1x"
}
Set Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.hdcpprotection",
"params": "Hdcp1x"
}
Set Response
{
"jsonrpc": "2.0",
"id": 42,
"result": "null"
}
portname property
Provides access to the video output port on the STB used for connection to TV.
This property is read-only.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | string | mandatory | Video output port name |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.portname"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": "..."
}
Notifications
Notifications are autonomous events triggered by the internals of the implementation and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.
The following events are provided by the ConnectionProperties interface:
ConnectionProperties interface events:
Notification | Description |
---|---|
updated | Signal changes on the display update |
updated notification
Signal changes on the display update..
Notification Parameters
Name | Type | M/O | Description |
---|---|---|---|
params | object | mandatory | ... |
params.event | string | mandatory | Source of this event (must be one of the following: HdcpChange, HdmiChange, PostResolutionChange, PreResolutionChange) |
Example
Registration
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.register",
"params": {
"event": "updated",
"id": "myid"
}
}
Notification
{
"jsonrpc": "2.0",
"method": "myid.updated",
"params": {
"event": "PostResolutionChange"
}
}
The client ID parameter is passed within the notification designator, i.e.
<client-id>.updated
.