Skip to content

RDKEMW-18979: onStatus event contain data from all networks#238

Open
egalla204 wants to merge 11 commits into
developfrom
feature/RDKEMW-18612_onStatus-both-ble-rf4ce_MAIN
Open

RDKEMW-18979: onStatus event contain data from all networks#238
egalla204 wants to merge 11 commits into
developfrom
feature/RDKEMW-18612_onStatus-both-ble-rf4ce_MAIN

Conversation

@egalla204
Copy link
Copy Markdown
Contributor

No description provided.

@egalla204 egalla204 requested a review from a team as a code owner May 22, 2026 01:42
Copilot AI review requested due to automatic review settings May 22, 2026 01:42
Copy link
Copy Markdown

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

Updates the Thunder/IARM RCU status event payload so onStatus reports remote/controller data aggregated across all networks (rather than only the triggering network), aligning the event output with the existing “get RCU status” multi-network behavior.

Changes:

  • Build onStatus JSON payload from an all-networks RCU status map and flatten controller status into a single remoteData array.
  • Add a new ctrlm_main_network_rcu_status_map_get() helper API to gather per-network ctrlm_rcp_ipc_net_status_t replies.
  • Add a ctrlm-main helper to invoke a network handler across all registered networks.

Reviewed changes

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

File Description
src/ipc/ctrlm_rcp_ipc_iarm_thunder.cpp Reworks on_status() to assemble a multi-network status payload (remote list + supported network types + default RF4CE-derived state).
src/ctrlm.h Declares the new ctrlm_main_network_rcu_status_map_get() API and forward-declares ctrlm_rcp_ipc_net_status_t.
src/ctrlm_main.cpp Implements ctrlm_main_network_rcu_status_map_get() by executing req_process_get_rcu_status across all networks.

Comment thread src/ctrlm_main.cpp
Comment thread src/ctrlm.h
Comment thread src/ipc/ctrlm_rcp_ipc_iarm_thunder.cpp Outdated
Comment on lines +119 to +123
json_t *ret = json_object();
json_t *status = json_object();
json_t *net_type_supported = json_array();
json_t *remote_array = json_array();
std::map<ctrlm_network_id_t, ctrlm_rcp_ipc_net_status_t> status_map = ctrlm_main_network_rcu_status_map_get();
Copilot AI review requested due to automatic review settings May 28, 2026 15:09
@egalla204 egalla204 changed the title RDKEMW-18612: onStatus event contain data from all networks RDKEMW-18979: onStatus event contain data from all networks May 28, 2026
Copy link
Copy Markdown

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 4 comments.

Comment thread src/ipc/ctrlm_rcp_ipc_iarm_thunder.cpp
Comment thread src/ipc/ctrlm_rcp_ipc_iarm_thunder.cpp
Comment thread src/ipc/ctrlm_rcp_ipc_iarm_thunder.cpp
Comment thread src/ctrlm.h
Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

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 3 comments.

Comment on lines +129 to +138
err |= json_object_set_new_nocheck(status, REMOTE_DATA, remote_array);
err |= json_object_set_new_nocheck(status, NET_TYPES_SUPPORTED, net_type_supported);
err |= json_object_set_new_nocheck(status, NET_TYPE, json_integer(type));
err |= json_object_set_new_nocheck(status, IR_PROG_STATE, json_string(ctrlm_ir_state_str(ir_prog_state)));
err |= json_object_set_new_nocheck(status, PAIRING_STATE, json_string(ctrlm_rf_pair_state_str(rf_pair_state)));

if (err) {
XLOGD_ERROR("JSON object set error");
json_decref(status);
return nullptr;
Comment on lines +191 to +201
json_config config(payload);

if (!payload) {
XLOGD_ERROR("payload NULL");
return(IARM_RESULT_INVALID_PARAM);
} else if (!config.current_object_get()) {
XLOGD_ERROR("Bad payload from call data");
json_decref(payload);
return(IARM_RESULT_INVALID_PARAM);
}

Comment on lines +66 to +69
json_t *build_rcu_status_json(const std::map<ctrlm_network_id_t, ctrlm_rcp_ipc_net_status_t> &status_map,
ctrlm_ir_state_t ir_prog_state,
ctrlm_rf_pair_state_t rf_pair_state,
ctrlm_network_type_t type) const;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants