Macros | |
#define | LINK_INITIALIZE_FAILED -200 |
#define | CONNECT_TIMEOUT_FAILED -201 |
#define | WRONG_LINK_VERSION -202 |
#define | TRACKER_BUSY -203 |
Functions | |
UINT16 | open_eyelink_system (UINT16 bufsize, char FARTYPE *options) |
void | eyelink_set_name (char FARTYPE *name) |
void | close_eyelink_system (void) |
INT16 | eyelink_open_node (ELINKADDR node, INT16 busytest) |
INT16 | eyelink_open (void) |
INT16 | eyelink_broadcast_open (void) |
INT16 | eyelink_dummy_open (void) |
INT16 | eyelink_close (INT16 send_msg) |
INT16 | eyelink_is_connected (void) |
INT16 | eyelink_quiet_mode (INT16 mode) |
INT16 | eyelink_poll_trackers (void) |
INT16 | eyelink_poll_remotes (void) |
INT16 | eyelink_poll_responses (void) |
INT16 | eyelink_get_node (INT16 resp, void FARTYPE *data) |
INT16 | eyelink_get_tracker_version (char FARTYPE *c) |
void | eyelink_set_tracker_node (ELINKADDR node) |
INT16 | open_eyelink_connection (INT16 mode) |
void | close_eyelink_connection (void) |
INT16 | set_eyelink_address (char *addr) |
void | eyelink_set_special_keys (int terminate_key_mask, int terminate_key, int break_key_mask, int break_key, int case_sensitive) |
Variables | |
ELINKADDR | eye_broadcast_address |
ELINKADDR | rem_broadcast_address |
ELINKADDR | our_address |
These methods are used to initialize the EyeLink Library.
#define CONNECT_TIMEOUT_FAILED -201 |
CONNECTION ERROR CODES: timed out waiting for reply
#define LINK_INITIALIZE_FAILED -200 |
CONNECTION ERROR CODES: can't use link
#define TRACKER_BUSY -203 |
CONNECTION ERROR CODES: tracker already connected
#define WRONG_LINK_VERSION -202 |
CONNECTION ERROR CODES: wrong TSR or source version
void close_eyelink_connection | ( | void | ) |
Closes any connection to the eye tracker, and closes the link.
Example: See open_eyelink_connection()
open_eyelink_connection()
and eyelink_close()
void close_eyelink_system | ( | void | ) |
Resets the EyeLink library, releases the system resources used by the millisecond clock.
Example: See open_eyelink_system()
open_eyelink_system()
, eyelink_close()
and set_offline_mode()
INT16 eyelink_broadcast_open | ( | void | ) |
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.
0
if successful.LINK_INITIALIZE_FAILED
if link could not be established.CONNECT_TIMEOUT_FAILED
if tracker did not respond.WRONG_LINK_VERSION
if the versions of the EyeLink library and tracker are incompatible.INT16 eyelink_close | ( | INT16 | send_msg | ) |
Sends a disconnect message to the EyeLink tracker, resets the link data system.
send_msg | Usually <send_msg> is 1 . However, 0 can be used to reset the eyelink system if it is listening on a broadcast session. |
0
if successful, otherwise link error.Example:
INT16 eyelink_dummy_open | ( | void | ) |
Sets the EyeLink library to simulate an eyetracker connection. Functions will return plausible values, but no data.
eyelink_is_connected()
will return -1
to indicate a simulated connection. 0
.Example:
eyelink_broadcast_open()
, eyelink_open()
and eyelink_open_node()
INT16 eyelink_get_node | ( | INT16 | resp, |
void FARTYPE * | data | ||
) |
Reads the responses returned by other trackers or remotes in response to eyelink_poll_trackers()
or eyelink_poll_remotes()
. It can also read the tracker broadcast address and remote broadcast addresses.
resp | Nmber of responses to read:0 gets our data, 1 get first response, 2 gets the second response, etc. -1 to read the tracker broadcast address. -2 to read remote broadcast addresses. |
data | Pointer to buffer of ELINKNODE type, to hold name and ELINKADDR of the respondent. |
0
if OK, -1
if node response number is too high.Example: See eyelink_poll_remotes()
INT16 eyelink_get_tracker_version | ( | char FARTYPE * | c | ) |
After connection, determines if the connected tracker is an EyeLink I or II.
c | NULL , or pointer to a string (at least 40 characters) to hold the version string. This will be "EYELINK I" or "EYELINK II x.xx", where "x.xx" is the software version. |
0
if not connected, 1
for EyeLink I, 2
for EyeLink II 3
for EyeLink 1000.Example:
Output:
INT16 eyelink_is_connected | ( | void | ) |
Checks whether the connection to the tracker is alive.
0
. 0
if link closed.-1
if simulating connection.1
for normal connection.2
for broadcast connection (NEW for v2.1 and later).eyelink_close()
and eyelink_open()
INT16 eyelink_open | ( | void | ) |
Attempts to open a link connection to the EyeLink tracker. Simple connect to single Eyelink tracker. Equivalent to eyelink_open_node(broadcast_address, 0)
.
set_eyelink_address()
. If this address was "255.255.255.255" the call to eyelink_open()
will "broadcast" a request to any tracker, however this may fail if multiple Ethernet cards are installed. For the broadcast option to work use EyeLink I v2.1 or higher, EyeLink II v1.1 or higher. Before using this command, call either open_eyelink_connection
(-1) or open_eyelink_system
() to prepare the link for use.0
if successful.LINK_INITIALIZE_FAILED
if link could not be established.CONNECT_TIMEOUT_FAILED
if tracker did not respond.WRONG_LINK_VERSION
if the versions of the EyeLink library and tracker are incompatible.INT16 eyelink_open_node | ( | ELINKADDR | node, |
INT16 | busytest | ||
) |
Allows the computer to connect to tracker, where the tracker is on the same network.
node | Must be an address returned by eyelink_poll_trackers() and eyelink_poll_responses() to connect to any tracker. |
busytest | If non-zero the call to eyelink_open_node() will not disconnect an existing connection. |
0
if successful.LINK_INITIALIZE_FAILED
if link could not be established.CONNECT_TIMEOUT_FAILED
if tracker did not respond.WRONG_LINK_VERSION
if the versions of the EyeLink library and tracker are incompatible.TRACKER_BUSY
if <busytest>
is set, and tracker is connected to another computer.INT16 eyelink_poll_remotes | ( | void | ) |
Asks all non-tracker computers (with EyeLink software running) on the network to send their names and node address.
OK_RESULT
if successful, otherwise link error. LINK_TERMINATED_RESULT
if link error. -1
if broadcast option is not available.Example:
eyelink_poll_responses()
and eyelink_poll_trackers()
INT16 eyelink_poll_responses | ( | void | ) |
Returns the count of node addresses received so far following the call of eyelink_poll_remotes()
or eyelink_poll_trackers()
.
0
if no responses.Example: See eyelink_poll_remotes()
eyelink_poll_remotes()
and eyelink_poll_trackers()
INT16 eyelink_poll_trackers | ( | void | ) |
Asks all trackers (with EyeLink software running) on the network to send their names and node address.
OK_RESULT
if successful, otherwise link error. LINK_TERMINATED_RESULT
if link error. -1
if broadcast option is not available.Example: See eyelink_poll_remotes()
eyelink_poll_remotes()
and eyelink_poll_responses()
INT16 eyelink_quiet_mode | ( | INT16 | mode | ) |
Controls the level of control an application has over the tracker.
mode | 0 to allow all communication.1 to block commands (allows only key presses, messages, and time or variable read requests).2 to disable all commands, requests and messages.-1 to just return current setting. |
Example:
Output:
eyelink_broadcast_open()
and eyelink_open()
void eyelink_set_name | ( | char FARTYPE * | name | ) |
Sets the node name of this computer (up to 35 characters).
name | String to become new name. |
Example:
Output:
void eyelink_set_special_keys | ( | int | terminate_key_mask, |
int | terminate_key, | ||
int | break_key_mask, | ||
int | break_key, | ||
int | case_sensitive | ||
) |
Sets the alternative for special keys such as CTRL+C, ESC
terminate_key_mask | mask value for the terminate key |
terminate_key | Terminate key charecter key that terminate the eyelink applicaiton |
break_key_mask | mask value for the break key |
break_key | Break key charecter key that terminate the eyelink applicaiton |
case | sensitive flag 1 means case sensitive 0 means not case sensitive |
Example:
void eyelink_set_tracker_node | ( | ELINKADDR | node | ) |
Address used for non-connected time requests and message sends. the "proper" way to do this is with the "node" type of functions but we allow a "back door" to simplify higher level support functions. This is also the address used under Windows for looking for tracker (an IP broadcast is used on all other platforms). There is a bug in the Windows networking, causing broadcasts sent on all cards to have the IP source addres of only the first card. This means the tracker sends its connection reply to the wrong address. So the exact address or a subnet broadcast address (i.e. 100.1.1.255 for a subnet mask of 255.255.255.0) needs to be set to that of the tracker.
INT16 open_eyelink_connection | ( | INT16 | mode | ) |
Initializes the EyeLink library, and opens a connection to the EyeLink tracker.
<mode>
to be 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. mode | Mode of connection:
|
0
if success, else error codeExample:
UINT16 open_eyelink_system | ( | UINT16 | bufsize, |
char FARTYPE * | options | ||
) |
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(-1
) instead, as this prepares other parts of the DLL for use.
bufsize | Size of sample buffer. 60000 is the maximum allowed. (0 for default) |
options | Text specifying initialization options. Currently no options are supported. (NULL or "" for defaults) |
0
if failed, nonzero (-1
or TSR SWI number) if success.Example:
INT16 set_eyelink_address | ( | char * | addr | ) |
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.
addr | Pointer to a string containing a "dotted" 4-digit IP address. |
0
if success, -1
if could not parse address string.Example:
eyelink_open()
, eyelink_open_node()
, text_to_elinkaddr()
ELINKADDR eye_broadcast_address |
The broadcast address for the eye trackers.
ELINKADDR our_address |
This EyeLink node's address for the link implementation.
ELINKADDR rem_broadcast_address |
The broadcast address for the remotes.