MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / connectionState

Function connectionState

src/astroprint/api/connection.py:18–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17@api.route("/connection", methods=["GET"])
18def connectionState():
19 pm = printerManager()
20
21 state, port, baudrate = pm.getCurrentConnection()
22 current = {
23 "state": state,
24 "port": port,
25 "baudrate": baudrate
26 }
27 return jsonify({"current": current, "options": pm.getConnectionOptions()})
28
29
30@api.route("/connection", methods=["POST"])

Callers

nothing calls this directly

Calls 3

printerManagerFunction · 0.90
getCurrentConnectionMethod · 0.45
getConnectionOptionsMethod · 0.45

Tested by

no test coverage detected