The text of a manual · part 16 of 25
JANUS PSK for Ada Reference Manual, pages 151 to 160
Pages 151 to 160 of 250
The original document is the PDF (415 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 J2020, Intermec J2010 and Intermec J2050
Page 151
im_set_control_key
3 if im_isgood (status)then Put_Line ("Control Key ENABLED"); Put_Line ("q to quit"); loop exit when in_char = 'q'; Get(in_char); end loop; else Put ("Enable Ctrl Key error = "); SYSWORD_IO.Put (status, Width => 8); New_Line; end if; end setclkey;
3-111
Page 152
im_set_display_mode im_set_display_mode Purpose:
This function sets the size mode, video mode, scroll mode, and character height of the display.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_set_display_mode ( size_mode : IN IM_STD_SIZE_MODE; video : IN IM_STD_VIDEO_MODE; scroll : IN IM_SCROLL_MODE; char_ht : IN IM_CHARACTER_HEIGHT ) return System.Word;
IN Parameter:
The size_mode parameter is required and is one of these constants: IM_SIZE_MODE_80X25 IM_SIZE_MODE_20X16 IM_SIZE_MODE_20X8 IM_SIZE_MODE_10X16 IM_SIZE_MODE_10X8
80 x 25 text mode 20 x 16 text mode (2010 and 2020) 20 x 8 text mode (2010 and 2020) 10 x 16 text mode (2010 and 2020) 10 x 8 text mode (2010 and 2020)
If IM_SIZE_MODE_80X25 is set, you also need to set the video mode, scroll mode, and character height. If any other size_mode is set, the video mode, scroll mode, and character height are automatically set. The video_mode parameter requires IM_SIZE_MODE_80X25. The standard PC BIOS supports up to video mode 13H. The reader only supports up to video mode 6. You can also set video modes 0 through 3 with IC.EXE. The video_mode parameter is one of the following constants: IM_STD_VIDEO_MODE_0 IM_STD_VIDEO_MODE_1 IM_STD_VIDEO_MODE_2 IM_STD_VIDEO_MODE_3 IM_STD_VIDEO_MODE_4 IM_STD_VIDEO_MODE_5 IM_STD_VIDEO_MODE_6
3-112
40X25 (double-wide characters) 40X25 (double-wide characters) 80X25 80X25 300X200 2–color 300X200 monochrome 640X200 2-color (2050)
Page 153
im_set_display_mode
3
The scroll parameter requires IM_SIZE_MODE_80X25 and is one of the following constants: IM_LCD_SCROLL_AT_25 IM_LCD_SCROLL_AT_16 IM_LCD_SCROLL_AT_13 IM_LCD_SCROLL_AT_8
Scroll at line 25 Scroll at line 16 (2010 and 2020) Scroll at line 13 (2050 and double height) Scroll at line 8 (2010 and 2020)
The char_ht parameter requires IM_SIZE_MODE_80X25 and is one of the following constants: IM_STANDARD_CHAR_HEIGHT Standard height characters, applies to all scroll modes except line 8 and line 13 IM_DOUBLE_CHAR_HEIGHT
Double height characters, applies only to scroll at line 8 and line 13
OUT Parameter:
None.
Return Value:
This function returns one of the standard status codes listed in Appendix A, “Status Codes.”
Notes:
Using this function to set display modes clears the screen. The IRL input commands will not display correctly if the display is in 80X25 mode and the cursor has scrolled off the display. To alleviate this problem, set the display mode to one of the other modes, such as 20X16. The mode does not change if there are conflicting parameters, such as trying to set the video_mode to 16 lines and the scroll_mode to line 8. You must install the Reader Wedge to use this function. For information on loading RWTSR.EXE, see “Runtime Requirements” in Chapter 2, “Working With Ada.”
See Also:
im_get_display_mode, im_set_follow_cursor
3-113
Page 154
im_set_display_mode
Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure setdpmod Is package SYSWORD_IO is new INTEGER_IO (System.Word); package IM_STD_SIZE_MODE_IO is new ENUMERATION_IO (enum => IM_STD_SIZE_MODE); package IM_STD_VIDEO_MODE_IO is new ENUMERATION_IO (enum => IM_STD_VIDEO_MODE); package IM_SCROLL_MODE_IO is new ENUMERATION_IO (enum => IM_SCROLL_MODE); package IM_CHARACTER_HEIGHT_IO is new ENUMERATION_IO (enum => IM_CHARACTER_HEIGHT); size : IM_STD_SIZE_MODE; video : IM_STD_VIDEO_MODE; scroll : IM_SCROLL_MODE; char_ht : IM_CHARACTER_HEIGHT; status : System.Word; begin status := im_set_display_mode (IM_SIZE_MODE_80X25, IM_STD_VIDEO_MODE_0, IM_LCD_SCROLL_AT_25, IM_DOUBLE_CHAR_HEIGHT); if im_isgood (status) then im_get_display_mode (size, video, scroll, char_ht, status); Put ("size :"); IM_STD_SIZE_MODE_IO.Put (size); New_Line; Put ("video :"); IM_STD_VIDEO_MODE_IO.Put (video); New_Line; Put ("scroll:"); IM_SCROLL_MODE_IO.Put (scroll); New_Line; Put ("char_ht :"); IM_CHARACTER_HEIGHT_IO.Put (char_ht); New_Line; else Put ("Set Disp Mode error = "); SYSWORD_IO.Put (status, Width => 8); New_Line; end if; end setdpmod;
3-114
Page 155
im_set_follow_cursor
3 im_set_follow_cursor Purpose:
When the display is in 80X25 mode, the viewport follows the cursor as it moves. This function enables or disables the follow-the-cursor feature.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_set_follow_cursor ( follow_status_requested : IN IM_CONTROL ) return System.Word;
IN Parameter:
The follow_status_requested parameter is one of the following constants: IM_ENABLE IM_DISABLE
Enable follow-the-cursor mode Disable follow-the-cursor mode
OUT Parameter:
None.
Return Value:
This function returns one of the standard status codes listed in Appendix A, “Status Codes.”
Notes:
The display must be in 80X25 mode for this function to work correctly.
See Also:
im_get_follow_cursor
Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure setfolcr Is package SYSWORD_IO is new INTEGER_IO (System.Word); status : System.Word; in_char : Character := ' '; begin status := im_set_follow_cursor (IM_DISABLE); if im_isgood (status) then Put_Line ("Follow cursor DISABLED"); Put_Line ("q to quit"); loop exit when in_char = 'q'; Get(in_char); end loop; else Put ("Disable Foll Curs error = "); SYSWORD_IO.Put (status, Width => 8); New_Line;
3-115
Page 156
im_set_follow_cursor end if; in_char := ' '; New_Line; status := im_set_follow_cursor (IM_ENABLE); if im_isgood (status) then Put_Line ("Follow cursor ENABLED"); Put_Line ("q to quit"); loop exit when in_char = 'q'; Get(in_char); end loop; else Put ("Enable Foll Curs error = "); SYSWORD_IO.Put (status, Width => 8); New_Line; end if; end setfolcr;
3-116
Page 157
im_set_input_mode
3 im_set_input_mode Purpose:
This function clears the input buffers and sets the input manager to one of three modes: Wedge, Programmer, or Desktop.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_set_input_mode (mode : IN IM_MODE);
IN Parameter:
The mode parameter is one of the following constants: IM_WEDGE IM_PROGRAMMER IM_DESKTOP
Wedge mode Programmer mode Desktop mode
OUT Parameter:
None.
Return Value:
None.
Notes:
There are three different reader input modes: Wedge, Programmer, and Desktop. These modes affect how the reader interprets and stores input. Wedge Mode Keypad and label input goes into the keyboard buffer with minimal filtering. Wedge mode is the default mode at the DOS prompt after reader services (RSERVICE.EXE) is loaded. Use Wedge mode when the reader is running an application that uses the Virtual Wedge. When in this mode, use standard input functions, such as TEXT_IO.Get, to retrieve keypad or label input. Wedge mode does not take full advantage of the reader’s power management capabilities. You will probably notice reduced battery life when the reader is in this mode compared to either Programmer or Desktop mode. For more information on power management, see Chapter 5, “Advanced Programming,” in the PSK Reference Manual. Programmer Mode Inputs are echoed to the screen. Reader commands are executed and saved. Use Programmer mode when the reader is executing IRL commands. In general, when you are running an application that uses the function libraries or software interrupts, the reader should be in Programmer mode.
3-117
Page 158
im_set_input_mode
Desktop Mode The application is responsible for retrieving and displaying input. Use Desktop mode when you need detailed information about a pressed key. Each character returned consists of four bytes: the ASCII code, scan code, and two bytes for the keyboard flags (Shift, Ctrl, Alt). For more information about reader input modes, see Chapter 5, “Advanced Programming,” in the PSK Reference Manual. You must install the Reader Wedge to use this function. For information on loading RWTSR.EXE, see “Runtime Requirements” in Chapter 2, “Working With Ada.” Upon exiting the program, set the input mode to IM_WEDGE so that DOS will work as expected. See Also:
im_get_input_mode, im_receive_input
Example See example for im_receive_input.
3-118
Page 159
im_set_keyclick
3 im_set_keyclick Purpose:
Each time you press a key, the reader can emit a click. This function enables or disables the keyclick.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_set_keyclick ( keyclick_status : IN IM_CONTROL ) return System.Word;
IN Parameter:
The keyclick_status parameter is one of the following constants: IM_ENABLE IM_DISABLE
Enable the keyclick Disable the keyclick
OUT Parameter:
None.
Return Value:
This function returns one of the standard status codes listed in Appendix A, “Status Codes.”
See Also:
im_get_keyclick
Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure setkeyck Is package SYSWORD_IO is new INTEGER_IO (System.Word); status : System.Word; in_char : Character := ' '; begin status := im_set_keyclick (IM_DISABLE); if im_isgood (status)then Put_Line ("Keyclick DISABLED"); Put_Line ("q to quit"); loop exit when in_char = 'q'; Get (in_char); end loop; else Put ("Disable Keyclick error = "); SYSWORD_IO.Put (status, Width => 8); New_Line; end if;
3-119
Page 160
im_set_keyclick in_char := ' '; New_Line; status := im_set_keyclick (IM_ENABLE); if im_isgood (status) then Put_Line ("Keyclick ENABLED"); Put_Line ("q to quit"); loop exit when in_char = 'q'; Get (in_char); end loop; else Put ("Enable Keyclick error = "); SYSWORD_IO.Put (status, Width => 8); New_Line; end if; end setkeyck;
3-120