Intermec 5055 Reference Guide

Page of 216
Programming Guidelines
2-5
2
Input Functions
Use the input functions to receive data or to retrieve the length or bar code symbology
of previous input. You can receive a file, a field, a buffer, or one or more characters
from the keyboard, scanner, or communications port.
For compatibility with JANUS devices, the PSK supports input mode functions. For
more information on input modes, see Chapter 4, “Converting Trakker Antares, 6400,
and JANUS Applications to 5055 Applications.”
The PSK includes these input functions:
im_get_input_mode
im_receive_buffer
im_get_label_symbology
im_receive_field
im_get_label_symbologyid
im_receive_input
im_get_length
im_set_input_mode
im_input_status
Example: Setting Input Mode and Source
// This segment sets the 5055 in programmer mode to accept a string of
characters.
// The string is NOT sent until you press Enter, and you can use backspace to
// make a correction before pressing Enter.
//
#include "imstdio.h"
#include "im5055.h"
void main()
{
IM_UCHAR  input [1024];
IM_STATUS  status;   // Results of call
IM_USHORT  source;   // Input sources
    im_clear_screen();
im_set_input_mode(IM_PROGRAMMER);
printf("Scan or Type data.\nPress Enter to \nend line.\n");
/* Request input from label or keypad*/
source = IM_LABEL_SELECT | IM_KEYBOARD_SELECT;
status = im_receive_input(source, IM_INFINITE_TIMEOUT, &source, input);
}