|
6 | 6 | PlatformDeploymentStatus, CreateAgentRequest, ToolRequest, ToolStatusResponse, \ |
7 | 7 | BACnetReadDeviceAllRequest, BACnetDevice, BACnetReadPropertyRequest, BACnetScanResults, \ |
8 | 8 | BACnetWritePropertyRequest, BACnetReadObjectListRequest |
9 | | -from ..models import WindowsHostIPModel, LocalIPModel |
| 9 | +from ..models import WindowsHostIPModel, LocalIPModel, NetworkDiscoveryModel |
10 | 10 | from rxconfig import config |
11 | 11 |
|
12 | 12 | from bacnet_scan_tool.models import ScanResponse, ObjectListNamesResponse |
@@ -216,6 +216,12 @@ async def get_bacnet_host_ip() -> WindowsHostIPModel: |
216 | 216 | """Get Windows host IP address for WSL2 users.""" |
217 | 217 | return await proxy_request(f"{API_BASE_URL}{BACNET_SCAN_TOOL_PREFIX}/get_host_ip", "GET") |
218 | 218 |
|
| 219 | +@with_model(NetworkDiscoveryModel) |
| 220 | +async def discover_networks(verbose: bool = False) -> NetworkDiscoveryModel: |
| 221 | + """Discover available networks for BACnet scanning using comprehensive network analysis.""" |
| 222 | + params = {"verbose": verbose} |
| 223 | + return await proxy_request(f"{API_BASE_URL}{BACNET_SCAN_TOOL_PREFIX}/discover_networks", "GET", params=params) |
| 224 | + |
219 | 225 | async def get_tool_proxy(tool_name: str, path: str, **kwargs) -> httpx.Response: |
220 | 226 | return await proxy_request(f"{API_BASE_URL}{TOOL_PROXY_PREFIX}/{tool_name}/{path}", "GET", **kwargs) |
221 | 227 |
|
|
0 commit comments