RDK-59833 : Remote Debugger datamodel support to retrieve Static Profile Data#183
Merged
RDK-59833 : Remote Debugger datamodel support to retrieve Static Profile Data#183
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds RBUS support for setting and retrieving “profile data” for the RDK Remote Debugger, backed by parsing /etc/rrd/remote_debugger.json and a persisted selected category.
Changes:
- Introduces new TR-181/RBUS parameter strings for
setProfileDataandgetProfileData, plus a persisted “profile category” selection. - Registers/unregisters RBUS data elements and implements RBUS set/get handlers.
- Adds cJSON-based helper functions to read and transform the profile JSON into response payloads.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
src/rrdInterface.h |
Adds new profile RBUS parameter constants, includes cJSON, and declares new handlers/helpers. |
src/rrdInterface.c |
Implements category persistence, registers RBUS data elements, and adds RBUS handlers + JSON processing helpers. |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (2)
src/unittest/mocks/Client_Mock.cpp:231
rbusValue_Releasefunction-pointer variable is defined twice in this file (once around line 211 and again at line 229). This will fail to compile due to a redefinition error; remove the duplicate definition and keep a single initialization.
rbusValueType_t (*rbusValue_GetType)(rbusValue_t) = &RBusApiWrapper::rbusValue_GetType;
char const* (*rbusValue_GetString)(rbusValue_t, int*) = &RBusApiWrapper::rbusValue_GetString;
void (*rbusProperty_SetValue)(rbusProperty_t, rbusValue_t) = &RBusApiWrapper::rbusProperty_SetValue;
void (*rbusValue_Release)(rbusValue_t) = &RBusApiWrapper::rbusValue_Release;
void (*rbusValue_Release)(rbusValue_t) = &RBusApiWrapper::rbusValue_Release;
/* -------- RFC ---------------*/
SetParamInterface *SetParamWrapper::impl = nullptr;
SetParamWrapper::SetParamWrapper() {}
void SetParamWrapper::setImpl(SetParamInterface *newImpl)
{
EXPECT_TRUE((nullptr == impl) || (nullptr == newImpl));
impl = newImpl;
}
void SetParamWrapper::clearImpl()
{
impl = nullptr;
}
tr181ErrorCode_t SetParamWrapper::setParam(char *arg1, const char *arg2, const char *arg3)
src/unittest/mocks/Client_Mock.cpp:228
rrd_SetHandler/rrd_GetHandlerare defined here underGTEST_ENABLE, but they are also implemented insrc/rrdInterface.cin this PR. With the unit-test runner including bothClient_Mock.cppandrrdInterface.cinto the same translation unit, this causes duplicate symbol/ODR redefinition build failures. Remove these mock definitions (or compile-guard the real ones) so only one definition exists in tests.
void (*rbusValue_Release)(rbusValue_t) = &RBusApiWrapper::rbusValue_Release;
/* -------- RFC ---------------*/
SetParamInterface *SetParamWrapper::impl = nullptr;
SetParamWrapper::SetParamWrapper() {}
void SetParamWrapper::setImpl(SetParamInterface *newImpl)
{
EXPECT_TRUE((nullptr == impl) || (nullptr == newImpl));
impl = newImpl;
}
void SetParamWrapper::clearImpl()
{
impl = nullptr;
Code Coverage Summary |
Code Coverage Summary |
Code Coverage Summary |
Code Coverage Summary |
Code Coverage Summary |
1 similar comment
Code Coverage Summary |
Code Coverage Summary |
2 similar comments
Code Coverage Summary |
Code Coverage Summary |
Code Coverage Summary |
Code Coverage Summary |
Code Coverage Summary |
Code Coverage Summary |
Update rrdInterface.h Update rrdInterface.c Update rrdInterface.h Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Add helper functions for profile data processing Added helper functions for profile data processing. Update rrdInterface.c Update rrdInterface.h Update Client_Mock.h Add mock implementations for RBusApiWrapper methods Remove mock profile handler functions for GTEST Removed mock implementations for profile handler functions when GTEST_ENABLE is defined. Update Client_Mock.cpp Update Client_Mock.h Update rrdInterface.h Update Makefile.am Update src/rrdInterface.c Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Update rrdUnitTestRunner.cpp Update rrdUnitTestRunner.cpp Update rrdUnitTestRunner.cpp Update rrdUnitTestRunner.cpp Update rrdUnitTestRunner.cpp Update rrdUnitTestRunner.cpp Update rrdUnitTestRunner.cpp Update rrdUnitTestRunner.cpp Create profileTestValid.json Update rrdUnitTestRunner.cpp Update rrdUnitTestRunner.cpp Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Update rrdUnitTestRunner.cpp Update rrdUnitTestRunner.cpp Update rrdUnitTestRunner.cpp Create profileTestInvalid.json Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Update rrdInterface.c Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Update rrdInterface.c Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> fix: add NULL guard to has_direct_commands to prevent crash on NULL input Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c84bc9e8-e1d2-4412-81d4-54eb9c67be5f Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com> Create test.py Convert run_l2.sh to Python with RDK tests Refactor run_l2.sh to Python and implement RDK Remote Debugger tests. L2 Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Update rrdInterface.c fix: correct set_rbus_response to use real rbus API signatures rbusValue_Init() returns rbusValue_t (not rbusError_t) and rbusValue_SetString() returns void in the real rbus library, so capturing their return values as rbusError_t caused a build error. - Remove incorrect return-value capture from rbusValue_Init and rbusValue_SetString; check rbusValue != NULL after init instead - Add NULL guard for prop parameter - Update RRDProfileHandlerTest SetUp() mock so rbusValue_Init actually sets *value to a non-null pointer, keeping SetRbusResponse_ValidInput test passing Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/e887c84a-2e12-4903-9d59-2bd6f90e2527 Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com> Update rrdInterface.c Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> fix: resolve Coverity dead code and add NULL guard to get_all_categories_json - read_profile_json_file: split combined NULL check into two separate checks (file_size first, then filename) so *file_size is safely zeroed before the filename check; eliminates the ternary 'filename ? filename : "(null)"' and the Coverity dead-code report - get_all_categories_json: add early NULL guard for json parameter that returns an empty JSON object string to prevent crash when callers (including unit tests) pass NULL Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c686520e-0adf-4e7e-9915-9b9e4e8a74fd Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com> Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Update rrdUnitTestRunner.cpp Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Update rrdInterface.c Update rrdInterface.c Update rrdUnitTestRunner.cpp Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Update rrdUnitTestRunner.cpp Update src/rrdInterface.c Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Update rrdInterface.c Clean up comments in save_profile_category function Removed comments explaining file opening flags. RDKEMW-16897: Add Agentic Support for the RRD (#182) * RDKEMW-16897: Add Agentic Support for the RRD * Updated the instructions --------- Co-authored-by: Hanasi <nhanas001c@cable.comcast.com> Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Rename test.py to test_rrd_profile_data.py rrd Update src/rrdInterface.c Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Update src/rrdInterface.c Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Update rrdUnitTestRunner.cpp
Code Coverage Summary |
RDKEMW-16897: Add Agentic Support for the RRD (#182)
Code Coverage Summary |
nhanasi
reviewed
Apr 17, 2026
nhanasi
reviewed
Apr 17, 2026
nhanasi
reviewed
Apr 17, 2026
Code Coverage Summary |
Code Coverage Summary |
AravindanNC
approved these changes
Apr 20, 2026
shibu-kv
approved these changes
Apr 21, 2026
nhanasi
approved these changes
Apr 23, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Reason for change: Implement get/set handlers for retrieving rrd static profile data
Test Procedure: Build and verify get/set working as expected
Risks: Low
Signed-off-by: Abhinav P V Abhinav_Valappil@comcast.com