Skip to content

RDKDEV-1423 Add ThunderClientLibraries Documentation#338

Open
gourivarma3 wants to merge 1 commit into
rdkcentral:masterfrom
gourivarma3:feature/RDKDEV-1423
Open

RDKDEV-1423 Add ThunderClientLibraries Documentation#338
gourivarma3 wants to merge 1 commit into
rdkcentral:masterfrom
gourivarma3:feature/RDKDEV-1423

Conversation

@gourivarma3

Copy link
Copy Markdown

Added component documentation for thunderclientlibraries
I have read the CLA Document and I hereby sign the CLA

Copilot AI review requested due to automatic review settings June 8, 2026 10:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a comprehensive component-level documentation page for ThunderClientLibraries, describing the role of the client libraries, their design patterns (COM-RPC usage, interface acquisition, lifecycle), and integration expectations for consumers.

Changes:

  • Introduces a new docs/README.md with architecture/design narrative and Mermaid diagrams.
  • Documents threading model, state/lifecycle flows, and example call flows.
  • Adds module interaction matrices and configuration parameters.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/README.md

ThunderClientLibraries acts as the consumer-side glue between user-space processes and Thunder-hosted services. Rather than each consuming process implementing its own IPC logic, each library encapsulates the connection setup, interface acquisition, and lifecycle management required to reach a specific Thunder plugin. The libraries are kept independent of one another; a consuming process links only the libraries it needs.

At the device level, these libraries serve processes that sit outside the Thunder plugin host but require access to capabilities that are managed centrally inside it. Examples include media pipeline processes that require DRM session creation through OpenCDM, web runtimes that need display or device capability metadata, and Bluetooth audio pipelines that need to stream audio frames to or from a paired device. All inter-process calls go over UNIX domain sockets using Thunder's COM-RPC transport, providing lightweight and low-latency IPC without requiring TCP/IP.
Comment thread docs/README.md
- **Build Dependencies**: `entservices-apis` (provides Thunder Exchange interface headers), `wpeframework-tools-native` (code generation tools), `gstreamer1.0` (required when `CDMI=ON` and the GStreamer adapter is selected).
- **Plugin Dependencies**: Each library requires the corresponding Thunder plugin to be active at runtime. SecurityAgent requires the SecurityAgent plugin; OpenCDM requires the OpenCDMImplementation plugin; DeviceInfo requires the DeviceInfo plugin; DisplayInfo requires the DisplayInfo plugin; PlayerInfo requires the PlayerInfo plugin; Cryptography requires the Svalbard plugin; ProvisionProxy requires the Provisioning plugin; BluetoothAudio libraries require the BluetoothAudio plugin.
- **Systemd Services**: The corresponding Thunder plugins must be running when a client library attempts a connection. Each library establishes its connection on first use, and libraries using `RPC::SmartInterfaceType` reconnect automatically once the plugin becomes available.
- **Configuration Files**: Socket endpoint paths are read from environment variables (`SECURITYAGENT_PATH`, `OPEN_CDM_SERVER`, `PROVISION_PATH`); built-in defaults are used if the variables are unset.
Comment thread docs/README.md
Comment on lines +103 to +106
OA["OpenCDM\n(IAccessorOCDM)"]
SAL["SecurityAgent\n(IAuthenticate)"]
CGL["Cryptography\n(ICryptography)"]
PPL["ProvisionProxy\n(IProvisioning)"]
Comment thread docs/README.md
Lib->>RPC: Create CommunicatorClient + InvokeServerType
RPC->>Thunder: Open connection to UNIX domain socket
Thunder-->>RPC: Connection open
Lib->>Thunder: client->Open<IAuthenticate / IProvisioning>(callsign)
Comment thread docs/README.md
participant Thunder as WPEFramework / DisplayInfo Plugin
participant HDR as IHDRProperties

App->>Lib: displayinfo_hdr_setting(instance, &hdr_out)
Comment thread docs/README.md
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| `OpenCDMAccessor` | Singleton that manages the COM-RPC connection to the OpenCDMImplementation plugin. Holds session key maps and provides the `IAccessorOCDM` interface proxy. Receives external data: DRM system metadata and key status updates from the plugin. | `open_cdm_impl.h`, `open_cdm_impl.cpp` |
| `OpenCDMSession` | Represents a single DRM session. Holds the session ID, the remote `Exchange::ISession` interface, and decrypt context. Created via `OpenCDMAccessor`. Receives external data: license responses and key status changes from the plugin. | `open_cdm_impl.h`, `open_cdm_impl.cpp` |
| `SecurityAgent ipclink` | Per-call COM-RPC client that connects to the SecurityAgent plugin, calls `IAuthenticate::CreateToken()`, and releases the connection. | `ipclink.cpp` (securityagent) |
Comment thread docs/README.md
| `SECURITYAGENT_PATH` | env string | `/tmp/SecurityAgent/token` | UNIX domain socket path used to connect to the SecurityAgent plugin. |
| `OPEN_CDM_SERVER` | env string | `/tmp/ocdm` | UNIX domain socket path used to connect to the OpenCDMImplementation plugin. |
| `PROVISION_PATH` | env string | `/tmp/provision` | UNIX domain socket path used to connect to the Provisioning plugin. |
| `BLUETOOTHAUDIOSINK` connector | compile string | `/tmp/bluetoothaudiosink` | Shared buffer name for audio frame transfer to the BluetoothAudio sink (set in `BluetoothAudioSink.cpp` as `#define CONNECTOR`). |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants