RDKDEV-1423 Add ThunderClientLibraries Documentation#338
Open
gourivarma3 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
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.mdwith 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.
|
|
||
| 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. |
| - **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 on lines
+103
to
+106
| OA["OpenCDM\n(IAccessorOCDM)"] | ||
| SAL["SecurityAgent\n(IAuthenticate)"] | ||
| CGL["Cryptography\n(ICryptography)"] | ||
| PPL["ProvisionProxy\n(IProvisioning)"] |
| Lib->>RPC: Create CommunicatorClient + InvokeServerType | ||
| RPC->>Thunder: Open connection to UNIX domain socket | ||
| Thunder-->>RPC: Connection open | ||
| Lib->>Thunder: client->Open<IAuthenticate / IProvisioning>(callsign) |
| participant Thunder as WPEFramework / DisplayInfo Plugin | ||
| participant HDR as IHDRProperties | ||
|
|
||
| App->>Lib: displayinfo_hdr_setting(instance, &hdr_out) |
| | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | | ||
| | `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) | |
| | `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`). | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added component documentation for thunderclientlibraries
I have read the CLA Document and I hereby sign the CLA