im_receive_input
4-43
4
Notes
If input from more than one source is received before this function is called,
the first available input is returned in this order: label, keypad, and COM1.
When allowed is set to IM_COM1_SELECT and timeout is set to
IM_INFINITE_TIMEOUT, this function performs as if timeout were set to
IM_INFINITE_NET_TIMEOUT.
See Also
im_receive_buffer, im_receive_field
Example
/********************* im_receive_input ******************************/
#include <stdio.h>
#include <stdlib.h>
#include "im209x.h"
IM_UCHAR input[1024];
void main (void)
{
IM_USHORT length;
IM_ORIGIN source;
IM_STATUS status;
im_clear_screen(); /* Clear the screen */
printf("Demo \nim_receive_input\n'Q' to quit\n\'C' to clear screen\n");
/* Input loop */
do
{
/* Set up input source */
source = IM_LABEL_SELECT | IM_KEYBOARD_SELECT;
/* Request input from label, keypad */
status = im_receive_input(source, IM_INFINITE_TIMEOUT, &source, input);
length = im_get_length(source);
if (IM_ISGOOD(status))
{
/* Show the input source */
if (source == IM_LABEL_SELECT)
printf("\nLabel input:\n");
else if (source == IM_KEYBOARD_SELECT)
printf("\nKeybd input:\n");
/* Display input data */
printf("%s\nInput length: %d\n", input, length);
}
else /* input error */
printf("input error\n");
/* 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'); /* First number in string is 'Q', then stop */
}
Содержание Trakker T2090
Страница 1: ...TRAKKER T2090Batch Hand HeldComputer P N 067212 003 User s Manual ...
Страница 4: ......
Страница 14: ......
Страница 19: ...Getting Started 1 ...
Страница 20: ......
Страница 33: ...User Interface 2 ...
Страница 34: ......
Страница 55: ...Application Development 3 ...
Страница 56: ......
Страница 61: ...Application Functions 4 ...
Страница 62: ......
Страница 127: ...Reader Command Reference 5 ...
Страница 128: ......
Страница 145: ...Configuration Command Reference 6 ...
Страница 146: ......
Страница 187: ...BIOS Support 7 ...
Страница 188: ......
Страница 205: ...Hardware Specifications 8 ...
Страница 206: ......
Страница 212: ......
Страница 213: ...Demo Software A ...
Страница 214: ......
Страница 230: ......
Страница 231: ...Microsoft Visual C C Settings B ...
Страница 232: ......
Страница 234: ...TRAKKER T2090 Hand Held Batch Computer User s Manual B 4 Compiler Options Code Generation Select CPU 80186 80188 ...
Страница 237: ...Full ASCII Charts C ...
Страница 238: ......