[][src]Crate libeyelink_sys

Re-exports

pub use self::_EL_CAL_BEEP as EL_CAL_BEEP;

Structs

DEVENT

@ingroup messaging \brief Floating-point eye event with floating point time

DIOEVENT

@ingroup messaging \brief Button, input, other simple events with floating point time.

DISPLAYINFO
DMESSAGE

@ingroup messaging \brief Message events: usually text but may contain binary data with floating point time.

DSAMPLE

@ingroup messaging \brief Floating-point sample with floating point time

ELINKNODE

\brief Name and address for connection.

EYEBITMAP

@ingroup display \brief Represents a bitmap image

EYECOLOR

@ingroup display \brief Represents an RGB color.

EYEPALETTE

@ingroup display \brief Represents a palette index.

EYEPIXELFORMAT

@ingroup display \brief Represents pixel format of an image or surface.

FEVENT

@ingroup messaging \brief Floating-point eye event

FSAMPLE

@ingroup messaging \brief Floating-point sample

FSAMPLE_RAW

@internal Used to access raw online data.

HOOKFCNS

@ingroup display \brief Structure used set and get callback functions

HOOKFCNS2

@ingroup display \brief Structure used set and get callback functions

IEVENT

@ingroup messaging \brief Integer eye-movement events

ILINKDATA

\brief Class to represent tracker status.

IMAGE_PALDATA

@internal

IMAGE_PALDATA__bindgen_ty_1
IMESSAGE

@ingroup messaging \brief Message events: usually text but may contain binary data

IOEVENT

@ingroup messaging \brief Button, input, other simple events

ISAMPLE

@ingroup messaging \brief Integer sample data

KeyInput

@ingroup display \brief Keyboard input event structure

MICRO

@ingroup access_time_local Structure to hold msec and usec. \sa current_micro

MouseButtonEvent

@ingroup display \brief Mouse button event structure (For future)

MouseMotionEvent

@ingroup display \brief Mouse motion event structure (For future)

_CrossHairInfo

@ingroup display \brief Structure to hold cross hair information.

Constants

