You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -77,6 +77,15 @@ class NetworkManagerPlugin(PHALPlugin):
77
77
validator=NetworkManagerValidator
78
78
79
79
def__init__(self, bus=None, config=None):
80
+
"""
81
+
Initialize the NetworkManagerPlugin and register PHAL network event handlers on the message bus.
82
+
83
+
Registers handlers for network manager events such as scanning, connecting (including open networks), reconnecting, disconnecting, forgetting networks, and querying the currently connected network.
84
+
85
+
Parameters:
86
+
bus: Message bus instance used to subscribe to PHAL events.
87
+
config: Optional configuration dictionary or object for plugin initialization.
self.gui_setup=GUISetup(bus=bus) # extra GUI events
90
98
91
99
# Network Manager Events
92
100
defhandle_network_scan_request(self, message):
93
101
# Scan for networks using Network Manager and build a list of networks found and their security types
102
+
"""
103
+
Scan for available Wi-Fi networks using Network Manager and emit a completion message with results.
104
+
105
+
Performs an nmcli rescan and lists SSID and SECURITY fields, then emits an "ovos.phal.nm.scan.complete" Message on the bus with a payload containing a "networks" list. Each list item is a dict with keys:
106
+
- "ssid": network SSID string
107
+
- "security": security string reported by nmcli
108
+
109
+
Parameters:
110
+
message (Message): Incoming request message (contents are not inspected).
111
+
"""
94
112
LOG.info("Scanning for networks using nmcli backend")
0 commit comments