[][src]Function libeyelink_sys::open_eyelink_connection

pub unsafe extern "C" fn open_eyelink_connection(mode: INT16) -> INT16

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

@remarks By setting \c <mode> to be \c 1, the connection can be simulated for debugging purposes. Only timing operations and simple tests should be done in simulation mode, and the Windows TCP/IP system must be installed. This function is intended for networks where a single tracker is connected to the network. @param mode Mode of connection: \arg \c 0, opens a connection with the eye tracker; \arg \c 1, will create a dummy connection for simulation; \arg \c -1, initializes the DLL but does not open a connection. @return \c 0 if success, else error code

\b Example:

\code

#include 

if (set_eyelink_address("100.1.1.7"))
return -1;

if(open_eyelink_connection(0))
return -1;

...
close_eyelink_connection();      // disconnect from tracker
\endcode

\sa \c close_eyelink_connection(), \c close_eyelink_system(), \c eyelink_broadcast_open(), \c eyelink_dummy_open(), \c eyelink_open() and \c eyelink_open_node()