Tik-76.115 Individual Project: Guinea Pig
$Id: ab_scale_interface.html,v 1.3 1996/04/21 18:58:22 kepa Exp $

Testee UI - A/B Scale Test Communication protocol

This document describes the communication protocols used between Test Logic process and GUI process to implement A/B Scale Test Testee UI.

Protocol messages sent to GUI process

Here is the list of protocol messages sent to GUI process. The type of the parameter is in parenthesis. The command and parameters are separated by whitespace and each command line ends with a newline character ('\n').
ARM amin(int) amax(int) astart(int) atick(int) bmin(int) bmax(int) bstart(int) btick(int)
PLAYING sample(string)
STOPPED sample(string)
ENABLE warnTO(float) answerTO(float)
CLOSE

ARM command tells GUI to colour all buttons grey. It also configures the scales used to give grades to the samples played. min is the min grade that can be given, max is the maximum grade that can be given, start is the grade that the slider starts from, tick tells what is the spacing between ticks under the slider (use 0 for no ticks). All these values can be configured to both sliders individually.

PLAYING command is used to change the colour of the bar on top of a sample blue. The sample parameter is either A or B.

STOPPED command is used to change the colour of the bar on top of the sample buttons grey. The sample parameter is either A or B.

ENABLE command tells GUI to enable the testee to give his/her answer. GUI enables the user to give answers and colours bars on top of the sample buttons green. If warnTO is greater than zero, it it used to enable a timeout, after which the colour of both bars on top of the sample buttons turn yellow. If answerTO is greater than zero, it it used to enable a timeout, after which testee is no longer able to give his/her answer. This is indicated to Test Logic by sending a timeout message (see below). Also the colour of both bars on top of the sample buttons turn red.

CLOSE command tells GUI process to exit, closing communication socket and GUI window during the process.

Protocol messages sent by GUI process

Here is the list of protocol messages sent by GUI process. The type of the parameter is in parenthesis. The command and parameters are separated by whitespace and each command line ends with a newline character ('\n').
ANSWER timestamp(float) aval(int) bval(int)
ANSWER timestamp(float) TIMEOUT

The GUI process will send only one of these messages above each time it has been enabled with ENABLE message. The timestamp parameter is a float telling the system time in seconds as returned by Python time.time() method.

ANSWER aval bval message means testee pressed the OK button. The aval and bval parameters give the values of the A and B sliders when user pressed the OK button.

ANSWER TIMEOUT message means the answering time ran out before testee pressed the OK button.


· Communication protocols · Testee UI Architecture · Testee UI Index · Document index · Guinea Pig ·