The text of a manual · part 8 of 25
JANUS PSK for Ada Reference Manual, pages 71 to 80
Pages 71 to 80 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 71
im_get_input_mode
3
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.” See Also:
im_set_input_mode, im_receive_input
Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure getinmod Is package IM_MODE_IO is new ENUMERATION_IO (enum => IM_MODE); mode : IM_MODE; begin mode := im_get_input_mode; Put ("Mode is "); IM_MODE_IO.Put (mode); New_Line; end getinmod;
3-31
Page 72
im_get_keyclick im_get_keyclick Purpose:
Every time you press a key, the reader can emit a click. This procedure retrieves the current setting (enabled or disabled) of the keyclick.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_get_keyclick ( keyclick_status : OUT IM_CONTROL; status_code : OUT System.Word);
IN Parameter:
None.
OUT Parameter:
The keyclick_status parameter is one of the following constants: IM_ENABLE IM_DISABLE
Keyclick mode is enabled Keyclick mode 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_keyclick
Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure getkeycl Is keyclick_status : IM_CONTROL; status_code : System.Word; begin im_get_keyclick (keyclick_status, status_code); if keyclick_status = IM_ENABLE then Put_Line ("Keyclick ENABLED"); else Put_Line ("Keyclick DISABLED"); end if; end getkeycl;
3-32
Page 73
im_get_label_symbology
3 im_get_label_symbology Purpose:
This function retrieves the symbology, such as Code 39, from the most recently scanned label. Call this function after receiving the data using im_receive_input.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_get_label_symbology ( symbology : OUT IM_DECTYPE; status_code : OUT System.Word);
IN Parameter:
None.
OUT Parameter:
The symbology parameter is one of the following constants: IM_CODE_11 IM_CODE_16K IM_CODE_39 IM_CODE_49 IM_CODE_93 IM_CODE_128 IM_CODABAR IM_I_2_of_5 IM_MSI IM_PLESSEY IM_UNKNOWN_DECODE IM_UPC
Code 11 bar code Code 16K bar code Code 39 bar code Code 49 bar code Code 93 bar code Code 128 bar code Codabar bar code Interleaved 2 of 5 MSI bar code Plessey bar code Unknown bar code Universal Product Code
The status_code is one of the standard status codes defined in Appendix A, “Status Codes.” Return Value:
None.
Notes:
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_receive_input
3-33
Page 74
im_get_label_symbology
Example See example for im_receive_input.
3-34
Page 75
im_get_length
3 im_get_length Purpose:
This function retrieves the length of the last input of the type selected. Use this function after calling the im_receive_input function to get the data. The length is saved when the call is initiated.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_get_length ( origin : IN IM_ORIGIN ) return System.Word;
IN Parameter:
The origin parameter is one of these constants: IM_LABEL_SELECT IM_KEYBOARD_SELECT IM_COM1_SELECT IM_COM2_SELECT IM_COM4_SELECT
Label selected Keypad selected COM1 selected COM2, scanner port selected (2010 and 2050) COM4 selected (RF only)
OUT Parameter:
None.
Return Value:
This function retrieves the length of the last input read.
Notes:
For this function, all COM input is considered to be from the same source. For example, if you call im_receive_input with IM_COM1_SELECT and again with IM_COM4_SELECT, then a call to im_get_length with a source of IM_COM1_SELECT returns the length of the message received from COM4 because that was the last message read from a communications port. 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_receive_input
Example See example for im_receive_input.
3-35
Page 76
im_get_postamble im_get_postamble Purpose:
This procedure retrieves the currently configured postamble string and its length.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_get_postamble ( post_string : OUT String; post_length : OUT System.Word; status_code : OUT System.Word);
IN Parameters:
None.
OUT Parameters:
The post_string parameter is the postamble string. The length parameter is the length of the postamble string. The status_code parameter is one of the standard status codes defined in Appendix A, “Status Codes.”
Return Value:
None.
Notes:
You can set the postamble with IC.EXE, with the im_command function and $+AE command, or by scanning a postamble. Refer to your JANUS user’s manual for more information on configuring a postamble.
See Also:
im_get_postamble, im_get_config_info
3-36
Page 77
im_get_postamble
3
Example With System, Intrmecd_IO, Intrmecp_IO, Text_IO, RTEXT_IO, ITOOLS; Use Intrmecd_IO, Intrmecp_IO, Text_IO, RTEXT_IO, ITOOLS; procedure POSAMBLE is package SYSBYTE_IO is new INTEGER_IO(System.Byte); package SYSWORD_IO is new INTEGER_IO(System.Word); use SYSBYTE_IO, SYSWORD_IO; postamble_string : String(1..300) := (others => Ascii.NUL); postamble_length : System.Word; status : System.Word; begin clrscr; Put_Line("im_get_postamble example:"); New_line; im_get_postamble(postamble_string, postamble_length, status); Put("Postamble: "); for i in Integer range 1..300 loop exit when postamble_string(i) = Ascii.NUL; Put(postamble_string(i)); end loop; New_line; Put("Length : "); Put(postamble_length); New_line; Put("Status : "); Print_status_code(status); New_line; end POSAMBLE;
3-37
Page 78
im_get_preamble im_get_preamble Purpose:
This procedure retrieves the currently configured preamble string and its length.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_get_postamble ( preamble_string : OUT String; preamble_length : OUT System.Word; status_code : OUT System.Word);
IN Parameters:
None.
OUT Parameters:
The preamble_string parameter is the preamble string. The length parameter is the length of the preamble string. The status_code parameter is one of the standard status codes defined in Appendix A, “Status Codes.”
Return Value:
None.
Notes:
You can set the preamble with IC.EXE, with the im_command function and $+AE command, or by scanning a preamble. Refer to your JANUS user’s manual for more information on configuring a preamble.
See Also:
im_get_postamble, im_get_config_info
3-38
Page 79
im_get_preamble
3
Example With System, Intrmecd_IO, Intrmecp_IO, Text_IO, RTEXT_IO, ITOOLS; Use Intrmecd_IO, Intrmecp_IO, Text_IO, RTEXT_IO, ITOOLS; procedure PREAMBLE is package SYSBYTE_IO is new INTEGER_IO(System.Byte); package SYSWORD_IO is new INTEGER_IO(System.Word); use SYSBYTE_IO, SYSWORD_IO; preamble_string : String(1..300) := (others => Ascii.NUL); preamble_length : System.Word; status : System.Word; begin clrscr; Put_Line("im_get_preamble example:"); New_line; im_get_preamble(preamble_string, preamble_length, status); Put("Preamble: "); for i in Integer range 1..300 loop exit when preamble_string(i) = Ascii.NUL; Put(preamble_string(i)); end loop; New_line; Put("Length : "); Put(preamble_length); New_line; Put("Status : "); Print_status_code(status); New_line; end PREAMBLE;
3-39
Page 80
im_get_viewport_lock im_get_viewport_lock Purpose:
This function retrieves the current setting of the viewport lock. When the display is in 80X25 mode, you can use the viewport in virtual display mode unless the currently running application program restricts it. The application program may require the viewport to be locked or unlocked.
Syntax:
With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_get_viewport_lock ( viewport_lock_status : OUT IM_CONTROL; status_code : OUT System.Word);
IN Parameter:
None.
OUT Parameter:
The viewport_lock_status parameter is one of the following constants: IM_ENABLE IM_DISABLE
Viewport is locked Viewport is unlocked
The status_code is one of the standard status codes defined in Appendix A, “Status Codes.” Return Value:
None.
Notes:
The display must be in 80X25 mode (see im_set_display_mode) to use this function. This function has no effect on the JANUS 2050. When the viewport is “locked,” the viewport movement keys do not move the viewport. The viewport can still move if follow-the-cursor mode is enabled.
See Also:
3-40 im_set_viewport_lock, im_set_display_mode, im_get_display_mode