Tscope5
cedrusbox.c File Reference

Definitions of cedrusbox functions. More...

Go to the source code of this file.

Functions

Response registration

Cedrusboxes can be used as response devices.

See timer.c for more information about response registration.

int ts5_define_cedrusbox_button (int device, int button)
 Define a cedrusbox button as a response button. More...
 
int ts5_get_num_cedrusboxes ()
 Get the number of cedrusboxes that are connected to the system. More...
 
int ts5_get_num_cedrusbox_buttons (int device)
 Get the number of buttons available on a cedrusbox. More...
 
Trigger input

Cedrusboxes can be used as trigger input devices.

See timer.c for more information about trigger input.

void ts5_define_cedrusbox_trigger_input (int device)
 Define a cedrusbox as a trigger input device. More...
 
void ts5_simulate_cedrusbox_trigger_input (int device, double interval)
 Turn on cedrusbox trigger input simulation. More...
 

Detailed Description

Definitions of cedrusbox functions.

Definition in file cedrusbox.c.

Function Documentation

int ts5_define_cedrusbox_button ( int  device,
int  button 
)

Define a cedrusbox button as a response button.

Parameters
deviceNumber of the cedrusbox (devices are numbered from 1).
buttonNumber of the button (buttons are counted from 1).
Returns
The reponse number associated with the button.

Give a positive number if you want to monitor button press events, a negative number if you want to monitor button release events.

Examples:
cedrusbox01.c.

Definition at line 42 of file cedrusbox.c.

int ts5_get_num_cedrusboxes ( )

Get the number of cedrusboxes that are connected to the system.

Returns
The number of cedrusboxes that are connected to the system.
Examples:
cedrusbox01.c.

Definition at line 112 of file cedrusbox.c.

int ts5_get_num_cedrusbox_buttons ( int  device)

Get the number of buttons available on a cedrusbox.

Parameters
deviceNumber of the cedrusbox (devices are numbered from 1).
Returns
The number of buttons on the cedrusbox.
Examples:
cedrusbox01.c.

Definition at line 128 of file cedrusbox.c.

void ts5_define_cedrusbox_trigger_input ( int  device)

Define a cedrusbox as a trigger input device.

Parameters
deviceNumber of the cedrusbox (devices are numbered from 1).
Examples:
cedrusbox02.c.

Definition at line 161 of file cedrusbox.c.

void ts5_simulate_cedrusbox_trigger_input ( int  device,
double  interval 
)

Turn on cedrusbox trigger input simulation.

Parameters
deviceNumber of the cedrusbox (devices are numbered from 1).
intervalInterval in seconds between two triggers.
Examples:
cedrusbox02.c.

Definition at line 183 of file cedrusbox.c.