ABORT_BX
ABORT_EXPT
ABORT_RESULT
ALT_KEY_DOWN
BAD_ARGUMENT
BAD_FILENAME
BAD_VALUE_RESULT
BINOCULAR
BLINK_EVENTS
BREAKPARSE
BUTTONEVENT
BUTTON_EVENTS
BX_AVERAGE
BX_DARKEN
BX_DOTRANSFER
BX_GRAYSCALE
BX_LIGHTEN
BX_MAXCONTRAST
BX_NODITHER
BX_TXFILE
BYTEDEF
CALIBRATION_AREA_WARNING
CAPS_LOCK_ON
COMMAND_FULL_WARN
CONNECT_TIMEOUT_FAILED
CONTROL_BUFFER
CR_HAIR_COLOR
CR_LEFT_WARNING
CR_LOST_LEFT_WARNING
CR_LOST_RIGHT_WARNING
CR_LOST_WARNING
CR_RECOV_LEFT_WARNING
CR_RECOV_RIGHT_WARNING
CR_RECOV_WARNING
CR_RIGHT_WARNING
CR_WARNING
CTRL_KEY_DOWN
CURS_DOWN
CURS_LEFT
CURS_RIGHT
CURS_UP
DEVENTDEF
DFILE_EVENTS_ON
DFILE_IS_OPEN
DFILE_SAMPLES_ON
DLINK_EVENTS_ON
DLINK_SAMPLES_ON
DONE_BX
DONE_TRIAL
DRECORD_ACTIVE
DROPPED_CONTROL
DROPPED_EVENT
DROPPED_SAMPLE
DSAMPLEDEF
EL1000_TRACKER_MODEL
ELIMAGE_2
ELIMAGE_16
ELIMAGE_16P
ELIMAGE_128HV
ELIMAGE_128HVX
ELIMAGE_256
ELINKADDRSIZE
ELKEY_DOWN
ELKEY_UP
ELKMOD_CAPS
ELKMOD_LALT
ELKMOD_LCTRL
ELKMOD_LMETA
ELKMOD_LSHIFT
ELKMOD_MODE
ELKMOD_NONE
ELKMOD_NUM
ELKMOD_RALT
ELKMOD_RCTRL
ELKMOD_RMETA
ELKMOD_RSHIFT
ELNAMESIZE
ELREMBUFSIZE
EL_CALIBRATE_MODE
EL_DEMO_MENU_MODE
EL_DRIFT_CORR_MODE
EL_IDLE_MODE
EL_IMAGE_MODE
EL_OPTIONS_MENU_MODE
EL_OUTPUT_MENU_MODE
EL_RECORD_MODE
EL_SETUP_MENU_MODE
EL_USER_MENU_1
EL_USER_MENU_2
EL_USER_MENU_3
EL_VALIDATE_MODE
ENDBLINK
ENDEVENTS
ENDFIX
ENDPARSE
ENDSACC
ENDSAMPLES
ENTER_KEY
ESC_KEY
EVENT_GAZERES
EVENT_GAZEXY
EVENT_HREFXY
EVENT_PUPILSIZE
EVENT_PUPILXY
EVENT_STATUS
EVENT_VELOCITY
EXTRA_CHARACTERS_RESULT
F1_KEY
F2_KEY
F3_KEY
F4_KEY
F5_KEY
F6_KEY
F7_KEY
F8_KEY
F9_KEY
F10_KEY
FEVENTDEF
FILEDATA_SIZE_FLAG
FILE_BAD_DATA
FILE_BLOCK_SIZE
FILE_CANT_OPEN
FILE_NO_REPLY
FILE_XFER_ABORTED
FIVE_SAMPLE_MODEL
FIXATION_EVENTS
FIXUPDATE
FIXUPDATE_EVENTS
FIX_AVG_ONLY
FLEFTEYE_EVENTS
FRIGHTEYE_EVENTS
FSAMPLEDEF
FSAMPLERAWDEF
FULL_WARN
HAVE_EVENTS_FLAG
HAVE_LEFT_FLAG
HAVE_RIGHT_FLAG
HAVE_SAMPLES_FLAG
HEAD_POSITION_WARNING
HEAD_VELOCITY_WARNING
HPOS_ANGLE_WARNING
HPOS_BOT_WARNING
HPOS_DISTANCE_WARNING
HPOS_LEFT_WARNING
HPOS_MISSING_WARNING
HPOS_RIGHT_WARNING
HPOS_TOP_WARNING
HPOS_WARNING
IEVENT_BUFFER
ILINKDATAVERSION
ILINKDATA_BUFFER
IMAGETYPE_BMP
IMAGETYPE_GIF
IMAGETYPE_JPEG
IMAGETYPE_PNG
IMAGETYPE_XPM
IMESSAGE_BUFFER
INPUTEVENT
INPUT_EVENTS
INTERP_PUPIL_WARNING
INTERP_SAMPLE_WARNING
IN_DISCONNECT_MODE
IN_DRIFTCORR_MODE
IN_IDLE_MODE
IN_IMAGE_MODE
IN_PLAYBACK_MODE
IN_RECORD_MODE
IN_SETUP_MODE
IN_TARGET_MODE
IN_UNKNOWN_MODE
IN_USER_MENU
INaN
IOEVENT_BUFFER
ISAMPLE_BUFFER
JUNK_KEY
KB_BUTTON
KB_PRESS
KB_RELEASE
KB_REPEAT
KEYINPUT_EVENT
LED_BOT_WARNING
LED_EXTRA_WARNING
LED_LEFT_WARNING
LED_MISSING_WARNING
LED_RIGHT_WARNING
LED_TOP_WARNING
LEFT
LEFTEYEI
LEFTEYE_EVENTS
LEFT_EYE
LINK_BROADCAST
LINK_CONNECTED
LINK_FULL_WARN
LINK_INITIALIZE_FAILED
LINK_IS_TCPIP
LINK_SEND_MAX
LINK_TERMINATED_RESULT
LOST_DATA_EVENT
MATH_ERROR_WARNING
MESSAGEEVENT
MESSAGE_EVENTS
MESSAGE_FULL_WARN
MICRODEF
MISSING
MISSING_DATA
MOUSE_BUTTON_INPUT_EVENT
MOUSE_CURSOR_COLOR
MOUSE_INPUT_EVENT
MOUSE_MOTION_INPUT_EVENT
NINE_SAMPLE_MODEL
NO_REPLY
NUM_LOCK_ON
OK_RESULT
PAGE_DOWN
PAGE_UP
PARSEDBY_GAZE
PARSEDBY_HREF
PARSEDBY_PUPIL
PAUSE_BX
PUPIL_BOX_COLOR
PUPIL_DIA_FLAG
PUPIL_HAIR_COLOR
READ_AVG
READ_AVGPOS
READ_BEG
READ_BEGPOS
READ_END
READ_ENDPOS
READ_ENDTIME
READ_GAZEXY
READ_GRES
READ_HREFXY
READ_PUPILXY
READ_SIZE
READ_STATUS
READ_VEL
RECORD_FILE_EVENTS
RECORD_FILE_SAMPLES
RECORD_LINK_EVENTS
RECORD_LINK_SAMPLES
REPEAT_TRIAL
RIGHT
RIGHTEYEI
RIGHTEYE_EVENTS
RIGHT_EYE
SACCADE_EVENTS
SAMPLE_ADD_OFFSET
SAMPLE_BUTTONS
SAMPLE_GAZERES
SAMPLE_GAZEXY
SAMPLE_HEADPOS
SAMPLE_HREFXY
SAMPLE_INPUTS
SAMPLE_LEFT
SAMPLE_PUPILSIZE
SAMPLE_PUPILXY
SAMPLE_RIGHT
SAMPLE_STATUS
SAMPLE_TAGGED
SAMPLE_TIMESTAMP
SAMPLE_TYPE
SAMPLE_UTAGGED
SCENECAM_ALIGN_MODE
SCENECAM_DEPTH_MODE
SEARCH_LIMIT_BOX_COLOR
SEVENTEEN_SAMPLE_MODEL
SHIFT_KEY_DOWN
SKIP_TRIAL
STARTBLINK
STARTEVENTS
STARTFIX
STARTPARSE
STARTSACC
STARTSAMPLES
START_TIME_ONLY
SV_MAKEPATH
SV_NOREPLACE
SYNTAX_ERROR_RESULT
TERMINATE_KEY
TFLAG_ANGLE
TFLAG_CLOSE
TFLAG_E_BSIDE
TFLAG_E_LSIDE
TFLAG_E_RSIDE
TFLAG_E_TSIDE
TFLAG_FAR
TFLAG_MISSING
TFLAG_NEAREYE
TFLAG_T_BSIDE
TFLAG_T_LSIDE
TFLAG_T_RSIDE
TFLAG_T_TSIDE
TRACKER_BUSY
TRIAL_ERROR
TRIAL_OK
UNEXPECTED_EOL_RESULT
WRONG_LINK_VERSION
_EL_CAL_BEEP_EL_CAL_DONE_ERR_BEEP

Calibration Done error beep

_EL_CAL_BEEP_EL_CAL_DONE_GOOD_BEEP

Calibration Done correct beep

_EL_CAL_BEEP_EL_CAL_TARG_BEEP

Calibration target present beep

_EL_CAL_BEEP_EL_DC_DONE_ERR_BEEP

Drift Correct Done error beep

_EL_CAL_BEEP_EL_DC_DONE_GOOD_BEEP

Drift Correct Done correct beep

_EL_CAL_BEEP_EL_DC_TARG_BEEP

Drift Correct target present beep

Statics

eye_broadcast_address
our_address
rem_broadcast_address

Functions

alert_printf

displays general STOP-icon alert box text is formatted via printf-like arguments When an error occurs, a notification must be given to the user. If no alert_printf_hook is set, this function uses the Windows MessageBox() function in windows. On other platforms printf is called.

application_terminated
begin_realtime_mode

