Unified CAS Management Service#
Version: 1.0
Status: ⚫⚪⚪
UnifiedCASManagement interface for Thunder framework.
Table of Contents#
Introduction#
Scope#
This document describes purpose and functionality of the UnifiedCASManagement interface. It includes detailed specification about its methods provided and notifications sent.
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#
Simple service to allow the management of OCDM CAS.
Methods#
The following methods are provided by the UnifiedCASManagement interface:
UnifiedCASManagement interface methods:
| Method | Description |
|---|---|
| manage | Manage a well-known CAS |
| unmanage | Destroy a management session |
| send | Sends data to the remote CAS |
manage method#
Manage a well-known CAS.
Parameters#
| Name | Type | Description |
|---|---|---|
| params | object | Specifies how to manage a CAS |
| params?.mediaurl | string | (optional) The URL to tune to can be tune://, ocap:// http:// https:// |
| params?.mode | string | (optional) The use of the tune request (must be one of the following: MODE_NONE, MODE_LIVE, MODE_RECORD, MODE_PLAYBACK) |
| params?.manage | string | (optional) The type of CAS management to attach to the tune (must be one of the following: MANAGE_NONE, MANAGE_FULL, MANAGE_NO_PSI, MANAGE_NO_TUNER) |
| params?.casinitdata | string | (optional) CAS specific initdata for the selected media |
| params.casocdmid | string | The well-known OCDM ID of the CAS to use |
Result#
| Name | Type | Description |
|---|---|---|
| result | object | Generic Result Object |
| result.success | boolean | Returning whether this method failed or succeed |
| result?.failurereason | number | (optional) Reason why it's failed |
Example#
Request#
{
"jsonrpc": "2.0",
"id": 1234567890,
"method": "UnifiedCASManagement.1.manage",
"params": {
"mediaurl": "tune://tuner?frequency=175000000&modulation=16&pgmno=12",
"mode": "MODE_LIVE",
"manage": "MANAGE_NONE",
"casinitdata": "<base64 data>",
"casocdmid": ""
}
}
Response#
{
"jsonrpc": "2.0",
"id": 1234567890,
"result": {
"success": true,
"failurereason": 0
}
}
unmanage method#
Destroy a management session.
Parameters#
| Name | Type | Description |
|---|---|---|
| params | string | The well-known OCDM ID of the CAS to use |
Result#
| Name | Type | Description |
|---|---|---|
| result | object | Generic Result Object |
| result.success | boolean | Returning whether this method failed or succeed |
| result?.failurereason | number | (optional) Reason why it's failed |
Example#
Request#
{
"jsonrpc": "2.0",
"id": 1234567890,
"method": "UnifiedCASManagement.1.unmanage",
"params": ""
}
Response#
{
"jsonrpc": "2.0",
"id": 1234567890,
"result": {
"success": true,
"failurereason": 0
}
}
send method#
Sends data to the remote CAS.
Parameters#
| Name | Type | Description |
|---|---|---|
| params | object | Object transfer data to/from the remote CAS. The actual payload is Client/CAS specific |
| params.payload | string | Data to transfer. Can be base64 coded if required |
| params?.source | string | (optional) Origin of the data. (must be one of the following: PUBLIC, PRIVATE) |
Result#
| Name | Type | Description |
|---|---|---|
| result | object | Generic Result Object |
| result.success | boolean | Returning whether this method failed or succeed |
| result?.failurereason | number | (optional) Reason why it's failed |
Example#
Request#
{
"jsonrpc": "2.0",
"id": 1234567890,
"method": "UnifiedCASManagement.1.send",
"params": {
"payload": "",
"source": "PUBLIC"
}
}
Response#
{
"jsonrpc": "2.0",
"id": 1234567890,
"result": {
"success": true,
"failurereason": 0
}
}
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 UnifiedCASManagement interface:
UnifiedCASManagement interface events:
| Event | Description |
|---|---|
| data | Sent when the CAS needs to send data to the caller |
data event#
Sent when the CAS needs to send data to the caller.
Description#
Register for this event to be sent private data from the CAS
Parameters#
| Name | Type | Description |
|---|---|---|
| params | object | Object transfer data to/from the remote CAS. The actual payload is Client/CAS specific |
| params.payload | string | Data to transfer. Can be base64 coded if required |
| params?.source | string | (optional) Origin of the data. (must be one of the following: PUBLIC, PRIVATE) |
Example#
{
"jsonrpc": "2.0",
"method": "client.events.1.data",
"params": {
"payload": "",
"source": "PUBLIC"
}
}