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 8 of 37

JANUS PSK for Basic, Version 2.1 Reference Manual, pages 71 to 80

Pages 71 to 80 of 362

The original document is the PDF (601 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

imGetLength – QuickBasic

2 imGetLength Purpose:

This function returns the length of the string received from the designated source by the most recent imReceiveInput function.

Syntax:

REM $INCLUDE: ’im20bas1.bi’ FUNCTION imGetLength% CDECL (Source AS INTEGER)

IN Parameters:

The Source parameter is one of these constants: imLabelSelect imKeyboardSelect imCom1Select imCom2Select imCom4Select

Label selected Keypad selected COM1 selected COM2, scanner port selected (2010 and 2050) COM4 selected (RF only)

OUT Parameters:

None.

Return Value:

This function returns the length of the last input string read from the designated source.

Notes:

For this function, all COM input is considered to be from the same source. For example, if you call im_receive_input with imCom1Select and again with imCom4Select, then a call to im_get_length with a source of imCom1Select 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” earlier in this chapter.

See Also:

imReceiveInput

Example See example for imReceiveInput.

2-45

Page 72

imGetPostamble – QuickBasic imGetPostamble Purpose:

This function retrieves the current postamble string and its length.

Syntax:

REM $INCLUDE: ’im20bas1.bi’ FUNCTION imGetPostamble% CDECL (BYVAL postString AS INTERGER length AS INTEGER)

IN Parameters:

None.

OUT Parameters:

The postString parameter is the postamble string. The length parameter is the length of the postamble string.

Return Value:

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

Notes:

You can set the postamble with IC.EXE, with the imCommand 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:

imGetPreamble, imGetConfigInfo

Example ’**************** imGetPostamble ******************** REM $INCLUDE: 'im20bas1.bi' DIM outstr AS STRING *300 outstr = STRING$(300, CHR$(0)) PRINT "imGetPostamble example: " status% = imGetPostamble(VARPTR(outstr), count%) PRINT "Postamble String: "; outstr PRINT "Postamble Length: "; count% PRINT "Status: "; HEX$(status%) END

2-46

Page 73

imGetPreamble – QuickBasic

2 imGetPreamble Purpose:

This function retrieves the current preamble string and its length. REM $INCLUDE: ’im20bas1.bi’ FUNCTION imGetPreamble% CDECL (BYVAL preambleString AS INTERGER length AS INTEGER)

IN Parameters:

None.

OUT Parameters:

The preambleString parameter is the preamble string. The length parameter is the length of the preamble string.

Return Value:

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

Notes:

You can set the preamble with IC.EXE, with the imCommand 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:

imGetPostamble, imGetConfigInfo

Example ’**************** imGetPreamble ******************** REM $INCLUDE: 'im20bas1.bi' DIM outstr AS STRING *300 outstr = STRING$(300, CHR$(0)) PRINT "imGetPreamble example: " status% = imGetPreamble(VARPTR(outstr), count%) PRINT "Preamble String: "; outstr PRINT "Preamble Length: "; count% PRINT "Status: "; HEX$(status%) END

2-47

Page 74

imGetViewportLock – QuickBasic imGetViewportLock Purpose:

This function retrieves the current setting of the viewport lock. When the display is in 80 x 25 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:

REM $INCLUDE: ’im20bas1.bi’ FUNCTION imGetViewportLock% CDECL (VpLock AS INTEGER)

IN Parameters:

None.

OUT Parameters:

The VpLock parameter is one of these constants: imEnable imDisable

Viewport is locked Viewport is unlocked

Return Value:

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

Notes:

The display must be in 80 x 25 mode (see imSetDisplayMode) 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:

2-48 imSetViewportLock, imSetDisplayMode, imGetDisplayMode, imGetFollowCursor, imSetFollowCursor

Page 75

imGetViewportLock – QuickBasic

2

Example ’**************** imGetViewportLock **************** REM $INCLUDE: ’im20bas1.bi’ status% = imGetViewportLock(viewportLock%) PRINT "Viewport is ";viewportLock% status% = imSetViewportLock(imDisable) status% = imGetViewportLock(viewportLock%) PRINT "Viewport is ";viewportLock% status% = imSetViewportLock(imEnable) status% = imGetViewportLock(viewportLock%) PRINT "Viewport is ";viewportLock% END

2-49

Page 76

imGetWarmBoot – QuickBasic imGetWarmBoot 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 key sequence does not reboot the reader.

Syntax:

REM $INCLUDE: ’im20bas1.bi’ FUNCTION imGetWarmBoot% CDECL (WarmBoot AS INTEGER)

IN Parameters:

None.

OUT Parameters:

The WarmBoot parameter is one of these constants: imEnable imDisable

Ctrl-Alt-Del warm boot is enabled Ctrl-Alt-Del warm boot is disabled

Return Value:

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

See Also:

imSetWarmBoot

Example ’**************** imGetWarmBoot ******************** REM $INCLUDE: ’im20bas1.bi’ status% = imSetWarmBoot(imDisable) PRINT "Disabling <BOOT>" status% = imGetWarmBoot(ctrlKey%) IF ctrlKey% = imEnable THEN PRINT "<BOOT> enabled" ELSE PRINT "<BOOT> disabled" END IF INPUT "Test it1>>",response$ status% = imSetWarmBoot(imEnable) PRINT "Enabling <BOOT>" INPUT "Test it1>>",response$ END

2-50

Page 77

imIncreaseContrast – QuickBasic

2 imIncreaseContrast Purpose:

This function increases 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, where 0 is very light, and 31 is very dark.

Syntax:

REM $INCLUDE: ’im20bas1.bi’ FUNCTION imIncreaseContrast% CDECL ()

IN Parameters:

None.

OUT Parameters:

None.

Return Value:

This function returns one of the standard status codes defined 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 compares the two scales. This Value on Scale 0 to 7

Equates to This Value on Scale 0 to 31

Contrast 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:

imGetContrast, imDecreaseContrast, imSetContrast

2-51

Page 78

imIncreaseContrast – QuickBasic

Example ’**************** imIncreaseContrast *************** REM $INCLUDE: ’im20bas1.bi’ PRINT "imIncreaseContrast" ’ Call Intermec function status% = imIncreaseContrast ’ Pause for keypad input temp$ = INPUT$(1) PRINT "imIncreaseContrast" ’ Call Intermec function status% = imIncreaseContrast END

2-52

Page 79

imInputStatus – QuickBasic

2 imInputStatus Purpose:

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

Syntax:

REM $INCLUDE: ’im20bas1.bi’ FUNCTION imInputStatus% CDECL ()

IN Parameters:

None.

OUT Parameters:

None.

Return Value:

The buffers checked correspond to these constants: imNoSelect imLabelSelect imKeyboardSelect imCom1Select imCom2Select imCom4Select imAllSelect

No input buffer selected Label selected Keypad selected COM1 selected COM2, scanner port selected (2010 and 2050) COM4 selected (RF only) All input containers are selected

Notes:

You must install the Reader Wedge to use this function. For information on loading RWTSR.EXE, see “Runtime Requirements” earlier in this chapter.

See Also:

imReceiveInput

2-53

Page 80

imInputStatus – QuickBasic

Example ’**************** imInputStatus ******************** REM $INCLUDE: ’im20bas1.bi’ DIM str AS STRING * 300 DIM buffer AS STRING * 300 status% = imLinkComm(imCom1, VARPTR(str), LEN(str)) WHILE temp$ <> "q" CLS str = STRING$(300, CHR$(0)) inputstat% = 0 statbreak$ = "" PRINT "Getting Input Stat" WHILE inputstat% = 0 AND statbreak$ <> "q" statbreak$ = INKEY$ inputstat% = imInputStatus WEND PRINT "Input status: "; inputstat% PRINT PRINT "Getting Data" status% = imReceiveInput(inputstat%, 20000, source%, VARPTR(buffer)) PRINT "Receive status: "; HEX$(status%) PRINT "Source Input: "; source% PRINT "Output is: " PRINT buffer PRINT PRINT "press q to quit" temp$ = INPUT$(1) WEND status% = imUnlinkComm(imCom1) END

2-54