[][src]Function libeyelink_sys::eyelink_mode_data

pub unsafe extern "C" fn eyelink_mode_data(
    sample_rate: *mut INT16,
    crmode: *mut INT16,
    file_filter: *mut INT16,
    link_filter: *mut INT16
) -> INT16

@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.

@param sample_rate \c NULL, or pointer to variable to be filled with samples per second. @param crmode \c NULL, or pointer to variable to be filled with CR mode flag (\c 0 if pupil-only mode, else pupil-CR mode). @param file_filter \c NULL, or pointer to variable to be filled with filter level to be applied to file samples (\c 0 = off, \c 1 = std, \c 2 = double filter). @param link_filter \c NULL, or pointer to variable to be filled with filter level to be applied to link and analog output samples (\c 0 = off, \c 1 = std, \c 2 = double filter). @return If no data available -1 else 0.

\b Example:

\code

#inlcude 
#include 

int is_eyelink2;

if(!eyelink_wait_for_block_start(2000, 1, 1))
{
printf("ERROR: No sample or event been detected!");
return -1;
}

is_eyelink2 = (2 == eyelink_get_tracker_version(NULL));

if(is_eyelink2 && !eyelink2_mode_data(&sample_rate, &crmode, NULL, NULL))
{
eyemsg_printf("Sample rate: %d", sample_rate);
eyemsg_printf("Tracking mode: %s", crmode?"CR":"Pupil only");
}
\endcode

\b Output:

\code
MSG	1151024 Sample rate: 250
MSG	1151024 Tracking mode: CR
\endcode