The text of a manual · part 7 of 25
TRAKKER T2090 Batch Hand-Held Computer User's Manual, pages 61 to 70
Pages 61 to 70 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 61
4 Application Functions
Page 62
Page 63
Application Functions
4
This section describes the functions contained in the library, IMT209ML.LIB.
Introduction The following example (function_name) explains the parts of the function descriptions.
function_name Purpose
Briefly describes the function and its typical use.
Syntax
Lists the C-language function prototype and the required include file.
IN Parameters
Describes the input parameters (arguments) for the function and lists acceptable values. Not all functions have input parameters.
OUT Parameters
Describes the output parameters (arguments) for the function and lists acceptable values. Not all functions have output parameters.
IN/OUT Parameters
Describes the parameters (arguments) for the function that are passed into the function and back out of the function and lists acceptable values. The function usually changes the value before returning. Not all functions have in/out parameters.
Return Value
Describes the value returned by the function and lists acceptable values. Not all functions have a return value.
Notes
Describes any additional requirements for using the function. Not all functions have notes.
See Also
Lists similar PSK functions.
Example
Contains a code that illustrates how to use the function.
Note: The PSK requires Microsoft Visual C/C++, Professional Edition v1.0 or v1.5x, which can create 16-bit DOS applications. See Appendix B for more information.
4-3
Page 64
TRAKKER T2090 Hand-Held Batch Computer User’s Manual
Application Functions Listed by Category The following table groups the application functions described in this chapter. Communications
Display im_receive_buffer im_clear_screen im_receive_field im_cputs im_receive_input im_dbyte_setfont im_set_com_mode im_dbyte_symbology_set im_set_port_direction im_draw_underline im_transmit_buffer im_get_cursor_style im_xm_receive_file im_get_cursor_xy im_xm1k_receive_file im_get_display_mode im_xm_transmit_file im_get_display_size_physical im_xm1k_transmit_file im_get_display_type im_ym_receive_file im_message im_ym_transmit_file im_putchar im_puts im_set_cursor_style im_set_cursor_xy im_set_display_mode im_status_line im_timed_status_line
4-4
Page 65
Application Functions
Double Byte Character Set
Program Control im_putchar_dbyte im_set_scanning im_puts_dbyte im_standby_wait im_offset_dbyte
System
Input im_command im_get_input_mode im_get_config_info im_get_label_symbology im_get_kbmode im_get_label_symbologyid im_get_system_julian_date im_get_length im_message im_input_status im_set_kbmode im_irl_a im_sound im_irl_k
Timer Callback im_irl_n im_tm_callback_register im_irl_v im_tm_callback_cancel
4 im_irl_y im_receive_buffer im_receive_field im_receive_input im_set_2of5_lengths im_set_input_mode
4-5
Page 66
im_clear_screen im_clear_screen Purpose
This function erases the entire display and moves the cursor to the upper left corner (home). The display font remains the same. The line attributes are all set to IM_NORMAL.
Syntax
#include "imt209x.h" void im_clear_screen (void);
IN Parameters
None.
OUT Parameters
None.
Return Value
None.
im_command Purpose
This function sends reader commands to the computer. For example, you can use this function to set the backlight contrast or change the baud rate on the computer . For help, see “Using Reader Commands” and “Using Configuration Commands” Chapters 5 and 6.
Syntax
#include "imt209x.h" IM_STATUS im_command (IM_UCHAR far *command, IM_USHORT command_length);
IN Parameters command Computer command string. The command string may include more than one command. command_length
OUT Parameters Return Value
Length of the computer command string.
None. This function returns one of these codes: IM_SUCCESS Successfully parsed and implemented command. IM_PARSE_ERROR Unable to parse command.
4-6
Page 67
im_command
Notes
4
If you are using ASCII escape sequences in your command string, the hex value for the escape sequence only counts as one character when designating the command length. For example, the following command string uses the ASCII escape sequence ETX (hex value 0x03) and has a character length of 5: im_command (“$+PF\x03”,5); For help using im_command, see Chapters 5 and 6.
Example
To transmit DATA.TXT on the T2090’s drive C, the function would be: im_command (“%%X1,C:DATA.TXT”,15); To receive a file through the serial port, use a command string of the form, .%X1,drive:filename. For example, to receive ITEMS.TXT on the T2090 and put the file on drive C, the function would be: im_command (“.%X1,C:ITEMS.TXT”,16); To change the configuration, a string of the form $+CCP, where CC represents the command as described in Chapter 6, and the P represents some string of parameters to the configuration command. For example: im_command(“$+IA8”,5); //Set Baud Rate to 38400 im_command(“$+PE\x02”,5); //Set SOM to ASCII STX character im_command(“$+PF\x0d\x0a”,6); //Set EOM to Carriage Return, Line Feed
4-7
Page 68
im_cputs im_cputs Purpose
This function displays a string on the terminal screen at the current cursor location without appending a carriage return and line feed (CR LF) to the string.
Syntax
#include "imt209x.h" IM_STATUS far im_cputs (IM_UCHAR far *string, IM_ATTRIBUTES attrib) ;
IN Parameters string
Far pointer to the string to be displayed.
attrib Identifies the display attribute for the string. Choose one of these constants: IM_NORMAL Plain text. IM_INVERSE Inverse color text. IM_UNDERLINE
Underline text.
IM_UNCHANGED Leave the attribute unchanged. OUT Parameters Return Value
None. This function returns one of these codes: IM_OK Success. IM_BAD_ADDRESS The value for string is invalid. IM_INVALID_PARAM_2 The value for attrib is invalid.
Notes
This function is similar to im_puts except that it does not automatically append a carriage return and line feed (CR LF) to the string. On the TRAKKER T2090 computer, displaying a character with the IM_INVERSE attribute causes the entire line to be inverted.
See Also
4-8 im_puts
Page 69
im_dbyte_setfont
4 im_dbyte_setfont Purpose
This function initializes the .DBFS font specified. Any current DBFS font is disconnected from the display, and the display is cleared. If switching from “native” font display, the ABC/123 indicator and native mode cursor (if active) are disabled and the screen cleared. The altered fonts are not persistent between applications.
Syntax
#include "imt209x.h" IM_STATUS im_dbyte_setfont (IM_UCHAR *fontfile, IM_USHORT glyph_high, IM_USHORT glyph_wide, IM_USHORT offset);
IN Parameters fontfile Pointer to the name of the font file to initialize. A value of 0 causes a return to native mode and restoration of the ABC/123 indicator and native cursor to the states they had prior to the first DBFS im_dbyte_setfont() in this application. glyph_high Height of the character cell in pixels (ignored when going to nd native mode). Values of 1 to 72 are legal, but the 72 row of the display is not visible. glyph_wide Width of the character cell in pixels (ignored when going to native mode). The value must be an integral multiple of 8 between 8 and 120. th The 120 column of the display is not visible. offset
OUT Parameters Return Value
Index of the first glyph in the fontfile (in glyphs).
None. This function returns one of these codes: IM_SUCCESS Font installed. IM_INVALID_FILE The file open failed. The font file could not be found. IM_INVALID_PARAM_2 Specified height falls outside the acceptable limits. IM_INVALID_PARAM_3 Specified width falls outside the acceptable limits or is not a multiple of 8.
4-9
Page 70
im_dbyte_setfont
Notes
The font file is a series of bitmaps. Each bitmap is glyph_wide/8 bytes per row by glyph_high rows. The most significant bit maps to the leftmost pixel. The rows build from the top down. An offset into the file indicates the index of the glyph whose bitmap starts at position 0 in the file. (Copyright information can be inserted at the beginning of the file, so long as it occupies an integral number of glyph spaces and the offset is adjusted accordingly.) Bottom and right side bearings should be built into the font except where successive characters should make contact. If the font is of width of 8, 24, or 120, allowance should be made for the fact that the rightmost pixel of the last column will not be visible since only 119 columns of the display are active. If the font is of height 1, 2, 3, 4, 6, 8, 9, 12, 18,24,36 or 72, allowance should be made for the fact that the bottom row of pixels for the last row of characters will not be visible since only 71 rows of the display are active. Since this is the row in which the cursor is displayed, it may be more important than the width restriction. The following functions are aware of DBFS fonts and adjust their actions when DBFS is active: • im_set_cursor_xy and im_get_cursor_xy use the DBFS character cell size and adjust maximum positions to match.
• im_clear_screen sets the cursor to 0,0 in DBFS font space
• im_set_cursor_style and im_get_cursor_style set and report the style for the DBFS cursor, which inherits the native cursor mode at initialization, but does not pass altered modes back when DBFS is terminated.
• im_putchar_dbyte and im_puts_dbyte place glyphs from the current font at the current position. (They return IM_INVALID_FUNCTION and have no display effect if DBFS is not active.)
• im_offset_dbyte allows a remapping of the font.
• im_puts and im_putchar do no plotting while DBFS is active. This has the intended effect that im_receive_field and im_receive_input also do no character plotting, such as clear fields or echo data.
No other functions are aware of DBFS actions. Functions which change the display using native mode will cause unpredictable effects which may change over a suspend/resume cycle and are therefore not usually recommended. See Also
4-10 im_putchar_dbyte, im_puts_dbyte, im_offset_dbyte