Repository navigation
RDKDEV-1793: Add Firebolt-cpp-client Documentation - #120
Open
gourivarma3 wants to merge 1 commit into
Open
gourivarma3 wants to merge 1 commit into
gourivarma3 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Several API inventories, event names, lifecycle details, and build-option descriptions do not match the implementation.
6 open findings
Component inventory omits SpeechSynthesisImpl and VideoOutputImpl · New Device module summary omits several supported APIs · New json_types headers do not map one-to-one to domains · New TextToSpeech topic names do not match registered strings · New Destructor does not disconnect the transport · New Not all API methods return Result<T> · New
What changed in this PR
Adds component documentation describing the client architecture, APIs, lifecycle, interactions, configuration, and build options.
Changes:
- Documents architecture and runtime flows with Mermaid diagrams.
- Catalogs modules, events, dependencies, and configuration.
- Summarizes build-time CMake options.
| File | Description |
|---|---|
docs/README.md |
Adds comprehensive component documentation. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+207
to
+209
| ## Internal Modules | ||
|
|
||
| | Module / Class | Description | Key Files | |
| | `AccessibilityImpl` | Implements `IAccessibility`. Exposes audio description, closed-caption settings, high-contrast UI, and voice-guidance settings, with subscription support for each property. | `src/accessibility_impl.cpp`, `src/accessibility_impl.h` | | ||
| | `ActionsImpl` | Implements `IActions`. Provides `intent()` to retrieve the current app intent, `subscribeOnIntent()` for live intent change notifications, and `start()` to dispatch a new intent to a handler app. Auto-generated from the OpenRPC spec. | `src/actions_impl.cpp`, `src/actions_impl.h` | | ||
| | `AdvertisingImpl` | Implements `IAdvertising`. Provides `advertisingId()` returning an `Ifa` struct containing the advertising identifier, type, and limit-ad-tracking flag. | `src/advertising_impl.cpp`, `src/advertising_impl.h` | | ||
| | `DeviceImpl` | Implements `IDevice`. Provides chipset ID, device class (STB/OTT/TV), HDR format capabilities, uptime, UID, active-state time, and Dolby Atmos experience availability, with subscriptions for HDR and Dolby Atmos changes. | `src/device_impl.cpp`, `src/device_impl.h` | |
| | `PresentationImpl` | Implements `IPresentation`. Queries whether the application is currently focused (receiving key presses) and subscribes to focus change events. | `src/presentation_impl.cpp`, `src/presentation_impl.h` | | ||
| | `StatsImpl` | Implements `IStats`. Returns container memory statistics including user memory and GPU memory usage and limits via `memoryUsage()`. | `src/stats_impl.cpp`, `src/stats_impl.h` | | ||
| | `TextToSpeechImpl` | Implements `ITextToSpeech`. Provides TTS control: `listVoices()`, `speak()`, `pause()`, `resume()`, `cancel()`, `getSpeechState()`, and event subscriptions for speech lifecycle (willSpeak, speechStart, speechPause, speechResume, speechComplete, speechInterrupted, networkError, playbackError). | `src/texttospeech_impl.cpp`, `src/texttospeech_impl.h` | | ||
| | JSON type adapters | Per-domain structs under `json_types/` that bridge `nlohmann::json` deserialization to typed C++ domain structs. Each domain has a corresponding header (e.g., `json_types/device.h`, `json_types/lifecycle.h`). | `src/json_types/*.h` | |
Comment on lines
+261
to
+268
| | TTS will speak | `TextToSpeech.onWillspeak` | TTS engine is about to begin synthesizing speech | `ITextToSpeech` | | ||
| | TTS speech start | `TextToSpeech.onSpeechstart` | TTS audio playback starts | `ITextToSpeech` | | ||
| | TTS speech pause | `TextToSpeech.onSpeechpause` | TTS audio playback is paused | `ITextToSpeech` | | ||
| | TTS speech resume | `TextToSpeech.onSpeechresume` | TTS audio playback resumes | `ITextToSpeech` | | ||
| | TTS speech complete | `TextToSpeech.onSpeechcomplete` | TTS utterance finishes successfully | `ITextToSpeech` | | ||
| | TTS speech interrupted | `TextToSpeech.onSpeechinterrupted` | TTS utterance is interrupted | `ITextToSpeech` | | ||
| | TTS network error | `TextToSpeech.onNetworkerror` | TTS encounters a network error during synthesis | `ITextToSpeech` | | ||
| | TTS playback error | `TextToSpeech.onPlaybackerror` | TTS encounters a playback error during output | `ITextToSpeech` | |
Comment on lines
+309
to
+310
| - **State / Lifecycle Management**: The `FireboltAccessorImpl` destructor releases all active subscriptions before delegating disconnect to the transport. | ||
| - Connection management: `src/firebolt.cpp` |
|
|
||
| - **JSON Serialization Strategy**: Request parameters are serialized per domain in `*_impl.cpp` files. Optional parameters are included only when their `std::optional` value is present. Response deserialization relies on templated JSON adapter structs in `src/json_types/`. | ||
|
|
||
| - **Error Handling Strategy**: All API methods return a `Result<T>` type. Callers check the result for success or error before accessing the value. |
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.

RDKDEV-1793
Reason for Change: To add Component Documentation for firebolt-cpp-client.
Fix: Added the README documentation
Test Procedure: None
I have read the CLA Document and I hereby sign the CLA
Signed-off-by: gourivarma3 gouri_varma@comcast.com