April 2024 - This site, and Kamaelia are being updated. There is significant work needed, and PRs are welcome.


Generic Topology Viewer Server

A generic topology viewer that one client can connect to at a time over a TCP socket and send topology change data for visualisation.

Example Usage

Visualiser that listens on port 1500 for a TCP connection through which it receives topology change data to render:

TopologyViewerServer( serverPort = 1500 ).run()

A simple client to drive the visualiser:

Pipeline( ConsoleReader(),
          TCPClient( server=<address>, port=1500 ),

Run the server, then run the client:

>>> ADD NODE 1 "1st node" randompos -
>>> ADD NODE 2 "2nd node" randompos -
>>> ADD NODE 3 "3rd node" randompos -
>>> ADD LINK 1 2
>>> ADD LINK 3 2
>>> DEL LINK 1 2
>>> DEL NODE 1

See also Kamaelia.Visualisation.Axon.AxonVisualiserServer - which is a specialisation of this component.

How does it work?

TopologyViewerServer is a Pipeline of the following components:

This Pipeline serves to listen on the specified port (defaults to 1500) for clients. One client is allowed to connect at a time.

That client can then send topology change commands formatted as lines of text. The lines are parsed and tokenised for the TopologyViewer.

Any output from the TopologyViewer is sent to the console.

If the noServer option is used at initialisation, then the Pipeline is built without the SingleServer component. It then becomes a TopologyViewer capable of processing non-tokenised input and with diagnostic console output.

See TopologyViewer for more detail on topology change data and its behaviour.


prefab: TextControlledTopologyViewer


prefab: TopologyViewerServer

TopologyViewerServer([noServer][,serverPort],**args) -> new TopologyViewerServer component.

Multiple-clients-at-a-time TCP socket Topology viewer server. Connect on the specified port and send topology change data for display by a TopologyViewer.

Keyword arguments:

  • serverPort -- None, or port number to listen on (default=1500)
  • args -- all remaining keyword arguments passed onto TopologyViewer


Got a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!

Please leave you feedback here in reply to the documentation thread in the Kamaelia blog.

-- Automatic documentation generator, 05 Jun 2009 at 03:01:38 UTC/GMT