Sets up for realtime execution (minimum delays) This may take some time (assume up to 100 msec) sets min time so delay may be useful Effects vary by operating system Keyboard, mouse, and sound may be disabled in some OS Has little effect in Win9x/ME Sets the application priority and cleans up pending Windows activity to place the application in realtime mode. This could take up to 100 milliseconds, depending on the operation system, to set the application priority. Use the \c <delay> value to set the minimum time this function takes, so that this function can act as a useful delay.

break_pressed

@ingroup keyinput Tests if the program is being interrupted. You should break out of loops immediately if this function does not return \c 0, if \c getkey() return \c TERMINATE_KEY, or if \c eyelink_is_connected() returns \c 0.

check_filename_characters

@ingroup datafile Checks file name for legality. Attempts to ensure cross-platform for viewer. No spaces allowed as this interferes with messages. Assume viewer will translate forward/backward slash. Windows: don't allow <>:"/| Also, device names, such as aux, con, lpt1, and prn are not allowed in windows. forward slashes is missed.

check_record_exit

call at end of trial, return result * check if we are in Abort menu after recording stopped * returns trial exit code * 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.

check_recording

Check if we are recording: if not, report an error * Also calls record_abort_hide() if recording aborted * Returns 0 if recording in progress * Returns ABORT_EXPT if link disconnected * Handles recors abort menu if trial interrupted * Returns TRIAL_ERROR if other non-recording state * Typical use is * if((error=check_recording())!=0) return error; * Check if we are recording: if not, report an error. Call this function while recording. It will return \c 0 if recording is still in progress, or an error code if not. It will also handle the EyeLink Abort menu by calling \c 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.

close_data_file

Closes EDF file on tracker hard disk Closes any open EDF file.

close_eyelink_connection

@ingroup init_eyelink Closes any connection to the eye tracker, and closes the link.

close_eyelink_system

@ingroup init_eyelink Resets the EyeLink library, releases the system resources used by the millisecond clock.

close_message_file

@ingroup message_file Flush and close message file, opened by open_message_file.

create_path

@ingroup datafile Checks if path exists. Will create directory if 'create'. Creates directory from last name in 'path', unless ends with '' or 'is_dir' nonzero. Otherwise, last item is assumed to be filename and is dropped.

current_double_usec

@ingroup access_time_local Returns the current microsecond as double (56 bits) since the initialization. Equivalent to \c current_micro() and \c current_usec().

current_micro

@ingroup access_time_local Returns the current microsecond since the initialization. Equivalent to \c current_usec() and \c current_double_usec().

current_time

@ingroup access_time_local Returns the current millisecond since the initialization.

current_usec

@ingroup access_time_local Returns the current microsecond since the initialization. Equivalent to \c current_micro() and \c current_double_usec().

do_drift_correct

PERFORM DRIFT CORRECTION ON TRACKER Performs a drift correction, with target at (x,y). * If operator aborts with ESC, we assume there's a setup * problem and go to the setup menu (which may clear the * display). Redraw display if needed and repeat the * call to do_drift_correct() in this case. * ARGS: x, y: position of target * draw: draws target if 1, 0 if you draw target first * allow_setup: 0 disables ESC key setup mode entry * RETURNS: 0 if OK, 27 if Setup was called, TERMINATE_KEY if pressed * Performs a drift correction before a trial.

do_drift_correctf

@ingroup setup_eyelink Performs a drift correction before a trial. Same as do_drift_correct() except, this takes the x,y values as float.

do_tracker_setup

Starts tracker into Setup Menu. * From this the operator can do camera setup, calibrations, etc. * Pressing ESC on the tracker exits. * Leaving the setup menu on the tracker (ESC) key) also exits. * RETURNS: 0 if OK, 27 if aborted, TERMINATE_KEY if pressed * Switches the EyeLink tracker to the Setup menu, from which camera setup, calibration, validation, drift correction, and configuration may be performed. Pressing the 'ESC' key on the tracker keyboard will exit the Setup menu and return from this function. Calling \c exit_calibration() from an event handler will cause any call to \c do_tracker_setup() in progress to return immediately.

echo_key

Calls getkey(), also sends keys to tracker for remote control * User implementation allows filtering of keys before sending * returns same codes as getkey() * Checks for Windows keystroke events and dispatches messages; similar to \c getkey(), but also sends keystroke to tracker.

el_bitmap_save

@ingroup bitmap_save This function saves the entire bitmap or selected part of a bitmap in an image file (with an extension of .png, .bmp, .jpg, or .tif). It creates the specified file if this file does not exist.

el_bitmap_save_and_backdrop

@ingroup bitmap_save This function saves the entire bitmap as a .BMP, .JPG, .PNG, or .TIF file, and transfers the image to tracker as backdrop for gaze cursors.

el_bitmap_to_backdrop

@ingroup bitmap_save This function transfers the bitmap to the tracker PC as backdrop for gaze cursors.

end_realtime_mode

Exits realtime execution mode Typically just lowers priority Returns the application to a priority slightly above normal, to end realtime mode. This function should execute rapidly, but there is the possibility that Windows will allow other tasks to run after this call, causing delays of 1-20 milliseconds.

escape_pressed

@ingroup keyinput This function tests if the 'ESC' key is held down, and is usually used to break out of nested loops. This does not allow processing of Windows messages, unlike \c getkey().

exit_calibration

CALIBRATION, DRIFT CORRECTION CONTROL Call this to stop calibration/drift correction in progress This could be called from a Windows message handler This function should be called from an message or event handler if an ongoing call to \c do_drift_correct() or \c do_tracker_setup() should return immediately.

eyecmd_printf

link command formatting * use just like printf() * returns command result * allows 500 msec. for command to finish * The EyeLink tracker accepts text commands through the link. These commands may be used to configure the system, open data files, and so on.

eyelink2_mode_data

@ingroup recording \deprecated Use \c eyelink_mode_data() instead.

eyelink_abort

@ingroup setup_eyelink Places EyeLink tracker in off-line (idle) mode.

eyelink_abort_image

@internal

eyelink_accept_trigger

@ingroup setup_eyelink Triggers the EyeLink tracker to accept a fixation on a target, similar to the 'Enter' key or spacebar on the tracker.

eyelink_apply_driftcorr

