A class implementing a trigger input.
Methods
Create a trigger input.
Parameters interface – the interface to use (expyrment.io.SerialPort or
expyriment.io.ParallelPort object)
default_code – the default code of the trigger (int) (optional)
Getter for default_code
Get list of received triggers.
For not missing any triggers the history has to be updated regularly (e.g. by calling this method)! Returns None if no history is used.
If bitwise_comparision = True, the function performs a bitwise comparison (logical and) between code and received input and waits until a certain bit pattern is set.
Parameters code – a specific code to get (int) (optional) bitwise_comparison – make a bitwise comparison (default=False)
Getter for interface
Getter for logging.
Set logging of this object on or off
Parameters : | onoff : bool
|
---|
Notes
See also design.experiment.set_log_level fur further information about event logging.
Get the number of received triggers.
For not missing any triggers the history has to be updated regularly (e.g. by calling this method)! Returns None if no history is used.
If bitwise_comparision = True, the function performs a bitwise comparison (logical and) between code and received input and waits until a certain bit pattern is set.
Parameters code – a specific code to count (int) (optional) bitwise_comparison – make a bitwise comparison (default=False)
Wait for a trigger.
Returns the code received and the reaction time [code, rt].
If bitwise_comparison = True, the function performs a bitwise comparison (logical and) between code and received input and waits until a certain bit pattern is set.
Parameters code – a specific code to wait for (int) (optional) bitwise_comparison – make a bitwise comparison (default=False)