Справочное Руководство для Intermec 5055
im_irl_v
5-42
im_irl_v (continued)
IM_CODE_128 Code 128 bar code.
IM_I_2_OF_5 Interleaved 2 of 5.
IM_MSI MSI bar code.
IM_PLESSEY Plessey bar code.
IM_UPC Universal Product code.
Return Value:
This function returns one of these codes:
IM_SUCCESS Successfully received input.
IM_TIMEDOUT A timeout occurred.
Example
/********************* im_irl_v **************************************/
#include <conio.h>
#include "im5055.h"
#include <conio.h>
#include "im5055.h"
#define COM_BUFSIZE 1024 /* allocate 1024 bytes for comm buffer */
void main (void)
{
IM_UCHAR *com_buffer;
IM_UCHAR COM_BUFSIZE[1024];
IM_ORIGIN source;
IM_USHORT cc;
IM_DECTYPE symbol;
{
IM_UCHAR *com_buffer;
IM_UCHAR COM_BUFSIZE[1024];
IM_ORIGIN source;
IM_USHORT cc;
IM_DECTYPE symbol;
/* FUNCTION BODY */
im_clear_screen(); /* Clear the screen */
im_cputs("Demo IRL V Bar code\n'C' to clear screen\n'Q' to quit\n");
im_cputs("Demo IRL V Bar code\n'C' to clear screen\n'Q' to quit\n");
do
{
/* Display IRL V test */
printf("IRL V test\n");
/* Set up input source with labels, keypad, and NET */
source = IM_LABEL_SELECT | IM_KEYBOARD_SELECT | IM_NET_SELECT;
/* Request input from Reader Wedge */
im_irl_v(IM_INFINITE_TIMEOUT,
IM_ENABLE, IM_WEDGE_BEEP, IM_ENABLE,
&source, input, &cc, &symbol);
/* Display input data */
printf("\n%s\n", input);
/* Upper case first char of input for simplifying to test input */
input[0] = toupper(input[0]);
/* If the first char in string is 'C', then clear screen.*/
if (input[0] == 'C')
im_clear_screen();
} while (input[0] != 'Q'); /* 'Q' for quit */
}
{
/* Display IRL V test */
printf("IRL V test\n");
/* Set up input source with labels, keypad, and NET */
source = IM_LABEL_SELECT | IM_KEYBOARD_SELECT | IM_NET_SELECT;
/* Request input from Reader Wedge */
im_irl_v(IM_INFINITE_TIMEOUT,
IM_ENABLE, IM_WEDGE_BEEP, IM_ENABLE,
&source, input, &cc, &symbol);
/* Display input data */
printf("\n%s\n", input);
/* Upper case first char of input for simplifying to test input */
input[0] = toupper(input[0]);
/* If the first char in string is 'C', then clear screen.*/
if (input[0] == 'C')
im_clear_screen();
} while (input[0] != 'Q'); /* 'Q' for quit */
}