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 36

Trakker Antares Application Development Tools System Manual: Part I - Trakker Antares PSK Reference Manual, pages 95 to 104

Pages 95 to 104 of 340, from Trakker Antares Application Development Tools System Manual

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

Filed in the catalog under the Intermec 2420, Intermec 2425, Intermec 2435 and Intermec 2481

Page 95

Chapter 5, PSK Function Descriptions im_get_display_type Purpose Syntax

This function gets the display type for the terminal. #include "imt24lib.h" IM_USHORT im_get_display_type (IM_DISPLAY_TYPE *type);

IN Parameters type OUT Parameters Return Value

Pointer to IM_DISPLAY_TYPE. This variable is the hardware display type.

None This function returns one of these codes: IM_CRT_80x25 IM_EL_80x25

IM_LCD_20x16 IM_LIGHT_INDUSTRIAL_ 16x2 IM_STATIONARY IM_STATIONARY_REDUCE

2455 cathode ray tube vehiclemount terminal display (80 x 25) 2455 electro-luminescent vehiclemount terminal (2455) display (80 x 25) 241X, 242X, or 243X handheld terminal display (20 x 16) 246X light-industrial stationary terminal display (16 x 2) Standard stationary terminal display (40 x 12) Reduced stationary terminal display (40 x 4)

Example /********************* im_get_display_type ***************************/ #include "imstdio.h" #include <string.h> #include "imt24lib.h" void main(void) { IM_DISPLAY_TYPE type; IM_USHORT status; // Use im_get_display_type to get the Display Type printf("\nim_get_display_type example: \n"); status = im_get_display_type(&type); // Print the results if(type == IM_LCD_20X16) /* Standard 2400 Display */ printf("\nDisplay type is Standard 2400 display"); else if(type == IM_CRT_80X25) /* 2455 VMT Display */ printf("\nDisplay type is 2455 VMT display"); }

Trakker Antares PSK Reference Manual

75

Page 96

Chapter 5, PSK Function Descriptions im_get_follow_cursor Purpose

Syntax

IN Parameters OUT Parameters

Return Value

This function retrieves the current setting for the follow-the-cursor feature. When you enable viewporting, you can set the viewport to follow the cursor as it moves off the screen. #include "imt24lib.h" IM_STATUS im_get_follow_cursor (IM_CONTROL far *follow_cursor);

None follow_cursor

One of these constants: IM_ENABLE Follow-the-cursor mode enabled IM_DISABLE Follow-the-cursor mode disabled

This function returns this code: IM_SUCCESS

Notes

Success

This function does not work on terminals that are running DOS .EXE applications if you use standard C functions to write to the screen.

See Also im_set_follow_cursor, im_cursor_to_viewport, im_viewport_to_cursor

Example /********************* im_get_follow_cursor **************************/ #include <conio.h> #include <stdlib.h> #include <ctype.h> #include "imstdio.h" #include "imt24lib.h" #define

ESC_CHAR

0x1B void main (void) { IM_UCHAR ch, user_option; IM_CONTROL old_lock_cursor; IM_CONTROL new_lock_cursor; im_clear_screen(); im_set_cursor_xy(0, 0);

/* Clear screen */ /* Position message */

/* Have to enable viewporting before using any viewport display function */ im_set_viewporting( IM_ENABLE ); /* Get the current status of viewport follow cursor for restore later */ im_get_follow_cursor(&old_lock_cursor); /* Get user's input option, 'y' for disable viewport follow cursor */ printf("\nEnable viewport\nfollows cursor(y)?"); user_option = getche(); user_option = toupper(user_option);

76

Trakker Antares PSK Reference Manual

Page 97

Chapter 5, PSK Function Descriptions if (user_option == 'Y') { im_set_follow_cursor(IM_ENABLE); /* Enable viewport follow cursor */ } else /* Disable viewport follow cursor */ { im_set_follow_cursor(IM_DISABLE); } /* Get new viewport follow cursor status after setting */ im_get_follow_cursor(&new_lock_cursor); /* Display user's input message */ printf("\n\n'ESC' to quit!\nType keys to check\n"); printf("viewport follow\n"); if (new_lock_cursor == IM_ENABLE) printf("cursor ON !!!!!"); else printf("cursor OFF !!!!"); /* Enter any characters to check viewport follow cursor until 'ESC' key. */ while ( (ch = getche()) != ESC_CHAR ) ; /* Restore original follow cursor setting */ im_set_follow_cursor(old_lock_cursor); } im_get_input_mode Purpose

Syntax

This function provides compatibility with the JANUS® PSK functions. This function retrieves the current input mode setting. Input modes affect how the reader interprets and stores input. #include "imt24lib.h" IM_STATUS im_get_input_mode ();

IN Parameters

None

OUT Parameters

None

Return Value

This function returns one of these codes: IM_PROGRAMMER IM_WEDGE IM_DESKTOP

Trakker Antares PSK Reference Manual

Input is returned as a string (default). Line editing is permitted. Input is returned as a string. Use Backspace for simple line editing. 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). For label input, the entire string is returned.

