[−][src]Function libeyelink_sys::eyelink_send_command
pub unsafe extern "C" fn eyelink_send_command(text: *mut c_char) -> INT16
@ingroup messaging Sends a command to the connected eye tracker.
@remarks If \c eyelink_send_commnd() is used, the text command will be executed, and a result code returned that can be read with \c eyelink_command_result(). @param text String command to send. @return \c 0 if successful, otherwise link error.
\b Example:
\code #includeUINT32 t; int i, j; char buf[256]; eyelink_send_command("button_function 1 'accept_target_fixation'"); t = current_msec(); while(current_msec()-t < 1000) { i = eyelink_command_result(); j = eyelink_last_message(buf); if (i == OK_RESULT) { eyemsg_printf("Command executed successfully: %s", j?buf:""); break; } else if (i!=NO_REPLY) { eyemsg_printf("Error in executing command: %s", j?buf:""); break; } } \endcode
\b Output:
\code MSG 4608038 Command executed successfully: OK \endcode
\sa \c eyelink_command_result() and \c eyelink_timed_command()