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 9 of 25

JANUS PSK for Ada Reference Manual, pages 81 to 90

Pages 81 to 90 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 81

im_get_viewport_lock

3

Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure getviewl Is viewport_lock_status : IM_CONTROL; status_code : System.Word; begin im_get_viewport_lock (viewport_lock_status, status_code); if viewport_lock_status = IM_ENABLE then Put_Line ("Viewport Lock ENABLED"); else Put_Line ("Viewport Lock DISABLED"); end if; end getviewl;

3-41

Page 82

im_get_warm_boot im_get_warm_boot Purpose:

This function retrieves the current setting of the warm boot status. You can enable or disable the Ctrl-Alt-Del warm boot key sequence. When disabled, pressing the Ctrl-Alt-Del sequence does not reboot the reader.

Syntax:

With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_get_warm_boot ( warmboot_status : OUT IM_CONTROL; status_code : OUT System.Word);

IN Parameter:

None.

OUT Parameter:

The warmboot_status parameter is one of the following constants: IM_ENABLE IM_DISABLE

The warm boot is enabled The warm boot 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_warm_boot

Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure get_warm Is warmboot_status : IM_CONTROL; status_code : System.Word; begin im_get_warm_boot (warmboot_status, status_code); if warmboot_status = IM_ENABLE then Put_Line ("Warmboot ENABLED"); else Put_Line ("Warmboot DISABLED"); end if; end get_warm;

3-42

Page 83

im_increase_contrast

3 im_increase_contrast Purpose:

This function decreases the LCD display contrast by one level. The display contrast is the lightness or darkness of the characters against the reader display. The reader display has 32 levels of contrast (0 to 31), where 0 is very light, and 31 is very dark.

Syntax:

With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_increase_contrast return System.Word;

Parameters:

None.

Return Value:

This function returns one of the standard status codes listed in Appendix A, “Status Codes.”

Notes:

The 0 to 31 scale fine-tunes the contrast more precisely than using the keypad to adjust the contrast. The functions im_set_contrast and im_get_contrast use a scale of 0 to 7 that is related to the scale of 0 to 31 used by im_increase_contrast and im_decrease_contrast. The following table shows the equivalent values for the 0 to 7 scale. Scale 0 to 7

Scale 0 to 31

Level

0 1 2 3 4 5 6 7

10 12 14 16 18 20 22 24

Very light

Very dark

This function has no effect on the JANUS 2050. See Also:

im_get_contrast, im_decrease_contrast, im_set_contrast

3-43

Page 84

im_increase_contrast

Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure incrcont Is package SYSWORD_IO is new INTEGER_IO (System.Word); status : System.Word; begin Put_Line ("Increasing contrast"); status := im_increase_contrast; if im_iserror (status) then Put ("Inc contrast error = "); SYSWORD_IO.Put (status, WIDTH => 8); New_Line; end if; end incrcont;

3-44

Page 85

im_input_status

3 im_input_status Purpose:

This function checks to see if any input buffers have data and returns the buffer identification.

Syntax:

With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; function im_input_status return IM_ORIGIN;

Parameters:

None.

Return Value:

IM_ORIGIN is one of the following constants: IM_NO_SELECT IM_LABEL_SELECT IM_KEYBOARD_SELECT IM_COM1_SELECT IM_COM2_SELECT IM_COM4_SELECT

Notes:

No selection made Label selected Keyboard selected COM1 selected COM2, scanner (2010 and 2050) COM4 selected (RF only)

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.”

3-45

Page 86

im_input_status

Example With System, Intrmecd_IO, Intrmecp_IO, Text_IO; Use Intrmecd_IO, Intrmecp_IO, Text_IO; procedure exinput is label : String(1..256) := (others => Ascii.NUL); input_status : IM_ORIGIN := IM_NO_SELECT; receive_status : System.Word; returned_origin : IM_ORIGIN; begin New_Line(2); Put_Line(" Janus 2010 "); Put_Line(" Input Status"); Put_Line("Input from keyboard"); Put_Line("or read label"); New_line; im_set_input_mode(IM_DESKTOP); -- Loop while waiting for im_input_status while input_status = IM_NO_SELECT loop input_status := im_input_status; end loop; Put("Input from "); if input_status = IM_KEYBOARD_SELECT then Put("Keyboard"); else Put("Label"); end if; New_Line; -- Read input im_receive_input(input_status, IM_ZERO_TIMEOUT, returned_origin, label, receive_status); if im_isgood(receive_status) then Put(label); New_Line; else Put("Rec status: "); im_message(receive_status); New_Line; end if; im_set_input_mode(IM_WEDGE); end exinput;

3-46

Page 87

im_irl_a

3 im_irl_a Purpose:

This procedure retrieves input from bar code labels or the keypad in the same manner as IRL ASCII input command A. This procedure returns the input data to the buffer, edits reader commands, and displays input data. For more information on IRL and command A, refer to the IRL Programming Reference Manual.

Syntax:

