Subrack Simulator Server

This module provides an HTTP server that fronts a subrack simulator.

class SubrackServerContextManager(backend=None)

A context manager for a subrack server.

__init__(backend=None)

Initialise a new instance.

Parameters:

backend (Optional[SubrackProtocol]) – the backend for which that this subrack server provides web access.

main()

Entry point for an HTTP server that fronts a subrack simulator.

Return type:

None

run_server_forever(backend, port)

Run the subrack server until terminated.

Parameters:
  • backend (SubrackProtocol) – the backend for which this server provides an interface.

  • port (int) – the port on which to run the server. If set to 0, the server will be run on any available port. The actual port on which the server is running will be printed to stdout.

Return type:

None