77

Page 98

Chapter 5, PSK Function Descriptions im_get_input_mode (continued) Notes

For more information on input modes, see Chapter 2, “Programming Guidelines.”

See Also im_set_input_mode, im_receive_input

Example No example. This function provides compatibility with the JANUS PSK functions.

im_get_IP_addr (gethostbyname) Purpose

This function call is a BSD socket-specific function. The im_get_IP_addr function call replaces the gethostbyname function call. This call returns one of the two pre-configured IP addresses as a long integer that represents the four octets in the dot-quad notation. This format is required for the Trakker Antares socket interface. For example, the im_get_IP_addr function returns the IP address 192.168.1.98 as the long integer 6201a8c0h. The socket structure is filled in by copying the four octets contained in the long integer one byte at a time to the sockaddr_in structure. This method replaces the gethostbyname function call in a way that is compatible with the Trakker Antares socket interface.

Syntax IN Parameters

IM_INT im_get_IP_addr(IM_INT host, IM_ULONG *addr);

host addr OUT Parameters addr Return Value

This function returns one of these values: 0 -1 -2

78

IP address to return, where host is one of the following values: LOCAL_IP IP address of the Trakker Antares terminal REMOTE_IP IP address of the preconfigured remote host Pointer to the location where the function will return the host address. IP address returned to the location specified by the pointer to addr. Success Conversion error Unknown error

Trakker Antares PSK Reference Manual

Page 99

Chapter 5, PSK Function Descriptions

Notes

The gethostbyname function call returns the IP address of the specified host by its name. However, the only pre-configured hosts that are available for Trakker Antares terminals are the local Trakker Antares terminal and a remote host IP address identified in the Trakker Antares menu system as “Host IP Addr.” No other IP addresses are currently supported in the Trakker Antares terminals. Therefore, the gethostbyname function call is not used, because a unique host name cannot be defined for each Trakker Antares terminal. BSD socket functions do not support low power pending functions, such as the functional equivalent functions im_receive_input, im_receive_field, im_receive_buffer, and im_event_wait. Therefore, if you choose to use BSD socket functions for input, you may adversely affect battery life. In the following example, Iid_SZ is defined as 4, which corresponds to four octets in the dot-quad notation.

Example /****************************** im_get_IP_addr ***************************/ int rc /* return code */ unsigned long addr; /* four octet IP address */ struct sockaddr_in socka; /* IP address and port number */ •••• memset(&socka, 0, sizeof(socka));

/* clear socket structure */ rc = im_get_IP_addr(REMOTE_IP, &addr); if(rc 0) printf("Error: im_get_IP_addr\n");

/* get host addr from HW setup */ socka.sin_family = AF_INET; memcpy((char *)socka.sin_addr, (char *)&addr, Iid_SZ); /* init IP addr */ socka.sin_port = 69;

Trakker Antares PSK Reference Manual

79

Page 100

Chapter 5, PSK Function Descriptions im_get_label_symbology Purpose

Syntax

This function gets the symbology, such as Code 39, from the most recently scanned label. Call this function after receiving the data using im_receive_input, im_receive_field, gets, or scanf. #include "imt24lib.h" IM_STATUS im_get_label_symbology (IM_DECTYPE far *symb);

IN Parameters

None

OUT Parameters symb

Return Value

Label symbology and is one of these constants: IM_UNKNOWN_DECODE Unknown bar code IM_CODABAR Codabar bar code IM_CODE_11 Code 11 bar code IM_CODE_16K Code 16K bar code IM_CODE_39 Code 39 bar code IM_CODE_49 Code 49 bar code IM_CODE_93 Code 93 bar code 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 bar code

This function returns one of these codes: IM_SUCCESS IM_NO_SYMBOLOGY

Successfully retrieved No symbology code available, or no scans received

See Also im_receive_input, im_receive_field

80

Trakker Antares PSK Reference Manual

Page 101

Chapter 5, PSK Function Descriptions

Example /********************* im_get_label_symbology ************************/ #include <conio.h> #include "imstdio.h" #include "imt24lib.h" static char *bar_code[] = { "unknown", "Code 39", /* See typedef enum { ...} IM_DECTYPE in IMT24LIB.h*/ "Code 93", "Code 49", "I 2 of 5", "Codabar", "UPC and EAN", "Code 128", "Code 16K", "Plessey/Anker", "Code 11", "MSI" }; void main (void) { IM_UCHAR input[256]; IM_ORIGIN source; IM_DECTYPE symbol; im_clear_screen(); /* Clear the screen */ printf("Demo im_get_label_symbology\n'q' to quit\n"); /* Input loop */ do { source = IM_LABEL_SELECT | IM_KEYBOARD_SELECT; im_receive_field(source, IM_INFINITE_TIMEOUT, IM_BOLD, IM_RETURN_ON_FULL, 10, &source, input); printf("\nReceive Field:\n"); printf("%s\n", input); im_get_label_symbology( &symbol); /* Display symbology */ printf("\nSYMBOLOGY: %d\n%s\n", symbol, bar_code[symbol]); } while (input[0] != 'q' && input[0] != 'Q');

