Skip to content

RDKEMW-22842: onWiFiStateChange Event to Include Wi-Fi Profile Info - #332

Open
me-ha-p wants to merge 1 commit into
developfrom
feature/RDKEMW-22842
Open

RDKEMW-22842: onWiFiStateChange Event to Include Wi-Fi Profile Info#332
me-ha-p wants to merge 1 commit into
developfrom
feature/RDKEMW-22842

Conversation

@me-ha-p

@me-ha-p me-ha-p commented Aug 6, 2026

Copy link
Copy Markdown

Reason for change: onWiFiStateChange event currently reports only the Wi-Fi connection state.
Enhance onWiFiStateChange event payload to include the connected or affected Wi-Fi SSID.
Priority: P1
Test Procedure: Refer ticket RDKEMW-23159
Risks: Low

Signed-off-by: Mehavarshni_Palaniswamy@comcast.com

…ation

Reason for change: onWiFiStateChange event currently reports only the Wi-Fi connection state.
Enhance onWiFiStateChange event payload to include the connected or affected Wi-Fi SSID.
Priority: P1
Test Procedure: Refer ticket
Risks: Low

Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
@me-ha-p
me-ha-p requested a review from a team as a code owner August 6, 2026 09:26
Copilot AI review requested due to automatic review settings August 6, 2026 09:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 extends the NetworkManager plugin’s onWiFiStateChange notification/event payload to include Wi-Fi profile information (SSID), updating the C++ notification interface, the plugin’s event dispatch path, and the public JSON-RPC documentation/schema accordingly.

Changes:

  • Adds an ssid field to the onWiFiStateChange JSON-RPC event payload.
  • Extends the Exchange::INetworkManager::INotification::onWiFiStateChange callback signature to carry the SSID through the internal notification pipeline.
  • Updates the public docs (docs/) and JSON schema (definition/) to describe the new ssid field.

Reviewed changes

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

Show a summary per file
File Description
plugin/NetworkManagerJsonRpc.cpp Adds ssid to the emitted onWiFiStateChange JSON-RPC event parameters.
plugin/NetworkManagerImplementation.h Extends internal event data struct to carry SSID alongside WiFiState.
plugin/NetworkManagerImplementation.cpp Publishes SSID via the notification callbacks and attempts to track a “last known” SSID.
plugin/NetworkManager.h Updates the notification adapter to forward (state, ssid) to the JSON-RPC layer.
interface/INetworkManager.h Changes the notification interface signature to include SSID.
docs/NetworkManagerPlugin.md Documents the new params.ssid field in the event payload.
definition/NetworkManager.json Adds ssid to the event schema properties (not required).
Suppressed comments (1)

plugin/NetworkManagerImplementation.cpp:1381

  • lastKnownSSID is published for every WiFiState, including WIFI_STATE_CONNECTING and various failure states. Since lastKnownSSID is only updated on WIFI_STATE_CONNECTED, this can misreport a previous SSID as the one “causing” the current transition. Consider publishing lastKnownSSID only for states where it is actually relevant (e.g., CONNECTED/DISCONNECTED/connection-lost), and otherwise send an empty string.
                WiFiStateChangeData eventData{state, lastKnownSSID};

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

Comment on lines +1363 to +1365
Exchange::INetworkManager::WiFiSSIDInfo ssidInfo{};
if ((GetConnectedSSID(ssidInfo) == Core::ERROR_NONE) && !ssidInfo.ssid.empty())
lastKnownSSID = ssidInfo.ssid;
Comment on lines 287 to 291
// WiFi Notifications that other processes can subscribe to
virtual void onAvailableSSIDs(const string jsonOfScanResults /* @in */){};
virtual void onWiFiStateChange(const WiFiState state /* @in */){};
virtual void onWiFiStateChange(const WiFiState state /* @in */, const string ssid /* @in */){};
virtual void onWiFiSignalQualityChange(const string ssid /* @in */, const int strength /* @in */, const int noise /* @in */, const int snr /* @in */, const WiFiSignalQuality quality /* @in */){};
};
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