Skip to content

Add KVP_PROFILE macros for signed integer APIs (int8, int16, int32, int64)#237

Closed
Copilot wants to merge 3 commits intodevelopfrom
copilot/add-kvp-profile-macros
Closed

Add KVP_PROFILE macros for signed integer APIs (int8, int16, int32, int64)#237
Copilot wants to merge 3 commits intodevelopfrom
copilot/add-kvp-profile-macros

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

New signed integer APIs (ut_kvp_getInt8Field, ut_kvp_getInt16Field, ut_kvp_getInt32Field, ut_kvp_getInt64Field) were added to ut-control. This PR adds the corresponding profile macros in ut-core.

Changes

  • include/ut_kvp_profile.h — Added getter macros (UT_KVP_PROFILE_GET_INT8/16/32/64) and assert macros (UT_ASSERT_KVP_EQUAL_PROFILE_INT8/16/32/64), mirroring existing unsigned variants
  • tests/src_weak/ut_test_weak_kvp.c — Added weak implementations for the four new ut_kvp_getInt*Field functions
  • tests/src/assets/test_kvp.yaml / test_kvp.json — Added signed integer test data (positive and negative values)
  • tests/src/c_source/ut_test_kvp_profile.c — Added test functions for int8/16/32/64 registered in both YAML and JSON suites

Usage

// Getter macro
int32_t val = UT_KVP_PROFILE_GET_INT32("config/temperature");

// Assert macro
UT_ASSERT_KVP_EQUAL_PROFILE_INT32(-2000000000, "decodeTest/checkInt32Negative");

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • sourceforge.net
    • Triggering command: /usr/bin/wget wget REDACTED --no-check-certificate -P /home/REDACTED/work/ut-core/ut-core/framework (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Task:Add KVP_PROFILE macros for apis added to retrieve signed values</issue_title>
<issue_description>### Goal

As per the branch:
https://github.com/rdkcentral/ut-control/blob/feature/add-support-for-reading-signed-values/include/ut_kvp.h

New Apis have been added, which looks like below:
int8_t ut_kvp_getInt8Field(ut_kvp_instance_t *pInstance, const char *pszKey);

/**!

  • @brief Gets an int16_t value from the KVP profile.
  • @param[in] pInstance - Handle to the KVP instance.
  • @param[in] pszKey - Null-terminated string representing the key to search for.
  • @returns The int16_t value on success, or 0 on error (check logs for details).
    */
    int16_t ut_kvp_getInt16Field(ut_kvp_instance_t *pInstance, const char *pszKey);

/**!

  • @brief Gets an int32_t value from the KVP profile.
  • @param[in] pInstance - Handle to the KVP instance.
  • @param[in] pszKey - Null-terminated string representing the key to search for.
  • @returns The int32_t value on success, or 0 on error (check logs for details).
    */
    int32_t ut_kvp_getInt32Field(ut_kvp_instance_t *pInstance, const char *pszKey);

/**!

  • @brief Gets an int64_t value from the KVP profile.
  • @param[in] pInstance - Handle to the KVP instance.
  • @param[in] pszKey - Null-terminated string representing the key to search for.
  • @returns The int64_t value on success, or 0 on error (check logs for details).
    */
    int64_t ut_kvp_getInt64Field(ut_kvp_instance_t *pInstance, const char *pszKey);

Create UT_ASSERT_KVP_* macros for the above apis in ut_kvp_profile.h

Notes (Optional)

No response</issue_description>

<agent_instructions>Look for new APIs in https://github.com/rdkcentral/ut-control/blob/feature/add-support-for-reading-signed-values/include/ut_kvp.h

Also add the new macros in file ut_kvp_profile.h</agent_instructions>

Comments on the Issue (you are @copilot in this section)


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI and others added 2 commits March 25, 2026 14:04
…nt64)

Added UT_KVP_PROFILE_GET_INT8/INT16/INT32/INT64 getter macros and
UT_ASSERT_KVP_EQUAL_PROFILE_INT8/INT16/INT32/INT64 assert macros in
ut_kvp_profile.h for the new signed integer APIs from ut-control.

Also added:
- Weak implementations for ut_kvp_getInt8/16/32/64Field
- Test data for signed integers in YAML and JSON test assets
- Test functions exercising the new macros in both YAML and JSON suites

Co-authored-by: kanjoe24 <165808281+kanjoe24@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rdkcentral/ut-core/sessions/75aa1437-0247-48e0-963d-421645dd54a0
Copilot AI changed the title [WIP] Add KVP_PROFILE macros for APIs retrieving signed values Add KVP_PROFILE macros for signed integer APIs (int8, int16, int32, int64) Mar 25, 2026
Copilot AI requested a review from kanjoe24 March 25, 2026 14:06
@kanjoe24 kanjoe24 closed this Mar 25, 2026
@kanjoe24 kanjoe24 deleted the copilot/add-kvp-profile-macros branch March 25, 2026 15:09
@github-project-automation github-project-automation bot moved this from Todo to Resolved in UT-Core Roadmap Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Resolved

Development

Successfully merging this pull request may close these issues.

Task:Add KVP_PROFILE macros for apis added to retrieve signed values

2 participants