Skip to content

RDK-59833 : Remote Debugger datamodel support to retrieve Static Profile Data#183

Merged
nhanasi merged 4 commits intodevelopfrom
feature/rrd_prof_updated
Apr 23, 2026
Merged

RDK-59833 : Remote Debugger datamodel support to retrieve Static Profile Data#183
nhanasi merged 4 commits intodevelopfrom
feature/rrd_prof_updated

Conversation

@Abhinavpv28
Copy link
Copy Markdown
Contributor

@Abhinavpv28 Abhinavpv28 commented Apr 10, 2026

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

@Abhinavpv28 Abhinavpv28 requested a review from a team as a code owner April 10, 2026 09:13
Copilot AI review requested due to automatic review settings April 10, 2026 09:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 setProfileData and getProfileData, 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.

Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.h Outdated
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c
Copilot AI review requested due to automatic review settings April 10, 2026 09:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c Outdated
Copilot AI review requested due to automatic review settings April 10, 2026 09:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_Release function-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_GetHandler are defined here under GTEST_ENABLE, but they are also implemented in src/rrdInterface.c in this PR. With the unit-test runner including both Client_Mock.cpp and rrdInterface.c into 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;

Comment thread src/rrdInterface.h Outdated
Comment thread src/rrdInterface.h
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c
Copilot AI review requested due to automatic review settings April 10, 2026 10:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.h
Comment thread src/rrdInterface.c
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|80.2%   5327|95.9%  1326|    -      0

Copilot AI review requested due to automatic review settings April 10, 2026 11:32
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|80.2%   5327|95.9%  1326|    -      0

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c
Comment thread src/unittest/Makefile.am
Copilot AI review requested due to automatic review settings April 10, 2026 12:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.

Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c
Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|82.4%   5571|96.7%  1436|    -      0

Copilot AI review requested due to automatic review settings April 13, 2026 03:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c
Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Copilot AI review requested due to automatic review settings April 13, 2026 03:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/unittest/rrdUnitTestRunner.cpp
Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/unittest/rrdUnitTestRunner.cpp
Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c Outdated
Copilot AI review requested due to automatic review settings April 13, 2026 06:10
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.5%   5880|97.0%  1527|    -      0

Copilot AI review requested due to automatic review settings April 17, 2026 03:46
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.6%   5879|97.0%  1527|    -      0

1 similar comment
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.6%   5879|97.0%  1527|    -      0

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c
Comment thread test/functional-tests/tests/test_rrd_profile_data.py
Comment thread src/rrdInterface.c
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.6%   5879|97.0%  1527|    -      0

2 similar comments
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.6%   5879|97.0%  1527|    -      0

@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.6%   5879|97.0%  1527|    -      0

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c Outdated
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.6%   5879|97.0%  1527|    -      0

@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.6%   5881|97.0%  1527|    -      0

@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.5%   5886|97.0%  1527|    -      0

@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.5%   5890|97.0%  1531|    -      0

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Comment thread src/unittest/rrdUnitTestRunner.cpp
Comment thread src/rrdInterface.c
Comment thread test/functional-tests/tests/test_rrd_profile_data.py
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
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.5%   5890|97.0%  1531|    -      0

RDKEMW-16897: Add Agentic Support for the RRD (#182)
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.5%   5890|97.0%  1531|    -      0

Comment thread src/rrdInterface.c
Comment thread src/rrdInterface.c Outdated
Comment thread src/rrdInterface.c Outdated
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.5%   5890|97.0%  1531|    -      0

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread src/unittest/rrdUnitTestRunner.cpp Outdated
Comment thread src/unittest/rrdUnitTestRunner.cpp
@github-actions
Copy link
Copy Markdown

Code Coverage Summary

                               Total:|83.5%   5890|97.0%  1531|    -      0

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread src/unittest/rrdUnitTestRunner.cpp
Comment thread src/unittest/rrdUnitTestRunner.cpp
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants