[−][src]Function libeyelink_sys::eyelink_quiet_mode
pub unsafe extern "C" fn eyelink_quiet_mode(mode: INT16) -> INT16
@ingroup init_eyelink Controls the level of control an application has over the tracker.
@remarks This is used in combination with broadcast mode (multiple applications connected to one tracker) to ensure that "listener" applications do not inadvertently send commands, key presses, or messages to the tracker. This is mostly useful when quickly converting an existing application into a listener. @param mode \c 0 to allow all communication.\n \c 1 to block commands (allows only key presses, messages, and time or variable read requests).\n \c 2 to disable all commands, requests and messages.\n \c -1 to just return current setting.\n @return The previous settings.
\b Example:
\code #include#include if(eyelink_broadcast_open()) { printf("Cannot open broadcast connection to tracker"); return -1; } eyelink_reset_data(1); eyelink_data_switch(RECORD_LINK_SAMPLES | RECORD_LINK_EVENTS); eyelink_quiet_mode(0); // Allows for message sending eyelink_send_message("This should be recorded in the EDF file"); eyelink_quiet_mode(2); // Disables message sending eyelink_send_message("This should not appear in the EDF file"); eyelink_quiet_mode(0); // Allows for message sending again eyelink_send_message("This should appear in the EDF file"); \endcode
\b Output:
\code MSG 3304947 This message should be recorded in the EDF file MSG 3304947 This message should appear in the EDF file \endcode
\sa \c eyelink_broadcast_open() and \c eyelink_open()