Package psychopy :: Package hardware :: Module cedrus :: Class RB730
[frames] | no frames]

Class RB730

source code

Class to control/read a Cedrus RB-series response box
Nested Classes
  KeyEvent
Info about a keypress from Cedrus keypad XID string
Instance Methods
 
__init__(self, port, baudrate=115200, mode='XID') source code
 
sendMessage(self, message) source code
 
clearBuffer(self)
Empty the input buffer of all characters.
source code
 
getKeyEvents(self, allowedKeys=[1, 2, 3, 4, 5, 6, 7], downOnly=True)
Return a list of keyEvents Each event has the following attributes:
source code
 
readMessage(self)
Read and return an unformatted string from the device (and delete this from the buffer)
source code
 
measureRoundTrip(self) source code
 
waitKeyEvents(self, allowedKeys=[1, 2, 3, 4, 5, 6, 7], downOnly=True)
Like getKeyEvents, but waits until a key is pressed
source code
 
resetTrialTimer(self) source code
 
resetBaseTimer(self) source code
 
getBaseTimer(self)
Retrieve the current time on the base timer
source code
 
getInfo(self)
Get the name of this device
source code
Method Details

clearBuffer(self)

source code 
Empty the input buffer of all characters. Call this to clear any keypresses that haven't yet been handled.

getKeyEvents(self, allowedKeys=[1, 2, 3, 4, 5, 6, 7], downOnly=True)

source code 

Return a list of keyEvents Each event has the following attributes:

keyEvt.key is the button pressed (or released) (an int) keyEvt.rt [=float] is the time (in secs) since the rt clock was last reset (a float) keyEvt.direction is the direction the button was goin ('up' or 'down')

allowedKeys will limit the set of keys that are returned (WARNING: info about other keys is discarded) downOnly limits the function to report only the downward stroke of the key