[][src]Function libeyelink_sys::eyelink_data_start

pub unsafe extern "C" fn eyelink_data_start(flags: UINT16, lock: INT16) -> INT16

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

@remarks If \c <lock> is nonzero, the recording may only be terminated through \c stop_recording() or \c eyelink_data_stop(), or by the Abort menu (\91Ctrl\92 \92Alt\92 \92A\92 keys on the eye tracker). If zero, the tracker 'ESC' key may be used to halt recording. @param flags Bitwise OR of flags to control what data is recorded. If \c 0, recording will be stopped. @param lock If nonzero, prevents 'ESC' key from ending recording. @return \c 0 if command sent OK, else link error.

\b Example:

\code

#include 

INT16 file_samples,  file_events, link_samples, link_events;

...
...

if(eyelink_is_connected()) 	return ABORT_EXPT;

i = eyelink_data_start((file_samples?RECORD_FILE_SAMPLES:0) |
(file_events?RECORD_FILE_EVENTS:0)   |
(link_samples?RECORD_LINK_SAMPLES:0) |
(link_events?RECORD_LINK_EVENTS:0) , 1);

if(i) return i;

i = eyelink_wait_for_mode_ready(500);
if(i==0) return TRIAL_ERROR;

if((i = check_recording())!=0)
return i;
...
...

eyelink_data_stop();
eyelink_wait_for_mode_ready(500);
\endcode

\sa \c eyelink_data_stop(), \c start_recording() and \c stop_recording()