From eb801660c833b357a375ea6d9bbc7baba0d9ea58 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Sun, 2 Mar 2025 11:07:53 +0800 Subject: [PATCH] Add API getallscadaproperties --- main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.py b/main.py index 9f2281d..02aa7f6 100644 --- a/main.py +++ b/main.py @@ -519,6 +519,14 @@ async def fast_get_node_properties(network: str, node: str) -> dict[str, Any]: async def fast_get_link_properties(network: str, link: str) -> dict[str, Any]: return get_link_properties(network, link) +@app.get('/getscadaproperties/') +async def fast_get_scada_properties(network: str, scada: str) -> dict[str, Any]: + return get_scada_info(network, scada) + +@app.get('/getallscadaproperties/') +async def fast_get_all_scada_properties(network: str) -> list[dict[str, Any]]: + return get_all_scada_info(network) + # type can be 'node' or 'link' or 'scada' @app.get('/getelementpropertieswithtype/') async def fast_get_element_properties_with_type(network: str, type: str, element: str) -> dict[str, Any]: