[−][src]Function libeyelink_sys::eyelink_read_request
pub unsafe extern "C" fn eyelink_read_request(text: *mut c_char) -> INT16
@ingroup messaging Sends a text variable name whose value is to be read and returned by the tracker as a text string.
@remarks NEW (v2.1): If the link is initialized but not connected to a tracker, the message will be sent to the tracker set by \c set_eyelink_address(). However, these requests will be ignored by tracker versions older than EyeLink I v2.1 and EyeLink II v1.1. @param text String with message to send. @return \c 0 if success, otherwise link error code.
\b Example:
\code int read_tracker_pixel_coords(void) { char buf[100] = ""; UINT32 t; if(!eyelink_is_connected() || break_pressed()) return 1; eyelink_read_request("screen_pixel_coords"); t = current_msec(); while(current_msec()-t < 500) { if(eyelink_read_reply(buf) == OK_RESULT) { eyemsg_printf("%s", buf); return 0; } message_pump(NULL); // Keeps Windows happy if(!eyelink_is_connected) return 1; if(break_pressed()) return 1; } return -1; // Timed out } \endcode
\b Output:
\code MSG 374986 0.000000,0.000000,1023.000000,767.000000 \endcode
\sa \c eyelink_read_reply()