Application¶
The Flask application factory and the server entry point.
WebATM.app¶
WebATM.app ¶
Build the Flask web server and Socket.IO application for WebATM.
This web application provides a browser-based interface for BlueSky - The Open Air Traffic Simulator developed by TU Delft (Delft University of Technology).
This module is separated into different focused modules in the server/ package:
- server/session_manager.py: Session tracking
- server/routes.py: Basic Flask routes (index, commands, config, health)
- server/server_status.py: BlueSky server status
- server/socket_handlers.py: Socket.IO event handlers
create_app ¶
Create and configure the Flask application with all routes and handlers.
Sets up logging (including Werkzeug HTTP access logs), the session manager,
the Socket.IO server, and the global BlueSky proxy, then registers the
Flask routes, server-status routes, and Socket.IO event handlers. When the
WEBATM_INTEGRATED environment variable is "1", the optional
webatm_integrated extensions are registered as well (best-effort; a
failure never breaks the core app).
Returns:
| Type | Description |
|---|---|
tuple
|
A |
Source code in WebATM/app.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
WebATM.main¶
WebATM.main ¶
Start the WebATM web server and manage its lifecycle.
start_WebATM ¶
Start the WebATM web server.
Creates the Flask/Socket.IO application, sets the default BlueSky server IP on the proxy (without connecting), and runs the web server until it exits, at which point the proxy client is stopped.
The web server bind address is taken from the WEB_HOST environment
variable (default "localhost").
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hostname
|
str | None
|
BlueSky server hostname/IP to use as the default.
Falls back to the |
None
|
port
|
int
|
Web server port. The |
8082
|
debug
|
bool
|
Whether to run the Socket.IO server in debug mode. |
False
|