ROyWeb 0.9.1 documentation

API Documentation

«  Using ROyWeb   ::   Contents

API Documentation

Module networking

Networking stuff for UDP and WebSocket communication.

class royweb.networking.PacketHandler(ip, port)

A reusable packet handler, which can send parameters via UDP.

json_message(parameter_type, value, unit, description)

Create a json dump.

send(parameter_type, value, unit, description)

Send a parameter with value and description to a ROyWeb

class royweb.networking.WebSocketBroadcaster(server, port, clients)

Receives data from UDP and redistributes them via WebSockets.

run()

Listen for UDP packets and immediately send them to the clients.

stop()

Stop the port listener.

with_timestamp(json_obj)

Returns a copy of a json obj with an additional time property.

Module webhandler

Tornado WebHandler.

class royweb.webhandler.MainHandler(application, request, **kwargs)

The main request handler for ROyWeb

class royweb.webhandler.EchoWebSocket(*args, **kwargs)

An echo handler for client/server messaging and debugging

send_json_message(text)

Convert message to json and send it to the clients

class royweb.webhandler.NoCacheStaticFileHandler(application, request, **kwargs)

A static file handler without caching.

class royweb.webhandler.UnitTests(application, request, **kwargs)

The unit test page

class royweb.webhandler.SpecTests(application, request, **kwargs)

The specs page

«  Using ROyWeb   ::   Contents