Skip to content

RDKCOM-5543: RDKBWIFI-364 : Generalizing bus abstraction functions for retrieving and setting bus data property types.#969

Merged
gsathish86 merged 1 commit intordkcentral:developfrom
hp490:bus_gen
Mar 24, 2026
Merged

RDKCOM-5543: RDKBWIFI-364 : Generalizing bus abstraction functions for retrieving and setting bus data property types.#969
gsathish86 merged 1 commit intordkcentral:developfrom
hp490:bus_gen

Conversation

@hp490
Copy link
Copy Markdown
Contributor

@hp490 hp490 commented Mar 12, 2026

Reason for change : Converted the generic raw_data type to bus_data_prop_t. Risks: Medium
Priority:P0
Test Procedure: Flash the image and verify that all OneWifi-related features work properly.

@hp490 hp490 requested a review from a team as a code owner March 12, 2026 16:58
@github-actions github-actions bot added the community contribution Contributions from community. label Mar 12, 2026
@hp490
Copy link
Copy Markdown
Contributor Author

hp490 commented Mar 12, 2026

Depends on.
rdkcentral/OneWifiTestSuite#14

Copy link
Copy Markdown
Contributor

@Aniket0606 Aniket0606 left a comment

Choose a reason for hiding this comment

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

The changes look good. Please make sure all platform builds pass and ask QA to perform a sanity test.

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 updates the bus abstraction to use bus_data_prop_t (property-list style) instead of raw_data_t for RBUS method/event payloads, so bus object data can carry typed named properties more consistently across get/set/invoke flows.

Changes:

  • Added RBUS object/value → bus_data_prop_t conversion and updated RBUS method/event handlers to consume/produce bus_data_prop_t.
  • Updated various OneWiFi event/method callbacks to use bus_data_prop_t->value accessors instead of raw_data_t.
  • Hardened bus_release_data_prop to safely handle NULL num_prop / p_data_prop.

Reviewed changes

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

Show a summary per file
File Description
source/platform/rdkb/bus.c Adds conversion helper and switches RBUS method/event marshalling to bus_data_prop_t.
source/platform/common/data_model/wfa/wfa_data_model.c Updates table sync handler signatures to new method handler type.
source/platform/common/bus_common.h Changes method/subscription callback typedefs to bus_data_prop_t*.
source/platform/common/bus_common.c Makes bus_release_data_prop robust to NULL args.
source/dml/dml_webconfig/dml_onewifi_api.c Updates webconfig event handler to read from bus_data_prop_t->value.
source/db/wifi_db_apis.c Updates subscription handler signature to bus_data_prop_t*.
source/core/wifi_ctrl_rbus_handlers.c Updates several bus event handlers and one method handler to use bus_data_prop_t.
source/apps/sm/wifi_sm.c Updates SM app subscription handler to use bus_data_prop_t.
source/apps/csi/wifi_csi_analytics.c Updates no-op handler signature for new subscription callback type.
Comments suppressed due to low confidence (1)

source/apps/sm/wifi_sm.c:842

  • sm_app_enable_handler is registered via bus_event_subs_fn and will be invoked from rbus_sub_handler as a bus_event_sub_handler_t (3 parameters, including userData). This handler currently only takes 2 parameters, which is a function-pointer signature mismatch and can lead to undefined behavior/crashes when the callback is invoked. Update the handler signature to include the void *userData parameter (and ignore it if unused) so it matches the bus subscription callback type.
static void sm_app_enable_handler(char *event_name, bus_data_prop_t *p_data)
{
    bool sm_app_enable;

    wifi_util_dbg_print(WIFI_SM, "%s:%d recvd event\n", __func__, __LINE__);

    if ((strcmp(event_name, BUS_SM_APP_ENABLE) != 0) ||
        (p_data->value.data_type != bus_data_type_boolean)) {
        wifi_util_error_print(WIFI_SM, "%s:%d invalid event received,%s:%x\n", __func__, __LINE__,
            event_name, p_data->value.data_type);
        return;
    }

    sm_app_enable = p_data->value.raw_data.b;

    push_event_to_ctrl_queue(&sm_app_enable, sizeof(sm_app_enable), wifi_event_type_command,
        wifi_event_type_sm_app_enable, NULL);
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AkhilaReddyK7 AkhilaReddyK7 changed the title RDKBWIFI-364 : Generalizing bus abstraction functions for retrieving and setting bus data property types. RDKCOM-5543: RDKBWIFI-364 : Generalizing bus abstraction functions for retrieving and setting bus data property types. Mar 17, 2026
@amarnathhullur amarnathhullur force-pushed the bus_gen branch 4 times, most recently from 8e32c48 to 43d7969 Compare March 23, 2026 20:23
…and setting bus data property types.

Reason for change : Converted the generic raw_data type to bus_data_prop_t.
Risks: Medium
Priority:P0
Test Procedure: Flash the image and verify that all OneWifi-related features work properly.
@gsathish86 gsathish86 merged commit 067f675 into rdkcentral:develop Mar 24, 2026
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community contribution Contributions from community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants