traci.gui
index
/tmp/buildd/sumo-0.20.0+dfsg/tools/traci/gui.py

@file    gui.py
@author  Michael Behrisch
@author  Daniel Krajzewicz
@date    2011-03-09
@version $Id: gui.py 15692 2014-02-22 09:17:02Z behrisch $
 
Python implementation of the TraCI interface.
 
SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
Copyright (C) 2011-2014 DLR (http://www.dlr.de/) and contributors
 
This file is part of SUMO.
SUMO is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

 
Modules
       
struct
traci.constants
traci

 
Functions
       
getBoundary(viewID='View #0')
getBoundary(string): -> ((double, double), (double, double))
 
Returns the coordinates of the lower left and the upper right corner of the currently visible view.
getContextSubscriptionResults(viewID=None)
getIDList()
getIDList(): -> list(string)
 
Returns the list of available views (open windows).
getOffset(viewID='View #0')
getOffset(string): -> (double, double)
 
Returns the x and y offset of the center of the current view.
getSchema(viewID='View #0')
getSchema(string): -> string
 
Returns the name of the current coloring scheme.
getSubscriptionResults(viewID=None)
getSubscriptionResults(string) -> dict(integer: <value_type>)
 
Returns the subscription results for the last time step and the given view.
If no view id is given, all subscription results are returned in a dict.
If the view id is unknown or the subscription did for any reason return no data,
'None' is returned.
It is not possible to retrieve older subscription results than the ones
from the last time step.
getZoom(viewID='View #0')
getZoom(string): -> double
 
Returns the current zoom factor.
screenshot(viewID, filename)
screenshot(string, string) -> None
 
Save a screenshot for the given view to the given filename.
The fileformat is guessed from the extension, the available 
formats differ from platform to platform but should at least
include ps, svg and pdf, on linux probably gif, png and jpg as well.
setBoundary(viewID, xmin, ymin, xmax, ymax)
setBoundary(string, double, double, double, double) -> None
 
Set the current boundary for the given view (see getBoundary()).
setOffset(viewID, x, y)
setOffset(string, double, double) -> None
 
Set the current offset for the given view.
setSchema(viewID, schemeName)
setSchema(string, string) -> None
 
Set the current coloring scheme for the given view.
setZoom(viewID, zoom)
setZoom(string, double) -> None
 
Set the current zoom factor for the given view.
subscribe(viewID, varIDs=(161,), begin=0, end=2147483647)
subscribe(string, list(integer), double, double) -> None
 
Subscribe to one or more gui values for the given interval.
subscribeContext(viewID, domain, dist, varIDs=(161,), begin=0, end=2147483647)
trackVehicle(viewID, vehID)
trackVehicle(string, string) -> None
 
Start visually tracking the given vehicle on the given view.

 
Data
        DEFAULT_VIEW = 'View #0'
subscriptionResults = <{}, {}>