@ingroup setup_eyelink Applies the results of the last drift correction. This is not done automatically after a drift correction, allowing the message returned by \c eyelink_cal_message() to be examined first.

eyelink_bitmap_ack_count

@internal Get bitmap ack count. Negative: special code or sequence number to restart at. Reading resets count to 0. @remark This function is strictly internal. If you need to send bitmap to the tracker, use el_bitmap_to_backdrop(), gdi_bitmap_to_backdrop() or sdl_bitmap_to_backdrop().

eyelink_bitmap_packet

@internal Send bitmap data packet to tracker. @remark This function is strictly internal. If you need to send bitmap to the tracker, use el_bitmap_to_backdrop(), gdi_bitmap_to_backdrop() or sdl_bitmap_to_backdrop(). @param data pointer of the data to be sent. @param size size of the data to be sent. @param seq \c 1 for first packet, increases thereafter.

eyelink_broadcast_open

@ingroup init_eyelink Allows a third computer to listen in on a session between the eye tracker and a controlling remote machine. This allows it to receive data during recording and playback, and to monitor the eye tracker mode. The local computer will not be able to send commands to the eye tracker, but may be able to send messages or request the tracker time.

eyelink_button_states

@ingroup elbutton Returns a flag word with bits set to indicate which tracker buttons are currently pressed. This is button 1 for the LSB, up to button 16 for the MSB.

eyelink_cal_message

@ingroup setup_eyelink Returns text associated with result of last calibration, validation, or drift correction. This usually specifies errors or other statistics.

eyelink_cal_result

@ingroup setup_eyelink Checks for a numeric result code returned by calibration, validation, or drift correction.

eyelink_calculate_overallvelocity_and_acceleration

@ingroup velocity_acceleration Calculates overall velocity and acceleration for left and right eyes separately. @param[in] slen Sample model to use for velocity calculation. Acceptable models are \c FIVE_SAMPLE_MODEL, \c NINE_SAMPLE_MODEL, \c SEVENTEEN_SAMPLE_MODEL and \c EL1000_TRACKER_MODEL. @param[out] vel A float array of 2 to fill in the calculated velocity results. Upon return of this function, vel[0] will contain overall velocity for left eye and vel[1] will contain overall velocity for right eye. If velocity cannot be calculated for any reason(eg. insufficient samples, no data) MISSING_DATA is filled for the given velocity. @param[out] acc A float array of 2 to fill in the calculated acceleration results. Upon return of this function, acc[0] will contain overall acceleration for left eye and acc[1] will contain overall acceleration for right eye. If acceleration cannot be calculated for any reason(eg. insufficient samples, no data) MISSING_DATA is filled for the given acceleration. @param[out] vel_sample Velocity for sample. Expects a FSAMPLE structure to fill in the sample, the velocity is calculated for.

eyelink_calculate_velocity

@ingroup velocity_acceleration Calculates overall velocity for left and right eyes separately. @param[in] slen Sample model to use for velocity calculation. Acceptable models are \c FIVE_SAMPLE_MODEL, \c NINE_SAMPLE_MODEL, \c SEVENTEEN_SAMPLE_MODEL and \c EL1000_TRACKER_MODEL. @param[out] vel A float array of 2 to fill in the calculated results. Upon return of this function, vel[0] will contain overall velocity for left eye and vel[1] will contain overall velocity for right eye. If velocity cannot be calculated for any reason(eg. insufficient samples, no data) MISSING_DATA is filled for the given velocity. @param[out] vel_sample Velocity for sample. Expects a FSAMPLE structure to fill in the sample, the velocity is calculated for.

eyelink_calculate_velocity_x_y

@ingroup velocity_acceleration Calculates left x velocity, left y velocity, right x velocity and right y velocity from queue of samples. @param[in] slen Sample model to use for velocity calculation. Acceptable models are \c FIVE_SAMPLE_MODEL, \c NINE_SAMPLE_MODEL, \c SEVENTEEN_SAMPLE_MODEL and \c EL1000_TRACKER_MODEL. @param[out] xvel Left and right x velocity. Expects an array of 2 elements of floats. The array is filled with left and right velocity values. Upon return of this function xvel[0] contains the left x velocity data and xvel[1] contains right x velocity data. If velocity cannot be calculated for any reason(eg. insufficient samples, no data) MISSING_DATA is filled for the given velocity. @param[out] yvel Left and right y velocity. Expects an array of 2 elements of floats. The array is filled with left and right velocity values. Upon return of this function yvel[0] contains the left y velocity data and xvel[1] contains right y velocity data. If velocity cannot be calculated for any reason(eg. insufficient samples, no data) MISSING_DATA is filled for the given velocity. @param[out] vel_sample Velocity for sample. Expects a FSAMPLE structure to fill in the sample, the velocity is calculated for.

eyelink_close

@ingroup init_eyelink Sends a disconnect message to the EyeLink tracker, resets the link data system.

eyelink_command_result

@ingroup messaging Check for and retrieves the numeric result code sent by the tracker from the last command.

eyelink_current_mode

@ingroup eyelink_mode This function tests the current tracker mode, and returns a set of flags based of what the mode is doing. The most useful flag using the EXPTSPPT toolkit is \c IN_USER_MENU to test if the EyeLink Abort menu has been activated.

eyelink_data_count

@ingroup messaging Counts total items in queue: samples, events, or both.

eyelink_data_start

@ingroup messaging Switches tracker to Record mode, enables data types for recording to EDF file or sending to link. These types are set with a bitwise OR of these flags: \arg RECORD_FILE_SAMPLES (1) - only active if file open. \arg RECORD_FILE_EVENTS (2) - only active if file open. \arg RECORD_LINK_SAMPLES (4) - accept samples from link. \arg RECORD_LINK_EVENTS (8) - accept events from link.

eyelink_data_status
eyelink_data_stop

@ingroup messaging Places tracker in idle (off-line) mode, does not flush data from queue.

eyelink_data_switch

@ingroup messaging

eyelink_dll_version

Returns the eyelink_core library version number. @param[out] c fills in the version number of th eyelink_core library.

eyelink_double_usec_offset

@ingroup access_time_tracker Returns the time difference between the tracker time and display pc time.

eyelink_draw_cross_hair

