Torus_Topo
Create a torus network topology.
This is a series of connected rings. Include test code to generate route maps and test connectivity.
OrbitData
dataclass
Records key orbital information
Source code in emulation/torus_topo.py
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 | |
create_network(num_rings=NUM_RINGS, num_ring_nodes=NUM_RING_NODES, ground_stations=True)
Create a torus network of the given size annotated with orbital information.
Source code in emulation/torus_topo.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
down_inter_ring_links(graph, node_num_list, num_rings=NUM_RINGS)
Mark the inter-ring links down for the specified node numbers on all rings to prevent use during a path trace. This causes many inter-ring links to be down to test the routing functions.
Source code in emulation/torus_topo.py
204 205 206 207 208 209 210 211 212 213 214 215 216 | |
generate_route_table(graph, node_name)
Breadth first search to generate routes fromthe start node to all other nodes. Routing table provides a next hop and a path length for all possible destinations.
{ "dest node" : ( path_len, "next hop" )}
Source code in emulation/torus_topo.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | |
ground_stations(graph)
Return a list of all node names where the node is of type ground
Source code in emulation/torus_topo.py
48 49 50 51 52 53 54 55 56 57 | |
run_routing_test()
Make a graph and exercise path tracing
Source code in emulation/torus_topo.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | |
run_small_test()
Make a graph
Source code in emulation/torus_topo.py
289 290 291 292 293 294 | |
satellites(graph)
Return a list of all node names where the node is of type satellite
Source code in emulation/torus_topo.py
60 61 62 63 64 65 66 67 68 69 | |
trace_path(start_node_name, target_node_name, route_tables)
Follow the routing tables to trace a path between the start and target node route_tables is a dictionary of routes for each source node
Source code in emulation/torus_topo.py
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | |