Macros | |
#define | RECORD_FILE_SAMPLES 1 |
#define | RECORD_FILE_EVENTS 2 |
#define | RECORD_LINK_SAMPLES 4 |
#define | RECORD_LINK_EVENTS 8 |
#define | DONE_TRIAL 0 |
#define | TRIAL_OK 0 |
#define | REPEAT_TRIAL 1 |
#define | SKIP_TRIAL 2 |
#define | ABORT_EXPT 3 |
#define | TRIAL_ERROR -1 |
Functions | |
INT16 | eyelink_in_data_block (INT16 samples, INT16 events) |
INT16 | eyelink_wait_for_block_start (UINT32 maxwait, INT16 samples, INT16 events) |
INT16 | eyelink2_mode_data (INT16 *sample_rate, INT16 *crmode, INT16 *file_filter, INT16 *link_filter) |
INT16 | eyelink_mode_data (INT16 *sample_rate, INT16 *crmode, INT16 *file_filter, INT16 *link_filter) |
INT16 | start_recording (INT16 file_samples, INT16 file_events, INT16 link_samples, INT16 link_events) |
INT16 | check_recording (void) |
void | stop_recording (void) |
INT16 | check_record_exit (void) |
Functions and constants to control recording and data collection.
#define ABORT_EXPT 3 |
return codes for trial result
#define DONE_TRIAL 0 |
return codes for trial result
#define RECORD_FILE_EVENTS 2 |
only active if file open
#define RECORD_FILE_SAMPLES 1 |
only active if file open
#define RECORD_LINK_EVENTS 8 |
accept events from link
#define RECORD_LINK_SAMPLES 4 |
accept samples from link
#define REPEAT_TRIAL 1 |
return codes for trial result
#define SKIP_TRIAL 2 |
return codes for trial result
#define TRIAL_ERROR -1 |
Bad trial: no data, etc.
#define TRIAL_OK 0 |
return codes for trial result
INT16 check_record_exit | ( | void | ) |
Checks if we are in Abort menu after recording stopped and returns trial exit code. Call this function on leaving a trial. It checks if the EyeLink tracker is displaying the Abort menu, and handles it if required. The return value from this function should be returned as the trial result code.
TRIAL_OK
if no error.REPEAT_TRIAL, SKIP_TRIAL, ABORT_EXPT
if Abort menu activated.Example: See start_recording()
check_recording()
, eyelink_abort()
, start_recording()
and stop_recording()
INT16 check_recording | ( | void | ) |
Check if we are recording: if not, report an error. Call this function while recording. It will return 0
if recording is still in progress, or an error code if not. It will also handle the EyeLink Abort menu by calling record_abort_handler()
. Any errors returned by this function should be returned by the trial function. On error, this will disable realtime mode and restore the heuristic.
TRIAL_OK (0)
if no error.REPEAT_TRIAL, SKIP_TRIAL, ABORT_EXPT, TRIAL_ERROR
if recording aborted.Example: See start_recording()
check_record_exit()
, eyelink_abort()
, start_recording()
and stop_recording()
INT16 eyelink2_mode_data | ( | INT16 * | sample_rate, |
INT16 * | crmode, | ||
INT16 * | file_filter, | ||
INT16 * | link_filter | ||
) |
INT16 eyelink_in_data_block | ( | INT16 | samples, |
INT16 | events | ||
) |
Checks to see if framing events read from queue indicate that the data is in a block containing samples, events, or both.
eyelink_get_next_data(NULL)
. NOTE: this function did not work reliably in versions of the SLL before v2.0 (did not detect end of blocks). samples | If non-zero, check if in a block with samples. |
events | If non-zero, check if in a block with events. |
0
if no data of either masked type is being sent.Example:
eyelink_data_status()
and eyelink_wait_for_block_start()
INT16 eyelink_mode_data | ( | INT16 * | sample_rate, |
INT16 * | crmode, | ||
INT16 * | file_filter, | ||
INT16 * | link_filter | ||
) |
After calling eyelink_wait_for_block_start()
, or after at least one sample or eye event has been read, returns EyeLink II extended mode data.
sample_rate | NULL , or pointer to variable to be filled with samples per second. |
crmode | NULL , or pointer to variable to be filled with CR mode flag (0 if pupil-only mode, else pupil-CR mode). |
file_filter | NULL , or pointer to variable to be filled with filter level to be applied to file samples (0 = off, 1 = std, 2 = double filter). |
link_filter | NULL , or pointer to variable to be filled with filter level to be applied to link and analog output samples (0 = off, 1 = std, 2 = double filter). |
Example:
Output:
INT16 eyelink_wait_for_block_start | ( | UINT32 | maxwait, |
INT16 | samples, | ||
INT16 | events | ||
) |
Reads and discards events in data queue until in a recording block. Waits for up to <timeout>
milliseconds for a block containing samples, events, or both to be opened. Items in the queue are discarded until the block start events are found and processed. This function will fail if both samples and events are selected but only one of link samples and events were enabled by start_recording()
.
maxwait | Time in milliseconds to wait. |
samples | If non-zero, check if in a block with samples. |
events | If non-zero, check if in a block with events. |
0
if time expired without any data of masked types available.Example:
INT16 start_recording | ( | INT16 | file_samples, |
INT16 | file_events, | ||
INT16 | link_samples, | ||
INT16 | link_events | ||
) |
Starts the EyeLink tracker recording, sets up link for data reception if enabled.
file_samples | If 1 , writes samples to EDF file. If 0 , disables sample recording. |
file_events | If 1 , writes events to EDF file. If 0 , disables event recording. |
link_samples | If 1 , sends samples through link. If 0 , disables link sample access. |
link_events | If 1 , sends events through link. If 0 , disables link event access. |
0
if successful, else trial return code.Example:
void stop_recording | ( | void | ) |
Stops recording, resets EyeLink data mode.
Example: See start_recording()
eyelink_data_stop()
, set_offline_mode()
and start_recording()