Tik-76.115 Individual Project: Guinea Pig
$Id: vol_python_interface.html,v 1.3 1996/04/13 16:09:27 kepa Exp $

Testee UI - Volume Python interface

This document describes the Python interface of the Volume GUI. It is used to interface the Test Logic module to the Volume GUI. Here's a snapshot of the volume GUI:

[Image]

Using vol_gui class

You can use the gui_client class init('vol') method call to create an vol_gui class GUI instance. See Testee UI Python interfaces for more information.

When you have made an vol_gui class instance vol, you can use the arm(vol_min_dB=-60, vol_max_dB=20, vol_def_dB=-20, vol_tick=10) method call to configure the volume GUI. These values correspond: to the minimum value of the slider, the maximum value of the slider, the beginning value of the slider, and the tick spacing uder the slider (use 0 for no ticks). This method call also enables the user to move the volume slider and press the OK button.

   vol.arm(vol_min_dB=-60, vol_max_dB=20, vol_def_dB=-20, vol_tick=10)
You can receive the user volume adjustment values with the get_event() method call. It returns a tuple: string, list, float. The first string is an event type it is either SLIDERVAL which means user has moved the slider or ANSWER meaning that user has pressed the OK button. The params list contains one string which is the integer value of the current volume slider position. The last float is the current timestamp.
   type, params, stamp = vol.get_event()
When the volume adjustment is over, the GUI is closed with the close() method. You should not access the object after calling this method.
   vol.close()
   vol = None


. Testee UI Python interfaces · Testee UI Architecture · Testee UI Index · Document index · Guinea Pig ·