Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 11 of 25

TRAKKER T2090 Batch Hand-Held Computer User's Manual, pages 101 to 110

Pages 101 to 110 of 246

The original document is the PDF (737 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Intermec T2090

Page 101

im_receive_input

4 void main (void) { IM_ULONG iSetup = IM_DISPLAY_ONLY, iPassFlags, ii=0; IM_STATUS iStatus; IM_ORIGIN iSource; /* set up display */ im_clear_screen(); /***************************************************************************************/ /* loops through once to display prompts and fields then comes back through to gather */ /* input. If validation fails stays in field until validation passes. */ /***************************************************************************************/ do { im_set_cursor_xy( aScreen[ii].iRow, aScreen[ii].iCol ); iPassFlags = aScreen[ii].iFlags | iSetup ; iStatus = im_receive_field( IM_KEYBOARD_SELECT | IM_LABEL_SELECT, IM_INFINITE_TIMEOUT, aScreen[ii].iAttribute, iPassFlags,aScreen[ii].iLength, &iSource, aScreen[ii].pszText); /* Validate if not display pass */ if (iSetup & IM_DISPLAY_ONLY) { ii++; } else if (DoValidation(aScreen[ii].pszText, aScreen[ii].iMinLength ) ) { ii++; iSetup = iSetup & !IM_AT_END; } else /* Must have been error, go to end of same field */ iSetup = iSetup | IM_AT_END; /*See if display pass done and if is, turn into data input pass. */ if ((iSetup & IM_DISPLAY_ONLY) && ( aScreen[ii].pszText == (void *)0 ) ) { iSetup = iSetup & !IM_DISPLAY_ONLY ; /*reset the display only bit */ ii = 0; /* and start again at the top */ } } while ( aScreen[ii].pszText != (void *)0 ) ; } im_receive_input Purpose

This function gets input from the source and places it into the received buffer. You can use the im_get_length function after this function to get the input length.

Syntax

#include "imt209x.h" IM_STATUS im_receive_input (IM_ORIGIN allowed, IM_UINT timeout, IM_ORIGIN *source, IM_CHAR *received);

4-41

Page 102

im_receive_input

IN Parameters allowed Defines the available input source. Choose one or more of these constants: IM_LABEL_SELECT Label selected. IM_KEYBOARD_SELECT Keypad selected. IM_COM1_SELECT COM1 selected. IM_ALL_SELECT All sources selected. Use these variables to modify the input by performing a logical OR with the above input sources. IM_KEYCODE_ENABLE Applies when the keyboard or a label is a source. Returns each key pressed and its key-code, or returns one character of a label per call. Does not echo to the screen. This is the functional equivalent to setting the input mode to IM_DESKTOP. Keyboard characters are returned as 4 bytes. The first byte is the ASCII code. The second byte is the scan code, and the last 2 bytes are flags for modifier keys (Shift, Control, and Alt). timeout Specifies the receive timeout period. Either enter a number from 1 to 65,534 to indicate the length of the timeout in milliseconds, or choose one of these constants: IM_ZERO_TIMEOUT No wait. IM_INFINITE_TIMEOUT Wait forever - the function will not return until the end of message character has been received. If COM1 is selected, IM_INFINITE_TIMEOUT acts like IM_INFINITE_NET_TIMEOUT.

OUT Parameters source

Specifies the actual input source and is one of these constants:

IM_NO_SELECT No selection made. IM_LABEL_SELECT Label selected. IM_KEYBOARD_SELECT Keypad selected. IM_COM1_SELECT COM1 selected. received Return Value

Pointer to the variable where the data is placed.

This function returns one of these codes: IM_SUCCESS Success. IM_TIMEDOUT Timeout occurred.

4-42

Page 103

im_receive_input

Notes

4

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 */ }

4-43

Page 104

im_set_2of5_lengths im_set_2of5_lengths Purpose

This function sets one or two lengths for Interleaved 2 of 5 bar code labels. If you specify two lengths, the T2090 can read I 2 of 5 bar code labels that conform to either length.

Syntax

#include "imt209x.h" IM_STATUS im_set_2of5_length (unsigned char length1, unsigned char length2) ;

IN Parameters length1

First length for the labels. Choose a number:

0 Interleaved 2 of 5 is disabled on the T2090. 2 to 30 Even numbers only. length2 0

Second length for the labels. Choose a number:

Only one length (length1) is valid for Interleaved 2 of 5 bar code labels.

2 to 30 Even numbers only. OUT Parameters Return Value

None. This function returns one of these codes: IM_SUCCESS Success. IM_INVALID_PARAM_1 The value for length1 is invalid (not an even number, or larger than 30). IM_INVALID_PARAM_2 The value for length2 is invalid (not an even number, or larger than 30).

4-44

Page 105

im_set_com_mode

4 im_set_com_mode Purpose

This function specifies whether the communications port operates in RS-232 or RS-485 mode.

Syntax

#include "imt209x.h" IM_STATUS im_set_com_mode (IM_USHORT mode) ;

IN Parameters mode

Identifies the communication mode. Choose one of these constants:

IM_MODE_RS232 RS-232 communication mode. IM_MODE_RS485 RS-485 communication mode. OUT Parameters Return Value

None. This function returns one of these codes: IM_OK Success. IM_INVALID_PORT The value for port_id is invalid. IM_INVALID_MODE The value for mode is invalid.

