August'24: Kamaelia is in maintenance mode and will recieve periodic updates, about twice a year, primarily targeted around Python 3 and ecosystem compatibility. PRs are always welcome. Latest Release: 1.14.32 (2024/3/24)

Kamaelia.Visualisation.PhysicsGraph.TopologyViewerServer

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()

Run the server, then run the client:

>>> DEL ALL
>>> 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.


Kamaelia.Visualisation.PhysicsGraph.TopologyViewerServer.TextControlledTopologyViewer

prefab: TextControlledTopologyViewer

Kamaelia.Visualisation.PhysicsGraph.TopologyViewerServer.TopologyViewerServer

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

Feedback

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