@ingroup display Convenient function to draw cross hair on camera image. It is very tedious to draw and maintain cross hair drawing. This is due to evolving eyelink camera image protocol and the introduction of newer trackers and still single library handle all eyelink trackers. eyelink_draw_cross_hair fixes this issue by allowing the drawing function to draw to the device contexts and does all magic of extracting cursor info from the tracker.

eyelink_driftcorr_start

@ingroup setup_eyelink Sets the position of the drift correction target, and switches the tracker to drift-correction mode. Should be followed by a call to \c eyelink_wait_for_mode_ready().

eyelink_driftcorr_startf

@ingroup setup_eyelink Sets the position of the drift correction target, and switches the tracker to drift-correction mode. Should be followed by a call to \c eyelink_wait_for_mode_ready(). Same as eyelink_driftcorr_start() except the x,y parameters take floating point values.

eyelink_dummy_open

@ingroup init_eyelink Sets the EyeLink library to simulate an eyetracker connection. Functions will return plausible values, but no data.

eyelink_enable_extended_realtime
eyelink_end_file_transfer

@ingroup datafile Aborts send of file. @return \c 0 if OK, else send error. @remark Internal function. use receive_data_file()

eyelink_event_data_flags

@ingroup messaging Returns the event data content flags.

eyelink_event_type_flags

@ingroup messaging After at least one button or eye event has been read, can be used to check what type of events will be available.

eyelink_eye_available

@ingroup messaging After calling \c eyelink_wait_for_block_start(), or after at least one sample or eye event has been read, can be used to check which eyes data is available for.

eyelink_flush_input_event
eyelink_flush_keybuttons

@ingroup elbutton Causes the EyeLink tracker and the EyeLink library to flush any stored button or key events. This should be used before a trial to get rid of old button responses. The \c <enable_buttons> argument controls whether the EyeLink library will store button press and release events. It always stores tracker key events. Even if disabled, the last button pressed and button flag bits are updated.

eyelink_gaze_to_href

@ingroup extra_data Apply gaze->href to point (xp, yp). This function requires HREFPT data in FSAMPLE. The function \c eyelink_initialize_mapping() should be called before calling this function. @param xp X point to apply gaze->href. @param yp Y point to apply gaze->href. @param sample Sample. @return \c 0 if OK, \c -1 if there is a math error, \c -2 if the tracker does not support this operation.

eyelink_get_double_data

@ingroup messaging Reads the last item fetched by \c eyelink_get_next_data() into a buffer. The event is converted to a floating-point format with floating point time (\c DSAMPLE or \c DEVENT). This can handle both samples and events. The buffer type can be \c ALLD_DATA for both samples and events, \c DSAMPLE for a sample, or a specific event buffer.

eyelink_get_error

@ingroup error_reporting Returns error description for given function with error id.

eyelink_get_extra_raw_values
eyelink_get_extra_raw_values_v2
eyelink_get_file_block

@ingroup datafile Get next block of file. If \c <offset> is not \c NULL, will be filled with block-start offset in file.

eyelink_get_float_data

@ingroup messaging Reads the last item fetched by \c eyelink_get_next_data() into a buffer. The event is converted to a floating-point format (\c FSAMPLE or \c FEVENT). This can handle both samples and events. The buffer type can be \c ALLF_DATA for both samples and events, \c FSAMPLE for a sample, or a specific event buffer.

eyelink_get_input_event
eyelink_get_last_data

@ingroup messaging Gets an integer (unconverted) copy of the last/newest link data (sample or event) seen by \c eyelink_get_next_data().

eyelink_get_line

@internal Gets unpacked line data. @return \c -1 if error/not rx, else line number.

eyelink_get_next_data

@ingroup messaging Fetches next data item from link buffer. Usually called with \c <buf> = \c NULL, and returns the data item type. If the item is not wanted, simply ignore it. Otherwise, call \c eyelink_get_float_data() to read it into a buffer.

eyelink_get_node

@ingroup init_eyelink Reads the responses returned by other trackers or remotes in response to \c eyelink_poll_trackers() or \c eyelink_poll_remotes(). It can also read the tracker broadcast address and remote broadcast addresses.

eyelink_get_palette

@internal

eyelink_get_sample

@ingroup messaging Gets an integer (unconverted) sample from end of queue, discards any events encountered.

eyelink_get_tracker_version

@ingroup init_eyelink After connection, determines if the connected tracker is an EyeLink I or II.

eyelink_href_angle

@ingroup extra_data Convenient function to calculate the href angle. @param x1 Point 1 x. @param y1 Point 1 y. @param x2 Point 2 x. @param y2 Point 2 y.

eyelink_href_resolution

@ingroup extra_data Convenient function to calculate the href resolution. @param x X value of point. @param y Y value of point. @param xres Pointer to return the x resolution. @param yres Pointer to return the y resolution.

eyelink_href_to_gaze

@ingroup extra_data Apply href->gaze to point (xp, yp). This function requires HREFPT data in FSAMPLE. The function \c eyelink_initialize_mapping() should be called before calling this function. @param xp X point to apply href->gaze. @param yp Y point to apply href->gaze. @param sample Sample. @return \c 0 if OK, \c -1 if there is a math error, \c -2 if the tracker does not support this operation.

eyelink_image_data

@internal Get data at start of new image. @return \c -1 if aborted/not in receive, \c 0 if old palette, \c 1 if new palette. ptrs to size: may be NULL

eyelink_image_status

@internal

eyelink_in_data_block

@ingroup recording Checks to see if framing events read from queue indicate that the data is in a block containing samples, events, or both.

eyelink_in_setup

@ingroup setup_eyelink Checks if tracker is still in a Setup menu activity (includes camera image view, calibration, and validation). Used to terminate the subject setup loop.

eyelink_initialize_mapping

@ingroup extra_data Function to initialize the gaze to href and href to gaze mapping. This function should be called before calling \c eyelink_href_to_gaze() or \c eyelink_gaze_to_href(). @param left Left pixel value (normally 0). @param top Top pixel value (normally 0). @param right Right pixel value (width of the display). @param bottom Bottom pixel value (height of the display). @return \c -1 if the tracker does not support the commands, href_point_eye set_href_point

