Topic/rdkemw 16330 1#194
Conversation
Reason for Chanage: RDK-E uses a boolean to report whether Networked Standby Mode is enabled, rather than a JsonObject Test Procedure: Confirm that Control Manager enters NSM when it should Priority: P0 Signed-off-by: Jason Thomson <jason_thomson@comcast.com>
There was a problem hiding this comment.
Pull request overview
Updates the Thunder PowerManager integration to consume typed JSON-RPC results (bool/string) for specific calls, aligning Control Manager behavior with NSM (network standby mode) being a boolean.
Changes:
- Add typed helper APIs to
ctrlm_thunder_plugin_tfor invoking Thunder methods that returnboolorstring. - Update PowerManager Thunder plugin calls to use the new typed helpers for
getNetworkStandbyModeandgetLastWakeupReason. - Update changelog and fix minor comment grammar.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/thunder/ctrlm_thunder_plugin.h |
Adds new typed invoke helpers and adjusts related API comments. |
src/thunder/ctrlm_thunder_plugin.cpp |
Implements call_plugin_boolean and call_plugin_string Thunder invoke wrappers. |
src/thunder/ctrlm_thunder_plugin_powermanager.cpp |
Switches NSM and wakeup-reason retrieval to the typed helpers. |
CHANGELOG.md |
Adds release entry for 1.1.11p1 referencing the NSM bool update. |
Comments suppressed due to low confidence (1)
src/thunder/ctrlm_thunder_plugin.h:153
- The call_controller() Doxygen has two
@paramentries named "params"; the second one appears to describe the response object. This should be@paramresponse (and keep "params" for the request parameters) to prevent incorrect generated docs.
/**
* This function is used to call a Thunder Controller method.
* @param method The method in which the user wants to call.
* @param params The WPEFramework JsonObject containing the parameters for the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash)
* @param params The WPEFramework JsonObject containing the response from the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash)
* @return True if the call succeeded, otherwise False.
*/
bool call_controller(std::string method, void *params, void *response);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -115,7 +115,7 @@ class ctrlm_thunder_plugin_t { | |||
| bool property_get(std::string property, void *response, unsigned int retries = 0); | |||
There was a problem hiding this comment.
The Doxygen for property_get() is describing a "method" parameter, but the function signature takes a "property" string. This makes the API docs misleading; update the @param name/description to match the actual "property" argument (and what it represents).
| /** | ||
| * This function is used to call a Thunder Plugin method. | ||
| * @param method The method in which the user wants to call. | ||
| * @param params The WPEFramework JsonObject containing the parameters for the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) | ||
| * @param response The WPEFramework JsonObject containing the response from the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) | ||
| * @return True if the call succeeded, otherwise False. | ||
| */ | ||
| bool call_plugin_string(std::string method, void *params, std::string *response); | ||
|
|
There was a problem hiding this comment.
The documentation for call_plugin_string() says the response is a WPEFramework JsonObject, but the function actually returns a std::string via the response pointer. Update the @param response description to avoid confusing callers.
Address copilot comments
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * @param method The method in which the user wants to call. | ||
| * This function is used to get a Thunder Plugin property. | ||
| * @param property The property the user wants to get | ||
| * @param params The WPEFramework JsonObject containing the parameters for the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) |
There was a problem hiding this comment.
The documentation for property_get() lists an @param "params", but the function signature only takes (property, response, retries). Update the comment to remove/rename that parameter so the header docs match the API.
| * @param params The WPEFramework JsonObject containing the parameters for the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) |
| * This function is used to call a Thunder Plugin method. | ||
| * @param method The method in which the user wants to call. | ||
| * @param params The WPEFramework JsonObject containing the parameters for the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash) | ||
| * @param response A pointer a string which will be assigned |
There was a problem hiding this comment.
call_plugin_string() Doxygen comment is incomplete/grammatically incorrect ("A pointer a string which will be assigned"). Please clarify what the string represents (e.g., method result) and fix the wording so the API contract is unambiguous.
| * @param response A pointer a string which will be assigned | |
| * @param response A pointer to a string that will be assigned the method response. |
Fix error log
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/thunder/ctrlm_thunder_plugin.h:149
- The call_controller() docblock lists "@param params" twice (the second one is describing the response). This makes the generated documentation misleading. Rename the second tag to "@param response" (or equivalent) to match the function signature.
/**
* This function is used to call a Thunder Controller method.
* @param method The method in which the user wants to call.
* @param params The WPEFramework JsonObject containing the parameters for the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash)
* @param params The WPEFramework JsonObject containing the response from the call. (We can't include WPEFramework headers in controlMgr .h files as their logging macros clash)
* @return True if the call succeeded, otherwise False.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.