See Also im_set_port_direction

4-45

Page 106

im_set_cursor_style im_set_cursor_style Purpose

This function sets the style used to display the cursor. It is DBFS aware.

Syntax

#include "imt209x.h" IM_STATUS im_set_cursor_style (IM_CURS_TYPE cursor);

IN Parameters cursor

Specifies the style of cursor. Choose one of these constants:

IM_UNDERLINE Single underline. IM_NO_CURSOR No cursor displayed. OUT Parameters Return Value

None. This function returns one of these codes: IM_SUCCESS Success. IM_NOT_SUPPORTED Not supported for current font type.

im_set_cursor_xy Purpose

This function sets the current cursor position.

Syntax

#include "imt209x.h" IM_STATUS im_set_cursor_xy (IM_USHORT row, IM_USHORT col);

IN Parameters OUT Parameters

None. row Vertical position. The top of the display is 0. col

Return Value

Horizontal position. The left edge of the display is 0.

This function returns one of these codes: IM_SUCCESS Success. IM_X_RANGE col value out of range, cursor moved to right edge. IM_Y_RANGE row value out of range, cursor moved to bottom. IM_BOTH_RANGE col and row values out of range, cursor moved to lower right corner.

Example

4-46

See example for im_receive_field.

Page 107

im_set_display_mode

4 im_set_display_mode Purpose

This function sets the character height of the display. Scroll and wrap parameters are included for compatibility with programs written for some TRAKKER Antares terminals.

Syntax

#include "imt209x.h" IM_STATUS im_set_display_mode (IM_FONT_TYPE font, IM_BOOL scroll IM_BOOL wrap);

IN Parameters font

Specifies the font type code. Choose one of these constants:

IM_FONT_STANDARD Text is 5 x 7 pixels, the scroll boundary is line 8, and the wrap boundary is column 20. IM_FONT_LARGE Text is 5 x 14 pixels, the scroll boundary is line 4, and the wrap boundary is column 10. IM_FONT_SPECIAL Text is 10 x 14 pixels scroll

Should always be passed in as non-zero for scroll at bottom of screen.

wrap Should always be passed in as non-zero for wrap at the right edge of the screen. OUT Parameters Return Value

None. This function returns one of these codes: IM_SUCCESS Success. IM_INVALID_PARAM_1 Invalid font parameter. IM_INVALID_PARAM_2 Invalid scroll parameter (can not disable). IM_INVALID_PARAM_3 Invalid wrap parameter (can not disable).

See Also im_get_display_mode, im_get_display_type, im_get_display_size_physical

4-47

Page 108

im_set_input_mode im_set_input_mode Purpose

This function sets the reader input mode to Wedge, Programmer, or Desktop. These modes affect how the reader interprets and stores input.

Syntax

#include "imt209x.h" IM_STATUS im_set_input_mode (IM_MODE mode);

IN Parameters mode

Specifies the mode. Choose one of these constants:

IM_PROGRAMMER Input is returned as a string (default). Simple line editing is permitted using backspace. IM_WEDGE Input is returned as a string. Use = (Backspace) for simple line editing. IM_DESKTOP Keyboard characters are returned as 4 bytes. The first byte is the ASCII code. The second byte is the scan code, and the last 2 bytes are flags for modifier keys (Shift and Control). OUT Parameters Return Value See Also

4-48

None. IM_SUCCESS Success. im_get_input_mode, im_receive_input

Page 109

im_set_kbmode

4 im_set_kbmode Purpose

This function sets the keyboard mode to either alphabetic or numeric.

Syntax

#include "imt209x.h" void IM_SET_KBMODE(int mode);

IN Parameters mode

Choose one of these constants:

KEYBOARD_MODE_ALPHA Sets the keyboard mode to alphabetic. KEYBOARD_MODE_NUMBER Sets the keyboard mode to numeric. OUT Parameters

None.

Return Value

None.

Notes

When the user presses keys in alphabetic mode, the alphabetic characters marked on the right and left edges of the keys are returned. When the user presses keys in numeric mode, the numbers marked in the moddle of the keys are returned.

See Also im_get_kbmode

4-49

Page 110

im_set_port_direction im_set_port_direction Purpose

This function specifies whether the communications port receives or transmits data.

Syntax

#include "imt209x.h" IM_STATUS im_set_port_direction (IM_USHORT direction) ;

IN Parameters direction Identifies the direction of data transfer. Choose one of these constants: IM_RS485_RECV The serial COM port receives data. IM_RS485_XMIT The serial COM port transmits data.

OUT Parameters Return Value

None. This function returns one of these codes: IM_OK Mode set successfully. IM_INVALID_PORT The value for port_id is invalid. IM_INVALID_DIRECTION The value for direction is invalid.

See Also im_set_com_port im_set_scanning Purpose

This function enables or disables the TRAKKER T2090 computer’s scanning capability.

Syntax

#include "imt209x.h" IM_STATUS im_set_scanning (IM_CONTROL enable_disable);

IN Parameters enable_disable Specifies if the scanning beam will be activated when the user presses the ENTER key with no data keyed in. Choose one of these constants: IM_ENABLE Enable the scanner. IM_DISABLE Disable the scanner.

OUT Parameters

4-50

None.