eyelink_is_connected

@ingroup init_eyelink Checks whether the connection to the tracker is alive.

eyelink_last_button_press

@ingroup elbutton Reads the number of the last button detected by the EyeLink tracker. This is \c 0 if no buttons were pressed since the last call, or since the buttons were flushed. If a pointer to a variable is supplied the eye-tracker timestamp of the button may be read. This could be used to see if a new button has been pressed since the last read. If multiple buttons were pressed since the last call, only the last button is reported.

eyelink_last_button_states

@ingroup elbutton Returns a flag word with bits set to indicate which tracker buttons are currently pressed. This is button 1 for the LSB, up to button 16 for the MSB. Same as eyelink_button_states() except, optionally time of the button states can be acquired.

eyelink_last_message

@ingroup messaging Checks for and gets the last packet received, stores the data and the node address sent from.

eyelink_mode_data

@ingroup recording After calling \c eyelink_wait_for_block_start(), or after at least one sample or eye event has been read, returns EyeLink II extended mode data.

eyelink_msec_offset

@ingroup access_time_tracker Returns the time difference between the tracker time and display pc time.

eyelink_newest_double_sample

@ingroup messaging Check if a new sample has arrived from the link. This is the latest sample, not the oldest sample that is read by \c eyelink_get_next_data(), and is intended to drive gaze cursors and gaze-contingent displays. Typically the function is called with a \c NULL buffer pointer, to test if new data has arrived. If a value of \c 1 is returned, the function is called with a \c DSAMPLE buffer to get the new sample.

eyelink_newest_float_sample

@ingroup messaging Check if a new sample has arrived from the link. This is the latest sample, not the oldest sample that is read by \c eyelink_get_next_data(), and is intended to drive gaze cursors and gaze-contingent displays. Typically the function is called with a \c NULL buffer pointer, to test if new data has arrived. If a value of \c 1 is returned, the function is called with a \c FSAMPLE buffer to get the new sample.

eyelink_newest_sample

@ingroup messaging Gets an integer (unconverted) copy of the last/newest link data (sample or event) seen by \c eyelink_get_next_data().

eyelink_node_receive

@ingroup messaging Checks for and gets the last packet received, stores the data and the node address sent from.

eyelink_node_request_time

@ingroup access_time_tracker Sends a request the connected eye tracker to return its current time.

eyelink_node_send

@ingroup messaging Sends a given data to the given node.

eyelink_node_send_message

@ingroup messaging Sends a text message the connected eye tracker. The text will be added to the EDF file.

eyelink_node_send_message_ex

@ingroup messaging Send a data file message to any or all trackers with time offset. @param exectime time offset. If the offset is 0, this function is the same as eyelink_node_send_message() @param node Node address @param msg Message to be sent @return \c OK_RESULT or \c LINK_TERMINATED_RESULT. @sa eyelink_node_send_message()

eyelink_open

@ingroup init_eyelink Attempts to open a link connection to the EyeLink tracker. Simple connect to single Eyelink tracker. Equivalent to \c eyelink_open_node(broadcast_address, 0).

eyelink_open_node

@ingroup init_eyelink Allows the computer to connect to tracker, where the tracker is on the same network.

eyelink_peep_input_event
eyelink_peep_last_input_event
eyelink_playback_start

@ingroup playback Flushes data from queue and starts data playback. An EDF file must be open and have at least one recorded trial. Use \c eyelink_wait_for_data() to wait for data: this will time out if the playback failed. Playback begins from start of file or from just after the end of the next-but-last recording block. Link data is determined by file contents, not by link sample and event settings.

eyelink_playback_stop

@ingroup playback Stops playback if in progress. Flushes any data in queue.

eyelink_poll_remotes

@ingroup init_eyelink Asks all non-tracker computers (with EyeLink software running) on the network to send their names and node address.

eyelink_poll_responses

@ingroup init_eyelink Returns the count of node addresses received so far following the call of \c eyelink_poll_remotes() or \c eyelink_poll_trackers().

eyelink_poll_trackers

@ingroup init_eyelink Asks all trackers (with EyeLink software running) on the network to send their names and node address.

eyelink_position_prescaler

@ingroup messaging Returns the divisor used to convert integer eye data to floating point data.

eyelink_quiet_mode

@ingroup init_eyelink Controls the level of control an application has over the tracker.

eyelink_read_keybutton

@ingroup elbutton Reads any queued key or button events from tracker.

eyelink_read_reply

@ingroup messaging Returns text with reply to last read request.

eyelink_read_request

@ingroup messaging Sends a text variable name whose value is to be read and returned by the tracker as a text string.

eyelink_read_time

@ingroup access_time_tracker Returns the tracker time requested by \c eyelink_request_time() or \c eyelink_node_request_time().

eyelink_request_file_block

@ingroup datafile Ask for next block of file, reads from \c <offset>. @remark Internal function. use receive_data_file()

eyelink_request_file_read

@ingroup datafile Request send of file "src". If "", gets last data file. @return \c 0 if OK, else send error. @remark Internal function. use receive_data_file()

eyelink_request_image

@internal

eyelink_request_time

@ingroup access_time_tracker Sends a request the connected eye tracker to return its current time.

eyelink_reset_clock

@ingroup access_time_local Initializes the high frequency clock.

eyelink_reset_data

@ingroup messaging Prepares link buffers to receive new data. If \c <clear> is nonzero, removes old data from buffer.

eyelink_sample_data_flags

@ingroup messaging Gets sample data content flag (\c 0 if not in sample block).

eyelink_send_command

@ingroup messaging Sends a command to the connected eye tracker.

eyelink_send_keybutton

@ingroup elbutton Sends a key or button event to tracker. Only key events are handled for remote control.

eyelink_send_message

@ingroup messaging Sends a text message the connected eye tracker. The text will be added to the EDF file.

eyelink_send_message_ex

@ingroup messaging Send a data file message string to connected tracker with time offset. @param exectime time offset. If the offset is 0, this function is the same as eyelink_send_message() @param msg Message to be sent @return \c OK_RESULT or \c LINK_TERMINATED_RESULT. @sa eyemsg_printf_ex(), eyelink_send_message()

