Intermec 5055 Reference Guide

Page of 216
im_event_wait
5-12
im_event_wait
Purpose:
This function waits for one or more events and returns a flag indicating that the event
occurred or a timeout occurred.
Syntax:
#include "im5055.h"
IM_STATUS im_event_wait
    (IM_UINT 
timeout
,
    IM_ORIGIN far *
source
);
IN Parameters:
timeout    Numeric value or a constant:
1 to 65534 ms    Numeric range.
IM_ZERO_TIMEOUT    No wait.
IM_INFINITE_TIMEOUT    Wait forever.
IN/OUT
source    Passes in the sources allowed and passes out 0 (zero) or the first source with a
Parameters:
complete event. The source passed in is any combination of these constants:
IM_COM1_SELECT    COM1 input.
IM_COM2_SELECT    COM2 input.
IM_NET_SELECT    Network input.
IM_LABEL_SELECT    Label input.
IM_KEYBOARD_SELECT    Keypad input.
IM_TIMER_SELECT    Timer select.
The source passed out is any one of the above constants.
OUT Parameters:
None.
Return Value:
This function returns one of these codes:
IM_SUCCESS    Success.
IM_TIMEDOUT    Timeout occurred before receiving data.
Notes:
This function is not required for any of the input or output functions.
This function does not clear the source state flags. To clear the flags, call an input
function such as im_receive_buffer or im_receive_input.
Use IM_TIMER_SELECT for the source to act on a timed event instead of waiting for
a keyboard, COM port, optical sensor, or network event.
Because no events are assigned to serial data transmission, im_event_wait is not valid
for transmits using serial ports.