Skip to content

RDKCOM-5313: RDKBDEV-3174 T2 Telemetry JSON report incorrectly serializes all TR-181 parameter values as strings (missing type fidelity)#81

Closed
abdelkarimelhosni wants to merge 1 commit intordkcentral:developfrom
abdelkarimelhosni:RDK-DEV-3174
Closed

RDKCOM-5313: RDKBDEV-3174 T2 Telemetry JSON report incorrectly serializes all TR-181 parameter values as strings (missing type fidelity)#81
abdelkarimelhosni wants to merge 1 commit intordkcentral:developfrom
abdelkarimelhosni:RDK-DEV-3174

Conversation

@abdelkarimelhosni
Copy link

telemetry: Add tr 181 type tracking for CCSP/RBUS parameters

Introduced enum TR181ParameterType and added 'type' field to tr181ValStruct_t in businterface.h. Updated getCCSPProfileParamValues() and getRbusProfileParamValues() to map CCSP/RBUS value types to TR181ParameterType. Modified encodeParamResultInJSON() to inspect tr181ValStruct_t.type and use cJSON_AddNumberToObject, cJSON_AddBoolToObject or cJSON_AddStringToObject as appropriate. Added necessary includes (ccsp_memory.h, ccsp_base_api.h, rbus.h) and cleaned up resource handling (free_parameterValStruct_t, etc.). Ensures telemetry JSON output uses proper numeric/boolean types instead of quoting all values.

Signed-off-by: Abdelkarim EL HOSNI abdelkarim.elhosni.prestataire@sfr.com

…ters

Introduced enum TR181ParameterType and added 'type' field to tr181ValStruct_t in businterface.h.
Updated getCCSPProfileParamValues() and getRbusProfileParamValues() to map CCSP/RBUS value types to TR181ParameterType.
Modified encodeParamResultInJSON() to inspect tr181ValStruct_t.type and use cJSON_AddNumberToObject, cJSON_AddBoolToObject or cJSON_AddStringToObject as appropriate.
Added necessary includes (ccsp_memory.h, ccsp_base_api.h, rbus.h) and cleaned up resource handling (free_parameterValStruct_t, etc.).
Ensures telemetry JSON output uses proper numeric/boolean types instead of quoting all values.

Signed-off-by: Abdelkarim EL HOSNI abdelkarim.elhosni.prestataire@sfr.com
@abdelkarimelhosni abdelkarimelhosni requested a review from a team May 15, 2025 12:44
@CLAassistant
Copy link

CLAassistant commented May 15, 2025

CLA assistant check
All committers have signed the CLA.

@shibu-kv
Copy link
Contributor

Thank you for your contribution @abdelkarimelhosni .
There are existing backend systems which today expects all fields as strings.
We do see value in this at the same time will have to make sure the existing systems shall operate without disruptions.
Could you please make this support as a configurable build time option to enable this support with default option as current behavior.
This is would help in controlled and phased roll out as well.

Copy link
Contributor

@shibu-kv shibu-kv left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @abdelkarimelhosni .
There are existing backend systems which today expects all fields as strings.
We do see value in this at the same time will have to make sure the existing systems shall operate without disruptions.
Could you please make this support as a configurable build time option to enable this support with default option as current behavior.
This is would help in controlled and phased roll out as well.

Also please apply astyle formatter to the modified files. Commands are as below :

find . -name '*.c' -o -name '*.h' | xargs astyle --options=.astylerc
find . -name '*.orig' -type f -delete

@shibu-kv shibu-kv added the enhancement New feature or request label May 15, 2025
@pradeeptakdas pradeeptakdas changed the title RDKBDEV-3174 T2 Telemetry JSON report incorrectly serializes all TR-181 parameter values as strings (missing type fidelity) RDKCOM-5313: RDKBDEV-3174 T2 Telemetry JSON report incorrectly serializes all TR-181 parameter values as strings (missing type fidelity) May 15, 2025
@pradeeptakdas
Copy link

Hi @abdelkarimelhosni
Please sign the CLA

@pradeeptakdas
Copy link

Hi @abdelkarimelhosni
Can you please fix the review comments suggested by Shibu?

@pradeeptakdas
Copy link

Closing this PR due to inactive.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants