The text of a manual · part 7 of 25
JANUS PSK for Ada Reference Manual, pages 61 to 70
Pages 61 to 70 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 61
im_get_contrast
Return Value:
None.
See Also:
im_increase_contrast, im_decrease_contrast, im_set_contrast
3
Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure getcontr Is package SYSBYTE_IO is new INTEGER_IO (System.Byte); package SYSWORD_IO is new INTEGER_IO (System.Word); contrast : System.Byte; status : System.Word; begin im_get_contrast (contrast, status); Put_Line ("Getting contrast"); if im_isgood (status) then Put_Line ("The contrast level"); Put ("setting is : "); SYSBYTE_IO.Put (contrast, Width => 3); else Put ("Get Contrast error = "); SYSWORD_IO.Put (status, WIDTH => 8); end if; New_Line; end getcontr;
3-21
Page 62
im_get_control_key im_get_control_key Purpose:
You can enable or disable the Ctrl key. This procedure retrieves the current setting. When you disable this keycode, none of the key combinations that use the Ctrl key will work. For example, the warm boot key sequence Ctrl-Alt-Del will not work.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_get_control_key ( control_key_status : OUT IM_CONTROL; status_code : OUT System.Word);
IN Parameter:
None.
OUT Parameter:
The control_key_status parameter is one of the following constants: IM_ENABLE IM_DISABLE
Ctrl key is enabled Ctrl key is disabled
The status_code is one of the standard status codes defined in Appendix A, “Status Codes.” Return Value:
None.
See also:
im_set_control_key
3-22
Page 63
im_get_control_key
3
Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure getcntrl Is control_key_status : IM_CONTROL; status_code : System.Word; begin im_get_control_key (control_key_status, status_code); if control_key_status = IM_ENABLE then put_Line ("Ctrl key ENABLED"); else put_Line ("Ctrl key DISABLED"); end if; end getcntrl;
3-23
Page 64
im_get_display_mode im_get_display_mode Purpose:
This procedure retrieves the current size mode, video mode, scroll mode, character height, and status code of the display.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_get_display_mode ( size_mode : OUT IM_STD_SIZE_MODE; video_mode : OUT IM_STD_VIDEO_MODE; scroll_mode : OUT IM_SCROLL_MODE; character_height : OUT IM_CHARACTER_HEIGHT; status_code : OUT System.Word);
IN Parameter:
None.
OUT 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 BIOS supports up to mode 13 but the JANUS only supports up to mode 6. You can also set video modes 0 through 3 with IC.EXE.
3-24
Page 65
im_get_display_mode
3
The video_mode parameter is one of these 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
40 x 25 (use for double wide character) 40 x 25 (use for double wide character) 80 x 25 80 x 25 300 x 200 2-color 300 x 200 monochrome 640 x 200 2-color (2050)
The scroll_mode 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 character_height 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
The status_code is one of the standard status codes defined in Appendix A, “Status Codes.” Return Value:
None.
See Also:
im_set_display_mode
3-25
Page 66
im_get_display_mode
Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure getdisdl 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); status : System.Word; size : IM_STD_SIZE_MODE; video : IM_STD_VIDEO_MODE; scroll : IM_SCROLL_MODE; char_ht : IM_CHARACTER_HEIGHT; begin Put_Line ("Getting disp mode"); im_get_display_mode (size, video, scroll, char_ht, status); if im_iserror (status) then Put ("Get Disp Mode error = "); SYSWORD_IO.Put (status, WIDTH => 8); New_Line; end if; 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; end getdisdl;
3-26
Page 67
im_get_display_type
3 im_get_display_type Purpose:
This function retrieves the hardware display type, either standard JANUS reader or JANUS 2050 (VMU).
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_get_display_type ( type : OUT IM_STD_DISPLAY_TYPE; status_code : OUT System.Word);
IN Parameters:
None.
OUT Parameters:
The type parameter is one of the following constants: IM_LCD_20X16 IM_CRT_80X25
Standard JANUS display JANUS VMU display
The status_code is one of the standard status codes defined in Appendix A, “Status Codes.” Return Value:
None.
See Also:
im_get_display_mode, im_set_display_mode
3-27
Page 68
im_get_display_type
Example With System, Intrmecd_IO, Intrmecp_IO, Text_IO, RTEXT_IO, ITOOLS; Use Intrmecd_IO, Intrmecp_IO, Text_IO, RTEXT_IO, ITOOLS; procedure DISTYPE is package SYSBYTE_IO is new INTEGER_IO(System.Byte); package SYSWORD_IO is new INTEGER_IO(System.Word); use SYSBYTE_IO, SYSWORD_IO; display_type : IM_DISPLAY_TYPE; status : System.Word; begin clrscr; Put_Line("im_get_display_type example:"); New_line; im_get_display_type(display_type, status); if (display_type = IM_LCD_20X16) then Put_Line("Display type is Standard JANUS display"); else Put_Line("Display type is JANUS VMU display"); end if; Put("Status : "); Print_status_code(status); New_line; end DISTYPE;
3-28
Page 69
im_get_follow_cursor
3 im_get_follow_cursor Purpose:
When the display is in 80X25 mode, the viewport follows the cursor as it moves. The follow-the-cursor feature can be enabled or disabled. This function retrieves the current setting.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_get_follow_cursor ( follow_cursor_status : OUT IM_CONTROL; status_code : OUT System.Word);
IN Parameter:
None.
OUT Parameter:
The follow_cursor_status parameter is one of the following constants: IM_ENABLE IM_DISABLE
Follow-the-cursor mode is enabled Follow-the-cursor mode is disabled
The status_code is one of the standard status codes defined in Appendix A, “Status Codes.” Return Value:
None.
Notes:
This procedure has no effect on the JANUS 2050.
See Also:
im_set_follow_cursor, im_cursor_to_viewport, im_viewport_to_cursor
Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure getfolcr Is follow_cursor_status : IM_CONTROL; status_code : System.Word; begin Put_Line ("Getting foll curs mode"); im_get_follow_cursor (follow_cursor_status, status_code); if follow_cursor_status = IM_ENABLE then Put_Line ("Follow Cursor ENABLED"); else Put_Line ("Follow Cursor DISABLED"); end if; end getfolcr;
3-29
Page 70
im_get_input_mode im_get_input_mode Purpose:
This function returns the current mode of the input manager. The different modes affect how the reader interprets and stores input.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_get_input_mode return IM_MODE;
Parameters:
None.
Return Value:
The IM_MODE return value is one of the following constants: IM_WEDGE IM_PROGRAMMER IM_DESKTOP
Notes:
Wedge mode Programmer mode Desktop mode
There are three different reader input modes: Wedge, Programmer, and Desktop. These different 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-30