[−][src]Function libeyelink_sys::open_eyelink_system
pub unsafe extern "C" fn open_eyelink_system(
bufsize: UINT16,
options: *mut c_char
) -> UINT16
@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.
@remarks MUST BE FIRST CALL TO LINK INTERFACE. @param bufsize Size of sample buffer. \c 60000 is the maximum allowed. (\c 0 for default) @param options Text specifying initialization options. Currently no options are supported. (\c NULL or "" for defaults) @return \c 0 if failed, nonzero (\c -1 or TSR SWI number) if success.
\b Example:
\code #includeint dummy = 0; // Sets the connection type if(!open_eyelink_system(0, "")) { printf("\nERROR: Cannot initialize eyelink library\n"); return -1; } if(dummy) i = eyelink_dummy_open(); // Starts a dummy connection else i = eyelink_open(); // Connects to the tracker ... if(eyelink_is_connected()) { set_offline_mode(); eyecmd_printf("close_data_file"); // close data file eyelink_close(1); // disconnect from tracker } close_eyelink_system(); \endcode
\sa \c close_eyelink_connection(), \c close_eyelink_system(), \c eyelink_close() and \c eyelink_open()