eyelink_set_name

@ingroup init_eyelink Sets the node name of this computer (up to 35 characters).

eyelink_set_tracker_node

@ingroup init_eyelink

eyelink_start_setup

@ingroup setup_eyelink Enters setup mode

eyelink_target_check

@ingroup setup_eyelink Returns the current target position and state.

eyelink_target_checkf

@ingroup setup_eyelink Returns the current target position and state. Same as eyelink_target_check() except this function returns data in floating point values.

eyelink_timed_command

@ingroup messaging Sends a command to the connected eye tracker, wait for reply.

eyelink_tracker_double_usec

@ingroup access_time_tracker Returns the current tracker time (in micro seconds) since the tracker application started.

eyelink_tracker_mode

@ingroup eyelink_mode Returns raw EyeLink mode numbers, defined in eyelink.h as EL_xxxx definitions.

eyelink_tracker_msec

@ingroup access_time_tracker Returns the current tracker time (in milliseconds) since the tracker application started.

eyelink_user_menu_selection

@ingroup eyelink_mode Checks for a user-menu selection, clears response for next call.

eyelink_wait_for_block_start

@ingroup recording Reads and discards events in data queue until in a recording block. Waits for up to \c <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 \c start_recording().

eyelink_wait_for_data

@ingroup messaging Waits for data to be received from the eye tracker. Can wait for an event, a sample, or either. Typically used after record start to check if data is being sent.

eyelink_wait_for_mode_ready

@ingroup eyelink_mode After a mode-change command is given to the EyeLink tracker, an additional 5 to 30 milliseconds may be needed to complete mode setup. Call this function after mode change functions.

eyemsg_printf

link message formatting * use just like printf() * returns any send error * This sends a text message to the EyeLink tracker, which timestamps it and writes it to the EDF data file. Messages are useful for recording trial conditions, subject responses, or the time of important events. This function is used with the same formatting methods as printf(), allowing numbers to be included. Avoid end-of-line characters ("\n") at end of messages.

eyemsg_printf_ex

@ingroup messaging This allows us to send messages to the Eyelink tracker to be logged into the data file with a time offset. Use it just like printf() to format the message text.

file_exists

@ingroup datafile Checks if file and/or path exists. @returns \c 0 if does not exist, \c 1 if exists, \c -1 if cannot overwrite.

flush_getkey_queue

Initializes and empties local key queue Initializes the key queue used by \c getkey(). This should be called at the start of your program. It may be called at any time to get rid any of old keys from the queue.

get_all_hook_functions
get_all_hook_functions_V2

@ingroup display Returns a pointer to HOOKFCNS2, with values that are set by setup_graphic_hook_functions_V2().

get_image_xhair_data

@ingroup display \deprecated Use eyelink_draw_cross_hair() instead.

getkey

EYELINK tracker (MS-DOS) key scan equivalent Processes Windows messages, records key events Returns 0 if no key pressed returns 1-255 for non-extended keys returns 0x##00 for extended keys (##=hex code) A routine for checking for Windows keystroke events, and dispatching Windows messages. If no key is pressed or waiting, it returns \c 0. For a standard ASCII key, a value from \c 31 to \c 127 is returned. For extended keys, a special key value is returned. If the program has been terminated by ALT-F4 or a call to \c terminal_break(), or the "Ctrl" and "C" keys are held down, the value \c TERMINATE_KEY is returned. The value JUNK_KEY (1) is returned if a non-translatable key is pressed. @remarks Warning: This function processes and dispatches any waiting messages. This will allow Windows to perform disk access and negates the purpose of realtime mode. Usually these delays will be only a few milliseconds, but delays over 20 milliseconds have been observed. You may wish to call \c escape_pressed() or \c break_pressed() in recording loops instead of \c getkey() if timing is critical, for example in a gaze-contingent display. Under Windows XP and later, for single core system, these calls will not work in realtime mode at all (although these do work under Windows 2000). Under Windows 95/98/Me, realtime performance is impossible even with this strategy.\n Some useful keys are defined in core_expt.h, as:\n \arg \c CURS_UP \c 0x4800 \arg \c CURS_DOWN \c 0x5000 \arg \c CURS_LEFT \c 0x4B00 \arg \c CURS_RIGHT \c 0x4D00 \arg \c ESC_KEY \c 0x001B \arg \c ENTER_KEY \c 0x000D \arg \c TERMINATE_KEY \c 0x7FFF \arg \c JUNK_KEY \c 0x0001 @return \c 0 if no key pressed, else key code.\n \c TERMINATE_KEY if CTRL-C held down or program has been terminated.

getkey_with_mod

@ingroup keyinput Same as getkey except it returns the modifier and the key pressed. It returns a 32 bit unsigned integer. The first 16 bits are reserved for the modifier and the last 16 bits are reserved for the key values. If there are no modifiers present, the return value of this is the same as getkey(). If non null pointer passed in for unicode, the translated key value will be set if a key is preent.

image_mode_display