/* 'q' to quit */

}

Trakker Antares PSK Reference Manual

81

Page 102

Chapter 5, PSK Function Descriptions im_get_label_symbologyid Purpose Syntax

IN Parameters

This function returns the symbology identifier for the most recently scanned bar code label. #include "imt24lib.h" IM_STATUS im_get_label_symbologyid (IM_UCHAR far *symbologyID)

None

OUT Parameters symbologyID

Return Value

This function returns one of these codes: IM_SUCCESS IM_NONE

Notes

Far pointer to IM_UCHAR. im_get_label_symbologyid places the identifier at this buffer. The buffer size must be at least 6 bytes long. Success Symbology identifier does not exist

A symbology identifier is an ASCII character string prefixed by the reading equipment to the data contained in a bar code symbol. The structure of the symbology identifier string is: ]cm… where: ] represents the symbology identifier flag character (ASCII value 93).

c represents the code character.

m… represents the modifier characters defined for the symbology. Note: When the symbology identifier characters are transmitted in a 16bit (double-byte) system, an 8-bit byte of all zeros is transmitted before each of the above characters (bytes). For more detailed information about symbology identifiers, refer to the AIM Guidelines for Symbology Identifiers. The symbology identifiers for numerous bar code symbologies are listed in the table on the next pages.

82

Trakker Antares PSK Reference Manual

Page 103

Chapter 5, PSK Function Descriptions

Symbology Identifiers Symbology Code 39

Telepen

Code 128

Channel Code

Code One

Code Char. A

B

C c

D

Modifier Characters 0 No check character validation or full ASCII processing; all data transmitted as decoded. 1

Modulo 43 check character validated and transmitted.

3

Modulo 43 check character validated but not transmitted.

4

Full ASCII character conversion performed; no check character validation.

5

Full ASCII character conversion performed; modulo 43 check character validated and transmitted.

7

Full ASCII character conversion performed; modulo 43 check character validated but not transmitted.

0

Full ASCII mode.

1

Double density numeric only mode.

2

Double density numeric followed by full ASCII.

4

Full ASCII followed by double density numeric.

0

Standard data packet. No FNC1 in first or second symbol character position after start character.

1

EAN/UCC-128 data packet - FNC1 in first symbol character position after start character.

2

FNC1 in second symbol character position after start character.

4

Concatenation according to International Society for Blood Transfusion specifications has been performed; concatenated data follows.

3

Channel 3 decoded.

4

Channel 4 decoded.

5

Channel 5 decoded.

6

Channel 6 decoded.

7

Channel 7 decoded.

8

Channel 8 decoded.

9

Composite format.

0

No special characters in first or second symbol character position.

1

FNC1 implied in first symbol character position.

2

FNC1 in second symbol character position.

4

Pad character in first symbol character position. The first data character in the symbol defines the escape character. An escape character of \ indicates that the symbol contains ECI escape sequences.

Trakker Antares PSK Reference Manual

83

Page 104

Chapter 5, PSK Function Descriptions

Symbology Identifiers (continued) Symbology Data Matrix

EAN/UPC

Code Char. d

E

Modifier Characters 0 ECC 000-140. 1

ECC 200.

2

ECC 200, FNC1 in first or fifth position.

3

ECC 200, FNC1 in second or sixth position.

4

ECC 200, ECI protocol implemented.

5

ECC 200, FNC1 in first or fifth position, ECI protocol implemented.

6

ECC 200, FNC1 in second or sixth position, ECI protocol implemented.

0

Standard data packet in full EAN format, i.e., 13 digits for EAN-13, UPC-A, and UPC-E (does not include add-on data).

1

Two digit add-on data only.

2

Five digit add-on data only.

3

Combined data packet comprising 13 digits from EAN-13, UPC-A, or UPC-E symbol and 2 or 5 digits from add-on symbol.

4

EAN-8 data packet.

Note: EAN/UPC symbols with supplements should be considered as two separate symbols. The first symbol is the main data packet and the second symbol is the two or five digit supplement. These symbols should be transmitted separately, each with its own symbology identifier. Codabar

F

0

Standard Codabar symbol. No special processing.

1

ABC Codabar (American Blood Commission) concatenate/message append performed.

2

Reader has validated the check character.

4

Reader has stripped the check character before transmission.

Code 93

G

0

No options specified at this time. Always transmit 0.

Code 11

H

0

Single modulo 11 check character validated and transmitted.

1

Two modulo 11 check characters validated and transmitted.

3

Check characters validated but not transmitted.

0

No check character validation.

1

Modulo 10 symbol check character validated and transmitted.

3

Modulo 10 symbol check character validated but not transmitted.

0

No special characters in first or second symbol character position after start character.

1

FNC1 implied or explicit in first symbol character position after start character.

2

FNC1 in second symbol character position after start character.

4

Pad character in first symbol character position after start character.

Interleaved 2 of 5

Code 16K

84

I

K

Trakker Antares PSK Reference Manual