With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; procedure im_irl_a ( timeout : In System.Word; test_table : In IM_LENGTH_SPEC_ARRAY_PTR; mask_string : In String; irl_string : Out String; cmd_count : Out System.Word; symbology : Out IM_DECTYPE; status_code : Out System.Word);

IN Parameter:

The timeout parameter is the receive timeout period. You can exit the function before data is received or before the timeout occurs by performing an application break sequence (see your JANUS user’s manual). The return status indicates whether the function was successful, a timeout occurred, or the application break was received. The numeric range for timeout is from 1 to 65,534 ms. You can also use one of the following constants: IM_ZERO_TIMEOUT IM_INFINITE_TIMEOUT

No wait Wait forever

If IM_INFINITE_TIMEOUT is selected, the function will not return until the end of message character has been received. Data is returned only if its length matches one of the five lengths specified in the test_table. The test_table parameter must be a matrix in this form: {a, b, c, d}, {a, b, c, d}, {a, b, c, d}, {a, b, c, d}, {a, b, c, d},

3-47

Page 88

im_irl_a

The a position in the matrix is one of the following: IM_NO_LENGTH IM_LENGTH IM_RANGE

Accept data of any length Accept data with a specific length Accept data within a length range

If IM_LENGTH is specified in the a position, the actual length of the data string is placed in the d position (and b and c are not used). If IM_RANGE is specified in the a position, the data length must be within the range of b and c (and d is not used). Set any unused table entries to {IM_NO_LENGTH,0,0,0}. The mask_string parameter sets up a data mask that received data must match. mask_string can accept a string of constants or wildcard characters. For example, use the string ### - #### to accept only phone numbers. You can use one or more of these wildcard characters to define the mask: # @ ? NULL (CHR$(0)) OUT Parameter:

Numeric Alpha Alphanumeric printable No mask

You must allocate at least 256 bytes to the irl_string parameter. The cmd_count returned will be 0 unless an abort command is passed to the string. Refer to Chapter 5, “Advanced Programming,” in the PSK Reference Manual for more information. 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

3-48

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

Page 89

im_irl_a

IM_I_2_of_5 IM_MSI IM_PLESSEY IM_UNKNOWN_DECODE IM_UPC

3

Interleaved 2 of 5 MSI bar code Plessey bar code Unknown bar code Universal Product Code

The status_code parameter is one of the standard status codes listed in Appendix A, “Status Codes.” Return Value:

None.

Notes:

You must set the reader to Programmer mode with the im_set_input_mode function. 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.” Data does not display correctly on the screen if the display is in the 80X25 mode after the cursor has scrolled off the bottom of the display. Set the display to one of the other modes using im_set_display_mode.

See Also:

im_irl_k, im_irl_n, im_irl_v, im_irl_y, im_set_input_mode, im_set_display_mode

Example With System, Text_IO, Intrmecd_IO, Intrmecp_IO; Use System, Text_IO, Intrmecd_IO, Intrmecp_IO; procedure ex_irl_a is cmd_count : System.Word; display_status : System.Word; irl_string : String(1..256) := (others => Ascii.NUL); length_table : IM_LENGTH_SPEC_ARRAY; mask : String(1..80) := (others => Ascii.NUL); status : System.Word; symbol : IM_DECTYPE; timeout : System.Word := 25000; -- 25 second timeout package SYMBOL_IO is new ENUMERATION_IO(enum=>IM_DECTYPE); begin length_table := IM_LENGTH_SPEC_ARRAY'( (IM_LENGTH, 0, 0, 2), (IM_RANGE, 9, 14, 0), (IM_LENGTH, 2, 2, 4),

3-49

Page 90

im_irl_a

(IM_RANGE, 16, 17, 2), (IM_NO_LENGTH, 2, 2, 2)); -- Set display mode to something other than 80X25 display_status := im_set_display_mode(IM_SIZE_MODE_20X16, IM_STD_VIDEO_MODE_0, IM_LCD_SCROLL_AT_16, IM_STANDARD_CHAR_HEIGHT); Put_Line(" Example im_irl_a"); New_Line; Put_Line("Enter 8 AlphaNums"); Put_Line(" from keyboard"); Put_Line(" or read label"); Put_Line("q to quit"); -- Set Reader Wedge mode to program interface im_set_input_mode(IM_PROGRAMMER); mask(1..8) := "????????"; loop -- Read input using im_irl_a im_irl_a (timeout, length_table, mask, irl_string, cmd_count, symbol, status); exit when irl_string(1) = 'q'; if im_isgood(status) then New_Line; Put("Data read: "); Put(irl_string(1..8)); New_Line; Put_Line("The symbology read:"); SYMBOL_IO.Put(symbol); New_Line; else im_message(status); New_Line; end if; end loop; -- Set Reader Wedge mode back to Virtual Wedge mode im_set_input_mode(IM_WEDGE); -- Set display mode back to 80X25 display_status := im_set_display_mode(IM_SIZE_MODE_80X25, IM_STD_VIDEO_MODE_3, IM_LCD_SCROLL_AT_16, IM_STANDARD_CHAR_HEIGHT); end ex_irl_a;

3-50