(USED BY do_tracker_setup(), YOU DO NOT NEED TO CALL normally * This handles display of the EyeLink camera images. While in imaging mode, it contiuously requests and displays the current camera image. It also displays the camera name and threshold setting. Keys on the subject PC keyboard are sent to the tracker, so the experimenter can use it during setup. It will exit when the tracker leaves imaging mode or disconnects.

in_realtime_mode

@ingroup priority returns whether the current mode is real-time.

key_message_pump

@ingroup pump Similar to \c message_pump(), but only processes keypresses. This may help reduce latency.

message_pump

allows messages to operate in loops returns nonzero if app terminated eats key events, places on key queue for getkey() getkey() and echo_key() also call this function

msec_delay

@ingroup access_time_local Does a unblocked delay using \c current_time().

open_data_file

These functions were added as future revisions of EyeLink might require significant time to open and close EDF files Opens EDF file on tracker hard disk Opens an EDF file, closes any existing file.

open_eyelink_connection

@ingroup init_eyelink Initializes the EyeLink library, and opens a connection to the EyeLink tracker.

open_eyelink_system

@ingroup init_eyelink Use this function to initialize the EyeLink library. This will also start the millisecond clock. No connection is attempted to the eyetracker yet. It is preferable to call open_eyelink_connection(\c -1) instead, as this prepares other parts of the DLL for use.

open_message_file

@ingroup message_file Creates message file, once open call to timemsg_printf(), will not send messages to tracker. Messages are kept in a queue if the application is in realtime mode, and written to disk on non real-time mode except when close_message_file() is called while in real-time mode. @param[in] fname Message file name

pump_delay

Similar to msec_delay(), but allows Widows message process only allows message processing if delay > 20 msec does not process dialog box messages During calls to \c msec_delay(), Windows is not able to handle messages. One result of this is that windows may not appear. This is the preferred delay function when accurate timing is not needed. It calls \c message_pump() until the last 20 milliseconds of the delay, allowing Windows to function properly. In rare cases, the delay may be longer than expected. It does not process modeless dialog box messages.

read_getkey_queue

Similar to getkey(), but doesnt call message pump Use to build message pump for your own window Reads keys from the key queue. It is similar to \c getkey(), but does not process Windows messages. This can be used to build key-message handlers in languages other than C.

receive_data_file

THIS ROUTINE MAY NEED TO BE CREATED FOR EACH PLATFORM * This call should be implemented for a standard programming interface * Copies tracker file to local file . * If specifying full file name, be sure to add ".edf" * extensions for data files. * If = "", tracker will send last opened data file. * If is NULL or "", creates local file with source file name. * Else, creates file using as name. If <dest_is_path> != 0 * uses source file name but adds as directory path. * returns: file size if OK, negative = error code * This receives a data file from the EyeLink tracker PC. \param[in] src Name of eye tracker file (including extension). If "" (empty string), asks tracker for name of last opened data file. \param[in] dest Name of local file to write to (including extension). This must be a valid file name or directory name. \param[in] dest_is_path If nonzero, appends file name to <dest> as a directory path. \return \c 0 if file transfer was cancelled.\n Size of file if successful.\n \c -1 if file size is negative.\n \c -2 if cannot create local file.\n \c -3 if file transfer was cancelled.\n \c -4 if file transfer was aborted.\n \c -5 if error occurred while writing file.\n \c -6 if link was terminated.\n

receive_data_file_feedback

exact same as receive_data_file. except the feedback parameters can be used for showing what is the full size of the edf file and howmuch is received so far. this function is currently used internally only. This receives a data file from the EyeLink tracker PC. Exact same as \c receive_data_file(). except the feedback parameters can be used for showing what is the full size of the edf file and how much is received so far. This function is currently used internally only.

receive_data_file_feedback_v2
send_data_file_feedback

@ingroup datafile This function sends a file to the Eyelink tracker. Source destination file name should be given. Using this function, an image or video can be uploaded from the display PC to the host Tracker PC. The image can later be used as a Gaze Cursor Backdrop via a call to eyelink_send_command().

set_application_priority

@ingroup priority Changes the multitasking proirity of current application Using THREAD_PRIORITY_ABOVE_NORMAL may reduce latency Reset priority with THREAD_PRIORITY_NORMAL Too high priority will stop the link from functioning! @deprecated This function is depricated. It is left for compatibility reasons. The implementation does nothing.

set_eyelink_address

@ingroup init_eyelink Sets the IP address used for connection to the EyeLink tracker. This is set to "100.1.1.1" in the DLL, but may need to be changed for some network configurations. This must be set before attempting to open a connection to the tracker.

set_high_priority

@ingroup priority Raise application priority. May interfere with other applications.

set_normal_priority

@ingroup priority Sets application priority to system normal

set_offline_mode

enter tracker idle mode, wait till finished mode switch * Places EyeLink tracker in off-line (idle) mode. Wait till the tracker has finished the mode transition.

set_write_image_hook

@ingroup bitmap_save Use this function to set function pointer, so that the call to el_bitmap_save and el_bitmap_save_and_backdrop will use the passed in function to write the image to disk.

setup_graphic_hook_functions

@ingroup display Primary function to setup display graphics hook functions.

setup_graphic_hook_functions_V2

@ingroup display Primary function to setup display graphics hook functions of the second revision of the interface. One of the major difference between this and setup_graphic_hook_functions is, this has fewer functions to implement also, takes extra parameters like the major and minor versions for future enhancements.

splice_fname

@} Splice 'path' to 'fname', store in 'ffname'. Tries to create valid concatenation. If 'fname' starts with '', just adds drive from 'path'. If 'fname' contains drive specifier, it is not changed.

start_recording

Start recording with data types requested * Check that all requested link data is arriving * return 0 if OK, else trial exit code * Starts the EyeLink tracker recording, sets up link for data reception if enabled.

stop_recording

halt recording, return when tracker finished mode switch Stops recording, resets EyeLink data mode.

target_mode_display

(USED BY do_tracker_setup(), YOU DO NOT NEED TO CALL normally * Called for you by do_tracker_setup() and do_drift_correct() * * This function needs some "helper" graphics to clear the scren and draw the fixation targets. Since C graphics are compiler-dependent, these are found in other C source files.

terminal_break

ASYNCHRONOUS BREAKOUTS *********/ Because Windows is multi-tasking, some other event (i.e. a timer event or ALT-TAB) may affect your application during loops or calibration. Your event handlers can call these functions to stop ongoing operations

timemsg_printf

@ingroup message_file Very similar to eyemsg_printf, with the following features: \arg Optionally write the timestamped message to file instead of sending over the link to tracker. \arg Optional time of event. @param t optional time of event (0 = NOW) @param fmt format messages

Type Definitions

CrossHairInfo

@}

ELINKADDR
IMAGETYPE

@ingroup display

INT16
INT32
UINT16
UINT32
_EL_CAL_BEEP

@ingroup display \brief Enum used for calibration beeps

byte

Unions

ALLD_DATA

@ingroup messaging \brief Union of message, io event and double sample and double event.

ALLF_DATA

@ingroup messaging \brief Union of message, io event and float sample and float event.

ALL_DATA
InputEvent

@ingroup display \brief Union of all input types.