expyriment.io.extras.SimpleParallelPort¶
-
class
expyriment.io.extras.
SimpleParallelPort
(port=None)¶ A class implementing a parallel port input and output.
Notes
CAUTION: Under Windows (starting from 2000) direct I/O is blocked. Install http://sourceforge.net/projects/pyserial/files/pyparallel/giveio/
-
__init__
(port=None)¶ Create a parallel port input and output.
-
clear
()¶ Clear the parallel port.
Dummy method required for port interfaces (see e.g. ButtonBox)
-
static
get_available_ports
()¶ Return an array of strings representing the available parallel ports.
If pyparallel is not installed, ‘None’ will be returned.
Returns: ports : list
array of strings representing the available parallel ports
-
has_input_history
¶ Returns always False, because ParallelPort has no input history.
-
logging
¶ Getter for logging.
-
parallel
¶ Getter for parallel
-
poll
()¶ Poll the parallel port.
The parallel port will be polled and the result will be returned. The parallel module for Python can only read three of the status lines. The result is thus coded in three bits:
Acknowledge Paper-Out Selected
Example: ‘4’ means only Selected is receiving data (“001”).
To send out data the actual data lines are used.
-
port
¶ Getter for port.
-
send
(data)¶ Send data.
Parameters: data : int
data to be sent
-
set_logging
(onoff)¶ Set logging of this object on or off
Parameters: onoff : bool
set logging on (True) or off (False)
Notes
See also design.experiment.set_log_level fur further information about event logging.
-